From a8c80cada6594e56e24de0c72d828bbe779c61bc Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 23 May 2024 12:34:52 +0200 Subject: [PATCH] Sol2: Work around a compiler warning Qt and std container like different size types creator/src/libs/3rdparty/sol2/include/sol/sol.hpp:13844:15: warning: comparison of integers of different signs: 'std::size_t' (aka 'unsigned long') and 'qsizetype' (aka 'long long') [-Wsign-compare] 13844 | return idx >= cont.max_size(); | ~~~ ^ ~~~~~~~~~~~~~~~ creator/src/libs/3rdparty/sol2/include/sol/sol.hpp:13902:9: note: in instantiation of member function 'sol::stack::unqualified_getter>>::max_size_check' requested here 13902 | if (max_size_check(meta::has_max_size(), cont, idx)) { | ^ creator/src/libs/3rdparty/sol2/include/sol/sol.hpp:14140:15: note: in instantiation of function template specialization 'sol::stack::unqualified_getter>>::get>' requested here 14140 | return g.get(types>(), L, index, tracking); | ^ creator/src/libs/3rdparty/sol2/include/sol/sol.hpp:11719:15: note: in instantiation of member function 'sol::stack::unqualified_getter>>::get' requested here 11719 | return g.get(L, index, tracking); | ^ creator/src/plugins/lua/bindings/settings.cpp:269:55: note: in instantiation of function template specialization 'Lua::Internal::typedAspectCreate' requested here 269 | return createAspectFromTable(options, &typedAspectCreate); | ^ creator/src/plugins/lua/bindings/settings.cpp:314:9: note: in instantiation of function template specialization 'Lua::Internal::addTypedAspect' requested here 314 | addTypedAspect(settings, "IntegersAspect"); | ^ Change-Id: If67ca19aa995622ef476386544b02a77b5af5916 Reviewed-by: Marcus Tillmanns --- src/libs/3rdparty/sol2/include/sol/sol.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/3rdparty/sol2/include/sol/sol.hpp b/src/libs/3rdparty/sol2/include/sol/sol.hpp index 063ea72165e..85665a50c93 100644 --- a/src/libs/3rdparty/sol2/include/sol/sol.hpp +++ b/src/libs/3rdparty/sol2/include/sol/sol.hpp @@ -13841,7 +13841,7 @@ namespace sol { namespace stack { } static bool max_size_check(std::true_type, T& cont, std::size_t idx) { - return idx >= cont.max_size(); + return idx >= std::size_t(cont.max_size()); } static T get(lua_State* L, int relindex, record& tracking) {