From 05e4cce366cccf92ad88f80695efa548fae187de Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Wed, 5 Feb 2025 12:27:02 +0100 Subject: Minor internal code tweaks * mark all eligible classes Final * new TableIndex strong type * buildfixes for HAVE_DEBUGSPEW() * overridden virtual destructors tagged as such --- deep_test/deep_test.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'deep_test') diff --git a/deep_test/deep_test.cpp b/deep_test/deep_test.cpp index dbc0115..46f99d9 100644 --- a/deep_test/deep_test.cpp +++ b/deep_test/deep_test.cpp @@ -2,12 +2,13 @@ #include "lanes/src/deep.hpp" #include "lanes/src/compat.hpp" -class MyDeepFactory : public DeepFactory +class MyDeepFactory final : public DeepFactory { public: static MyDeepFactory Instance; private: + ~MyDeepFactory() override = default; private: void createMetatable(lua_State* const L_) const override @@ -77,11 +78,11 @@ static int deep_get(lua_State* const L_) // ################################################################################################# [[nodiscard]] -static int deep_tostring(lua_State* L) +static int deep_tostring(lua_State* const L_) { - MyDeepUserdata* const _self{ static_cast(MyDeepFactory::Instance.toDeep(L, StackIndex{ 1 })) }; + MyDeepUserdata* const _self{ static_cast(MyDeepFactory::Instance.toDeep(L_, StackIndex{ 1 })) }; _self->inUse.fetch_add(1, std::memory_order_seq_cst); - luaG_pushstring(L, "%p:deep(%d)", _self, _self->val); + luaG_pushstring(L_, "%p:deep(%d)", _self, _self->val); _self->inUse.fetch_sub(1, std::memory_order_seq_cst); return 1; } -- cgit v1.2.3-55-g6feb