From 3df64718adf74eab12066dd415aa4316e151e3fd Mon Sep 17 00:00:00 2001 From: ThePhD Date: Wed, 14 Sep 2016 00:10:25 -0400 Subject: [PATCH] update everything --- single/sol/sol.hpp | 15 ++++++++------- sol/simple_usertype_metatable.hpp | 11 ++++++----- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index be849c87..ebbe1717 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2016-09-14 04:01:54.009414 UTC -// This header was generated with sol v2.14.0 (revision 46b1077) +// Generated 2016-09-14 04:10:09.319129 UTC +// This header was generated with sol v2.14.0 (revision 0e56783) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -9979,7 +9979,7 @@ namespace sol { // beginning of sol/simple_usertype_metatable.hpp -#include +#include namespace sol { @@ -10006,8 +10006,8 @@ namespace sol { } }; - typedef std::map, std::less<>> variable_map; - typedef std::map> function_map; + typedef std::unordered_map> variable_map; + typedef std::unordered_map function_map; struct simple_map { variable_map variables; @@ -10031,7 +10031,8 @@ namespace sol { } } string_detail::string_shim accessor = stack::get(L, keyidx); - auto vit = variables.find(accessor.c_str()); + std::string accessorkey = accessor.c_str(); + auto vit = variables.find(accessorkey); if (vit != variables.cend()) { auto& varwrap = *(vit->second); if (is_index) { @@ -10039,7 +10040,7 @@ namespace sol { } return varwrap.new_index(L); } - auto fit = functions.find(accessor.c_str()); + auto fit = functions.find(accessorkey); if (fit != functions.cend()) { auto& func = (fit->second); return stack::push(L, func); diff --git a/sol/simple_usertype_metatable.hpp b/sol/simple_usertype_metatable.hpp index 44d3bef6..a0360885 100644 --- a/sol/simple_usertype_metatable.hpp +++ b/sol/simple_usertype_metatable.hpp @@ -25,7 +25,7 @@ #include "usertype_metatable.hpp" #include "object.hpp" #include -#include +#include #include namespace sol { @@ -53,8 +53,8 @@ namespace sol { } }; - typedef std::map, std::less<>> variable_map; - typedef std::map> function_map; + typedef std::unordered_map> variable_map; + typedef std::unordered_map function_map; struct simple_map { variable_map variables; @@ -78,7 +78,8 @@ namespace sol { } } string_detail::string_shim accessor = stack::get(L, keyidx); - auto vit = variables.find(accessor.c_str()); + std::string accessorkey = accessor.c_str(); + auto vit = variables.find(accessorkey); if (vit != variables.cend()) { auto& varwrap = *(vit->second); if (is_index) { @@ -86,7 +87,7 @@ namespace sol { } return varwrap.new_index(L); } - auto fit = functions.find(accessor.c_str()); + auto fit = functions.find(accessorkey); if (fit != functions.cend()) { auto& func = (fit->second); return stack::push(L, func);