mirror of
https://github.com/holub/mame
synced 2025-06-06 21:03:47 +03:00
luaengine: reduce memory usage during compilation
Previous semantics were encouraged by sol2, and ThePhD admitted it was a bad idea for usertypes with lots of members. sol3 allows to assign members outside a constructor for regular usertypes, but mame can't move to sol3 because it requires C++17. Turns out sol2 also has a way to add members separately, and that is what I used. This helps immensely.
This approach required a fix to warning C5046 copied from here 5799084572
Tested current mame plugins, everything seems to work.
PS: Due to come black magic, if I use simple_usertype::set() with "manager" as well, "machine" member dies (others are fine!), so I had to leave it intact.
This commit is contained in:
parent
bfbe918626
commit
d51d2a71d5
2
3rdparty/sol2/sol/traits.hpp
vendored
2
3rdparty/sol2/sol/traits.hpp
vendored
@ -252,7 +252,7 @@ namespace sol {
|
||||
using yes = char;
|
||||
using no = struct { char s[2]; };
|
||||
|
||||
struct F { void operator()(); };
|
||||
struct F { void operator()() {}; };
|
||||
struct Derived : T, F {};
|
||||
template<typename U, U> struct Check;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user