aboutsummaryrefslogtreecommitdiff
path: root/src/universe.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-03-29 16:21:56 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2024-03-29 16:21:56 +0100
commit336935ed4920e1359ab30261a5a028a70d379241 (patch)
tree147c901be2c28cda3422953d4da6939240696801 /src/universe.cpp
parentacb203829bfd12b4cc0c90f82cb70a4d111bce46 (diff)
downloadlanes-336935ed4920e1359ab30261a5a028a70d379241.tar.gz
lanes-336935ed4920e1359ab30261a5a028a70d379241.tar.bz2
lanes-336935ed4920e1359ab30261a5a028a70d379241.zip
C++ migration: parallelize lane setup and OS thread warmup
Diffstat (limited to '')
-rw-r--r--src/universe.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/universe.cpp b/src/universe.cpp
index c487ac0..66da147 100644
--- a/src/universe.cpp
+++ b/src/universe.cpp
@@ -60,7 +60,7 @@ Universe* universe_create(lua_State* L)
60 60
61void universe_store(lua_State* L, Universe* U) 61void universe_store(lua_State* L, Universe* U)
62{ 62{
63 ASSERT_L(universe_get(L) == nullptr); 63 ASSERT_L(!U || universe_get(L) == nullptr);
64 STACK_CHECK_START_REL(L, 0); 64 STACK_CHECK_START_REL(L, 0);
65 UNIVERSE_LIGHT_REGKEY.setValue(L, [U](lua_State* L) { U ? lua_pushlightuserdata( L, U) : lua_pushnil( L); }); 65 UNIVERSE_LIGHT_REGKEY.setValue(L, [U](lua_State* L) { U ? lua_pushlightuserdata( L, U) : lua_pushnil( L); });
66 STACK_CHECK( L, 0); 66 STACK_CHECK( L, 0);