aboutsummaryrefslogtreecommitdiff
path: root/src/uniquekey.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/uniquekey.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/uniquekey.h b/src/uniquekey.h
index c409048..ddc157b 100644
--- a/src/uniquekey.h
+++ b/src/uniquekey.h
@@ -45,6 +45,9 @@ class UniqueKey
45 45
46// ################################################################################################# 46// #################################################################################################
47 47
48DECLARE_UNIQUE_TYPE(NArr, int);
49DECLARE_UNIQUE_TYPE(NRec, int);
50
48class RegistryUniqueKey 51class RegistryUniqueKey
49: public UniqueKey 52: public UniqueKey
50{ 53{
@@ -93,7 +96,7 @@ class RegistryUniqueKey
93 } 96 }
94 // --------------------------------------------------------------------------------------------- 97 // ---------------------------------------------------------------------------------------------
95 // equivalent to luaL_getsubtable 98 // equivalent to luaL_getsubtable
96 [[nodiscard]] bool getSubTable(lua_State* const L_, int const narr_, int const nrec_) const 99 [[nodiscard]] bool getSubTable(lua_State* const L_, NArr const narr_, NRec const nrec_) const
97 { 100 {
98 STACK_CHECK_START_REL(L_, 0); 101 STACK_CHECK_START_REL(L_, 0);
99 pushValue(L_); // L_: {}|nil 102 pushValue(L_); // L_: {}|nil
@@ -113,7 +116,7 @@ class RegistryUniqueKey
113 void getSubTableMode(lua_State* const L_, std::string_view const& mode_) const 116 void getSubTableMode(lua_State* const L_, std::string_view const& mode_) const
114 { 117 {
115 STACK_CHECK_START_REL(L_, 0); 118 STACK_CHECK_START_REL(L_, 0);
116 if (!getSubTable(L_, 0, 0)) { // L_: {} 119 if (!getSubTable(L_, NArr{ 0 }, NRec{ 0 })) { // L_: {}
117 // Set its metatable if requested 120 // Set its metatable if requested
118 if (!mode_.empty()) { 121 if (!mode_.empty()) {
119 STACK_GROW(L_, 3); 122 STACK_GROW(L_, 3);