aboutsummaryrefslogtreecommitdiff
path: root/src/keeper.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-03-20 16:23:54 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2024-03-20 16:23:54 +0100
commit6556cc558f0602cc99b1a8d1c7212b2e91490cdc (patch)
tree1763ed796df57a39432f045eccb8d80b2ec02a93 /src/keeper.cpp
parent0b516e9490b51bdd15c347fcda35b5dbb06b4829 (diff)
downloadlanes-6556cc558f0602cc99b1a8d1c7212b2e91490cdc.tar.gz
lanes-6556cc558f0602cc99b1a8d1c7212b2e91490cdc.tar.bz2
lanes-6556cc558f0602cc99b1a8d1c7212b2e91490cdc.zip
C++ migration: UniqueKey
Diffstat (limited to 'src/keeper.cpp')
-rw-r--r--src/keeper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/keeper.cpp b/src/keeper.cpp
index 1e344f2..697fe71 100644
--- a/src/keeper.cpp
+++ b/src/keeper.cpp
@@ -166,7 +166,7 @@ static void fifo_pop( lua_State* L, keeper_fifo* fifo_, lua_Integer count_)
166// in: linda_ud expected at *absolute* stack slot idx 166// in: linda_ud expected at *absolute* stack slot idx
167// out: fifos[ud] 167// out: fifos[ud]
168// crc64/we of string "FIFOS_KEY" generated at http://www.nitrxgen.net/hashgen/ 168// crc64/we of string "FIFOS_KEY" generated at http://www.nitrxgen.net/hashgen/
169static DECLARE_CONST_UNIQUE_KEY( FIFOS_KEY, 0xdce50bbc351cd465); 169static constexpr UniqueKey FIFOS_KEY{ 0xdce50bbc351cd465ull };
170static void push_table( lua_State* L, int idx_) 170static void push_table( lua_State* L, int idx_)
171{ 171{
172 STACK_GROW( L, 4); 172 STACK_GROW( L, 4);
@@ -769,13 +769,13 @@ void keeper_toggle_nil_sentinels( lua_State* L, int val_i_, LookupMode const mod
769 { 769 {
770 if( lua_isnil( L, i)) 770 if( lua_isnil( L, i))
771 { 771 {
772 push_unique_key( L, NIL_SENTINEL); 772 NIL_SENTINEL.push(L);
773 lua_replace( L, i); 773 lua_replace( L, i);
774 } 774 }
775 } 775 }
776 else 776 else
777 { 777 {
778 if( equal_unique_key( L, i, NIL_SENTINEL)) 778 if (NIL_SENTINEL.equals(L, i))
779 { 779 {
780 lua_pushnil( L); 780 lua_pushnil( L);
781 lua_replace( L, i); 781 lua_replace( L, i);