diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-05-27 14:47:56 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-05-27 14:47:56 +0200 |
commit | b482ed9c30cddac31dcff2d19e517bf20af30d10 (patch) | |
tree | b65f7b2f0a841484e262f5e6396419f7587d76da /src/lanes.cpp | |
parent | 82ec0e4de089074aae26ab72040523fa7d21557d (diff) | |
download | lanes-b482ed9c30cddac31dcff2d19e517bf20af30d10.tar.gz lanes-b482ed9c30cddac31dcff2d19e517bf20af30d10.tar.bz2 lanes-b482ed9c30cddac31dcff2d19e517bf20af30d10.zip |
More string_view
Diffstat (limited to 'src/lanes.cpp')
-rw-r--r-- | src/lanes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp index 6eec8c4..0369171 100644 --- a/src/lanes.cpp +++ b/src/lanes.cpp | |||
@@ -238,7 +238,7 @@ LUAG_FUNC(lane_new) | |||
238 | Universe* const _U{ universe_get(L_) }; | 238 | Universe* const _U{ universe_get(L_) }; |
239 | DEBUGSPEW_CODE(DebugSpew(_U) << "lane_new: setup" << std::endl); | 239 | DEBUGSPEW_CODE(DebugSpew(_U) << "lane_new: setup" << std::endl); |
240 | 240 | ||
241 | char const* const _libs_str{ lua_tostring(L_, kLibsIdx) }; | 241 | std::optional<std::string_view> _libs_str{ lua_isnil(L_, kLibsIdx) ? std::nullopt : std::make_optional(lua_tostringview(L_, kLibsIdx)) }; |
242 | lua_State* const _L2{ luaG_newstate(_U, SourceState{ L_ }, _libs_str) }; // L_: [fixed] ... L2: | 242 | lua_State* const _L2{ luaG_newstate(_U, SourceState{ L_ }, _libs_str) }; // L_: [fixed] ... L2: |
243 | STACK_CHECK_START_REL(_L2, 0); | 243 | STACK_CHECK_START_REL(_L2, 0); |
244 | 244 | ||