aboutsummaryrefslogtreecommitdiff
path: root/src/state.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-03-26 17:46:00 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2024-03-26 17:46:00 +0100
commitf214d35df5f09e7026dafd8553e83cc6ea21cbde (patch)
tree2bd19bfddf4949183fe0e84ca58940fd6a6aa918 /src/state.cpp
parent2eeb245b98bd702379aa92d888f7b7d21d1193b8 (diff)
downloadlanes-f214d35df5f09e7026dafd8553e83cc6ea21cbde.tar.gz
lanes-f214d35df5f09e7026dafd8553e83cc6ea21cbde.tar.bz2
lanes-f214d35df5f09e7026dafd8553e83cc6ea21cbde.zip
C++ migration: templated lua_touserdata
Diffstat (limited to 'src/state.cpp')
-rw-r--r--src/state.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/state.cpp b/src/state.cpp
index 7bdaec9..b46a145 100644
--- a/src/state.cpp
+++ b/src/state.cpp
@@ -259,7 +259,7 @@ lua_State* create_state( Universe* U, lua_State* from_)
259 lua_pushcclosure( from_, U->provide_allocator, 0); 259 lua_pushcclosure( from_, U->provide_allocator, 0);
260 lua_call( from_, 0, 1); 260 lua_call( from_, 0, 1);
261 { 261 {
262 AllocatorDefinition* const def = (AllocatorDefinition*) lua_touserdata( from_, -1); 262 AllocatorDefinition* const def{ lua_touserdata<AllocatorDefinition>(from_, -1) };
263 L = lua_newstate( def->m_allocF, def->m_allocUD); 263 L = lua_newstate( def->m_allocF, def->m_allocUD);
264 } 264 }
265 lua_pop( from_, 1); 265 lua_pop( from_, 1);