aboutsummaryrefslogtreecommitdiff
path: root/src/tools.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-06-10 14:51:17 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-06-10 14:51:17 +0200
commit3763be94cdd1a5cf26fec0f09784b18188fd3054 (patch)
tree3a0e6c1f915e06d51b578d113a759f7e57de875e /src/tools.cpp
parent770e3c0c533a94631885a4d04d8c36a76d5c185e (diff)
downloadlanes-3763be94cdd1a5cf26fec0f09784b18188fd3054.tar.gz
lanes-3763be94cdd1a5cf26fec0f09784b18188fd3054.tar.bz2
lanes-3763be94cdd1a5cf26fec0f09784b18188fd3054.zip
luaG_typename returns a std::string_view
Diffstat (limited to 'src/tools.cpp')
-rw-r--r--src/tools.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools.cpp b/src/tools.cpp
index efded98..49872f7 100644
--- a/src/tools.cpp
+++ b/src/tools.cpp
@@ -158,7 +158,7 @@ static void update_lookup_entry(lua_State* L_, int ctxBase_, int depth_)
158 // Therefore, when we encounter an object for which a name was previously registered, we need to select the a single name 158 // Therefore, when we encounter an object for which a name was previously registered, we need to select the a single name
159 // based on some sorting order so that we end up with the same name in all databases whatever order the table walk yielded 159 // based on some sorting order so that we end up with the same name in all databases whatever order the table walk yielded
160 if (!_prevName.empty() && ((_prevName.size() < _newName.size()) || (_prevName <= _newName))) { 160 if (!_prevName.empty() && ((_prevName.size() < _newName.size()) || (_prevName <= _newName))) {
161 DEBUGSPEW_CODE(DebugSpew(_U) << luaG_typename(L_, luaG_type(L_, -3)) << " '" << _newName << "' remains named '" << _prevName << "'" << std::endl); 161 DEBUGSPEW_CODE(DebugSpew(_U) << luaG_typename(L_, -3) << " '" << _newName << "' remains named '" << _prevName << "'" << std::endl);
162 // the previous name is 'smaller' than the one we just generated: keep it! 162 // the previous name is 'smaller' than the one we just generated: keep it!
163 lua_pop(L_, 3); // L_: ... {bfc} k 163 lua_pop(L_, 3); // L_: ... {bfc} k
164 } else { 164 } else {
@@ -172,7 +172,7 @@ static void update_lookup_entry(lua_State* L_, int ctxBase_, int depth_)
172 } else { 172 } else {
173 lua_remove(L_, -2); // L_: ... {bfc} k o "f.q.n" 173 lua_remove(L_, -2); // L_: ... {bfc} k o "f.q.n"
174 } 174 }
175 DEBUGSPEW_CODE(DebugSpew(_U) << luaG_typename(L_, luaG_type(L_, -2)) << " '" << _newName << "'" << std::endl); 175 DEBUGSPEW_CODE(DebugSpew(_U) << luaG_typename(L_, -2) << " '" << _newName << "'" << std::endl);
176 // prepare the stack for database feed 176 // prepare the stack for database feed
177 lua_pushvalue(L_, -1); // L_: ... {bfc} k o "f.q.n" "f.q.n" 177 lua_pushvalue(L_, -1); // L_: ... {bfc} k o "f.q.n" "f.q.n"
178 lua_pushvalue(L_, -3); // L_: ... {bfc} k o "f.q.n" "f.q.n" o 178 lua_pushvalue(L_, -3); // L_: ... {bfc} k o "f.q.n" "f.q.n" o
@@ -349,7 +349,7 @@ namespace tools {
349 lua_pop(L_, 3); // L_: 349 lua_pop(L_, 3); // L_:
350 } else { 350 } else {
351 lua_pop(L_, 1); // L_: 351 lua_pop(L_, 1); // L_:
352 raise_luaL_error(L_, "unsupported module type %s", luaG_typename(L_, luaG_type(L_, _in_base))); 352 raise_luaL_error(L_, "unsupported module type %s", luaG_typename(L_, _in_base).data());
353 } 353 }
354 STACK_CHECK(L_, 0); 354 STACK_CHECK(L_, 0);
355 } 355 }