aboutsummaryrefslogtreecommitdiff
path: root/src/intercopycontext.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-10-16 09:42:03 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-10-16 09:42:03 +0200
commit54acd7514dc0a2e9d593dd6312eae90ae6c0d6b5 (patch)
tree358653435a913392b8d8d028f0360c951b525307 /src/intercopycontext.cpp
parent7d94b18dcc41ccdcb5c8e9cff658b7c2a84b283f (diff)
downloadlanes-54acd7514dc0a2e9d593dd6312eae90ae6c0d6b5.tar.gz
lanes-54acd7514dc0a2e9d593dd6312eae90ae6c0d6b5.tar.bz2
lanes-54acd7514dc0a2e9d593dd6312eae90ae6c0d6b5.zip
Fix/suppress MSVC /Wall warnings
Diffstat (limited to 'src/intercopycontext.cpp')
-rw-r--r--src/intercopycontext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/intercopycontext.cpp b/src/intercopycontext.cpp
index d21995c..473ebfd 100644
--- a/src/intercopycontext.cpp
+++ b/src/intercopycontext.cpp
@@ -864,13 +864,13 @@ LuaType InterCopyContext::processConversion() const
864 _source = lua_touserdata(L1, -1); 864 _source = lua_touserdata(L1, -1);
865 void* _clone{ nullptr }; 865 void* _clone{ nullptr };
866 // get the number of bytes to allocate for the clone 866 // get the number of bytes to allocate for the clone
867 size_t const userdata_size{ lua_rawlen(L1, kIdxTop) }; 867 size_t const _userdata_size{ lua_rawlen(L1, kIdxTop) };
868 { 868 {
869 // extract uservalues (don't transfer them yet) 869 // extract uservalues (don't transfer them yet)
870 int const _nuv{ luaG_getalluservalues(L1, source_i) }; // L1: ... u [uv]* 870 int const _nuv{ luaG_getalluservalues(L1, source_i) }; // L1: ... u [uv]*
871 STACK_CHECK(L1, _nuv + 1); 871 STACK_CHECK(L1, _nuv + 1);
872 // create the clone userdata with the required number of uservalue slots 872 // create the clone userdata with the required number of uservalue slots
873 _clone = lua_newuserdatauv(L2, userdata_size, _nuv); // L2: ... mt u 873 _clone = lua_newuserdatauv(L2, _userdata_size, _nuv); // L2: ... mt u
874 // add it in the cache 874 // add it in the cache
875 lua_pushlightuserdata(L2, _source); // L2: ... mt u source 875 lua_pushlightuserdata(L2, _source); // L2: ... mt u source
876 lua_pushvalue(L2, -2); // L2: ... mt u source u 876 lua_pushvalue(L2, -2); // L2: ... mt u source u
@@ -906,7 +906,7 @@ LuaType InterCopyContext::processConversion() const
906 lua_remove(L2, -2); // L2: ... u __lanesclone 906 lua_remove(L2, -2); // L2: ... u __lanesclone
907 lua_pushlightuserdata(L2, _clone); // L2: ... u __lanesclone clone 907 lua_pushlightuserdata(L2, _clone); // L2: ... u __lanesclone clone
908 lua_pushlightuserdata(L2, _source); // L2: ... u __lanesclone clone source 908 lua_pushlightuserdata(L2, _source); // L2: ... u __lanesclone clone source
909 lua_pushinteger(L2, userdata_size); // L2: ... u __lanesclone clone source size 909 lua_pushinteger(L2, static_cast<lua_Integer>(_userdata_size)); // L2: ... u __lanesclone clone source size
910 // clone:__lanesclone(dest, source, size) 910 // clone:__lanesclone(dest, source, size)
911 lua_call(L2, 3, 0); // L2: ... u 911 lua_call(L2, 3, 0); // L2: ... u
912 } else { // regular function 912 } else { // regular function