summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty
diff options
context:
space:
mode:
author feos <feos-theos@yandex.ru>2019-10-19 11:37:01 +0300
committer feos <feos-theos@yandex.ru>2019-10-19 11:37:01 +0300
commitd51d2a71d58ea17238ad65612040f68fb407c3c1 (patch)
treeb5433dfe632e7ca6e79443a71d404ed95ad849d7 /3rdparty
parentbfbe918626cd69d4cf4982415a9e5b546aaf194d (diff)
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 https://github.com/ThePhD/sol2/commit/57990845726e17fba11a39cfcb1fc0127a7ea638 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.
Diffstat (limited to '3rdparty')
-rw-r--r--3rdparty/sol2/sol/traits.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/3rdparty/sol2/sol/traits.hpp b/3rdparty/sol2/sol/traits.hpp
index 1ed95a1656e..762bc84b947 100644
--- a/3rdparty/sol2/sol/traits.hpp
+++ b/3rdparty/sol2/sol/traits.hpp
@@ -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;