aboutsummaryrefslogtreecommitdiff
path: root/src/compat.h
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-06-14 15:23:21 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-06-14 15:23:21 +0200
commit149d6d6d16b10da9915e3018237405f6fe8749cf (patch)
tree3bf7ef659b5efd3d61bfd80eef2f48b9eff8d5ec /src/compat.h
parent792128255b6c6add22f97ea60734181cb915f2ae (diff)
downloadlanes-149d6d6d16b10da9915e3018237405f6fe8749cf.tar.gz
lanes-149d6d6d16b10da9915e3018237405f6fe8749cf.tar.bz2
lanes-149d6d6d16b10da9915e3018237405f6fe8749cf.zip
More char* -> std::string_view conversions
Diffstat (limited to 'src/compat.h')
-rw-r--r--src/compat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compat.h b/src/compat.h
index bcea225..714556e 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -261,6 +261,14 @@ inline void luaG_pushglobaltable(lua_State* const L_)
261 261
262// ################################################################################################# 262// #################################################################################################
263 263
264inline void luaG_setfield(lua_State* const L_, int const idx_, char const* k_) = delete;
265inline void luaG_setfield(lua_State* const L_, int const idx_, std::string_view const& k_)
266{
267 lua_setfield(L_, idx_, k_.data());
268}
269
270// #################################################################################################
271
264inline void luaG_setmetatable(lua_State* const L_, std::string_view const& tname_) 272inline void luaG_setmetatable(lua_State* const L_, std::string_view const& tname_)
265{ 273{
266 // fake externs to make clang happy... 274 // fake externs to make clang happy...