diff --git a/include/sol/stack_push.hpp b/include/sol/stack_push.hpp index a918cf8f..5583b8b0 100644 --- a/include/sol/stack_push.hpp +++ b/include/sol/stack_push.hpp @@ -746,7 +746,7 @@ namespace sol { namespace stack { struct unqualified_pusher { static int push(lua_State* L, char c) { const char str[2] = { c, '\0' }; - return stack::push(L, str, 1); + return stack::push(L, static_cast(str), 1); } }; @@ -932,7 +932,7 @@ namespace sol { namespace stack { } std::string u8str("", 0); u8str.resize(needed_size); - char* target = &u8str[0]; + char* target = const_cast(u8str.data()); return convert_into(L, target, needed_size, strb, stre); } }; @@ -1009,7 +1009,7 @@ namespace sol { namespace stack { } std::string u8str("", 0); u8str.resize(needed_size); - char* target = &u8str[0]; + char* target = const_cast(u8str.data()); return convert_into(L, target, needed_size, strb, stre); } }; @@ -1042,7 +1042,8 @@ namespace sol { namespace stack { } static int push(lua_State* L, const wchar_t (&str)[N], std::size_t sz) { - return stack::push(L, str, str + sz); + const wchar_t* str_ptr = static_cast(str); + return stack::push(L, str_ptr, str_ptr + sz); } }; @@ -1053,7 +1054,8 @@ namespace sol { namespace stack { } static int push(lua_State* L, const char16_t (&str)[N], std::size_t sz) { - return stack::push(L, str, str + sz); + const char16_t* str_ptr = static_cast(str); + return stack::push(L, str_ptr, str_ptr + sz); } }; @@ -1064,7 +1066,8 @@ namespace sol { namespace stack { } static int push(lua_State* L, const char32_t (&str)[N], std::size_t sz) { - return stack::push(L, str, str + sz); + const char32_t* str_ptr = static_cast(str); + return stack::push(L, str_ptr, str_ptr + sz); } }; @@ -1072,7 +1075,7 @@ namespace sol { namespace stack { struct unqualified_pusher { static int push(lua_State* L, wchar_t c) { const wchar_t str[2] = { c, '\0' }; - return stack::push(L, &str[0], 1); + return stack::push(L, static_cast(str), 1); } }; @@ -1080,7 +1083,7 @@ namespace sol { namespace stack { struct unqualified_pusher { static int push(lua_State* L, char16_t c) { const char16_t str[2] = { c, '\0' }; - return stack::push(L, &str[0], 1); + return stack::push(L, static_cast(str), 1); } }; @@ -1088,7 +1091,7 @@ namespace sol { namespace stack { struct unqualified_pusher { static int push(lua_State* L, char32_t c) { const char32_t str[2] = { c, '\0' }; - return stack::push(L, &str[0], 1); + return stack::push(L, static_cast(str), 1); } }; diff --git a/single/include/sol/config.hpp b/single/include/sol/config.hpp index c5197928..fb279a39 100644 --- a/single/include/sol/config.hpp +++ b/single/include/sol/config.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 2020-09-05 21:23:26.771012 UTC -// This header was generated with sol v3.2.1 (revision de87bec) +// Generated 2020-09-05 21:46:13.217176 UTC +// This header was generated with sol v3.2.1 (revision 63df43e) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_CONFIG_HPP diff --git a/single/include/sol/forward.hpp b/single/include/sol/forward.hpp index 34330910..562aac6b 100644 --- a/single/include/sol/forward.hpp +++ b/single/include/sol/forward.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 2020-09-05 21:23:26.767014 UTC -// This header was generated with sol v3.2.1 (revision de87bec) +// Generated 2020-09-05 21:46:13.213158 UTC +// This header was generated with sol v3.2.1 (revision 63df43e) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP diff --git a/single/include/sol/sol.hpp b/single/include/sol/sol.hpp index e3cc67c2..bce36fa8 100644 --- a/single/include/sol/sol.hpp +++ b/single/include/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 2020-09-05 21:23:26.587015 UTC -// This header was generated with sol v3.2.1 (revision de87bec) +// Generated 2020-09-05 21:46:13.049473 UTC +// This header was generated with sol v3.2.1 (revision 63df43e) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -9729,8 +9729,6 @@ namespace sol { template std::size_t aligned_space_for(void* alignment = nullptr) { // use temporary storage to prevent strict UB shenanigans - using union_type = std::aligned_union<1, Args...>; - using union_type_t = typename union_type::type; char alignment_shim[(std::max)({ sizeof(Args)... }) + (std::max)({ alignof(Args)... })] {}; char* start = alignment == nullptr ? static_cast(alignment) : alignment_shim; (void)detail::swallow { int {}, (align_one(std::alignment_of_v, sizeof(Args), alignment), int {})... }; @@ -14022,7 +14020,7 @@ namespace sol { namespace stack { struct unqualified_pusher { static int push(lua_State* L, char c) { const char str[2] = { c, '\0' }; - return stack::push(L, str, 1); + return stack::push(L, static_cast(str), 1); } }; @@ -14208,7 +14206,7 @@ namespace sol { namespace stack { } std::string u8str("", 0); u8str.resize(needed_size); - char* target = &u8str[0]; + char* target = const_cast(u8str.data()); return convert_into(L, target, needed_size, strb, stre); } }; @@ -14285,7 +14283,7 @@ namespace sol { namespace stack { } std::string u8str("", 0); u8str.resize(needed_size); - char* target = &u8str[0]; + char* target = const_cast(u8str.data()); return convert_into(L, target, needed_size, strb, stre); } }; @@ -14318,7 +14316,8 @@ namespace sol { namespace stack { } static int push(lua_State* L, const wchar_t (&str)[N], std::size_t sz) { - return stack::push(L, str, str + sz); + const wchar_t* str_ptr = static_cast(str); + return stack::push(L, str_ptr, str_ptr + sz); } }; @@ -14329,7 +14328,8 @@ namespace sol { namespace stack { } static int push(lua_State* L, const char16_t (&str)[N], std::size_t sz) { - return stack::push(L, str, str + sz); + const char16_t* str_ptr = static_cast(str); + return stack::push(L, str_ptr, str_ptr + sz); } }; @@ -14340,7 +14340,8 @@ namespace sol { namespace stack { } static int push(lua_State* L, const char32_t (&str)[N], std::size_t sz) { - return stack::push(L, str, str + sz); + const char32_t* str_ptr = static_cast(str); + return stack::push(L, str_ptr, str_ptr + sz); } }; @@ -14348,7 +14349,7 @@ namespace sol { namespace stack { struct unqualified_pusher { static int push(lua_State* L, wchar_t c) { const wchar_t str[2] = { c, '\0' }; - return stack::push(L, &str[0], 1); + return stack::push(L, static_cast(str), 1); } }; @@ -14356,7 +14357,7 @@ namespace sol { namespace stack { struct unqualified_pusher { static int push(lua_State* L, char16_t c) { const char16_t str[2] = { c, '\0' }; - return stack::push(L, &str[0], 1); + return stack::push(L, static_cast(str), 1); } }; @@ -14364,7 +14365,7 @@ namespace sol { namespace stack { struct unqualified_pusher { static int push(lua_State* L, char32_t c) { const char32_t str[2] = { c, '\0' }; - return stack::push(L, &str[0], 1); + return stack::push(L, static_cast(str), 1); } };