aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lanes.cpp')
-rw-r--r--src/lanes.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp
index 74e2507..22391d5 100644
--- a/src/lanes.cpp
+++ b/src/lanes.cpp
@@ -317,16 +317,16 @@ LUAG_FUNC(lane_new)
317 lua_State* _L2{ lane->L }; 317 lua_State* _L2{ lane->L };
318 STACK_CHECK_START_REL(_L2, 0); 318 STACK_CHECK_START_REL(_L2, 0);
319 int const _name_idx{ lua_isnoneornil(L, kNameIdx) ? 0 : kNameIdx }; 319 int const _name_idx{ lua_isnoneornil(L, kNameIdx) ? 0 : kNameIdx };
320 char const* const debugName{ (_name_idx > 0) ? lua_tostring(L, _name_idx) : nullptr }; 320 std::string_view const _debugName{ (_name_idx > 0) ? lua_tostringview(L, _name_idx) : std::string_view{} };
321 if (debugName) 321 if (!_debugName.empty())
322 { 322 {
323 if (strcmp(debugName, "auto") != 0) { 323 if (_debugName != "auto") {
324 lua_pushstring(_L2, debugName); // L: ... lane L2: "<name>" 324 std::ignore = lua_pushstringview(_L2, _debugName); // L: ... lane L2: "<name>"
325 } else { 325 } else {
326 lua_Debug ar; 326 lua_Debug _ar;
327 lua_pushvalue(L, 1); // L: ... lane func 327 lua_pushvalue(L, 1); // L: ... lane func
328 lua_getinfo(L, ">S", &ar); // L: ... lane 328 lua_getinfo(L, ">S", &_ar); // L: ... lane
329 lua_pushfstring(_L2, "%s:%d", ar.short_src, ar.linedefined); // L: ... lane L2: "<name>" 329 lua_pushfstring(_L2, "%s:%d", _ar.short_src, _ar.linedefined); // L: ... lane L2: "<name>"
330 } 330 }
331 lane->changeDebugName(-1); 331 lane->changeDebugName(-1);
332 lua_pop(_L2, 1); // L: ... lane L2: 332 lua_pop(_L2, 1); // L: ... lane L2:
@@ -701,11 +701,11 @@ LUAG_FUNC(configure)
701 STACK_CHECK(L_, 2); 701 STACK_CHECK(L_, 2);
702 702
703 { 703 {
704 char const* _errmsg{ 704 std::string_view const _errmsg{
705 DeepFactory::PushDeepProxy(DestState{ L_ }, _U->timerLinda, 0, LookupMode::LaneBody) 705 DeepFactory::PushDeepProxy(DestState{ L_ }, _U->timerLinda, 0, LookupMode::LaneBody)
706 }; // L_: settings M timerLinda 706 }; // L_: settings M timerLinda
707 if (_errmsg != nullptr) { 707 if (!_errmsg.empty()) {
708 raise_luaL_error(L_, _errmsg); 708 raise_luaL_error(L_, _errmsg.data());
709 } 709 }
710 lua_setfield(L_, -2, "timer_gateway"); // L_: settings M 710 lua_setfield(L_, -2, "timer_gateway"); // L_: settings M
711 } 711 }