aboutsummaryrefslogtreecommitdiff
path: root/src/deep.hpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-11-20 17:51:49 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2024-11-20 17:51:49 +0100
commit304e4dfabe4555dff4aa72e75b677405fd30d1b3 (patch)
treeac934000415b46f784bda25ba671e74b9481573b /src/deep.hpp
parent872826ecaca5370e3492385cff3795d995b33ec7 (diff)
downloadlanes-304e4dfabe4555dff4aa72e75b677405fd30d1b3.tar.gz
lanes-304e4dfabe4555dff4aa72e75b677405fd30d1b3.tar.bz2
lanes-304e4dfabe4555dff4aa72e75b677405fd30d1b3.zip
Some [[nodiscard]] boyscouting
Diffstat (limited to 'src/deep.hpp')
-rw-r--r--src/deep.hpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/deep.hpp b/src/deep.hpp
index 3956f71..6fa12b1 100644
--- a/src/deep.hpp
+++ b/src/deep.hpp
@@ -57,8 +57,10 @@ class DeepFactory
57 // NVI: private overrides 57 // NVI: private overrides
58 virtual void createMetatable(lua_State* L_) const = 0; 58 virtual void createMetatable(lua_State* L_) const = 0;
59 virtual void deleteDeepObjectInternal(lua_State* L_, DeepPrelude* o_) const = 0; 59 virtual void deleteDeepObjectInternal(lua_State* L_, DeepPrelude* o_) const = 0;
60 [[nodiscard]] virtual DeepPrelude* newDeepObjectInternal(lua_State* L_) const = 0; 60 [[nodiscard]]
61 [[nodiscard]] virtual std::string_view moduleName() const = 0; 61 virtual DeepPrelude* newDeepObjectInternal(lua_State* L_) const = 0;
62 [[nodiscard]]
63 virtual std::string_view moduleName() const = 0;
62 64
63 private: 65 private:
64 void storeDeepLookup(lua_State* L_) const; 66 void storeDeepLookup(lua_State* L_) const;
@@ -66,11 +68,14 @@ class DeepFactory
66 public: 68 public:
67 // NVI: public interface 69 // NVI: public interface
68 static void DeleteDeepObject(lua_State* L_, DeepPrelude* o_); 70 static void DeleteDeepObject(lua_State* L_, DeepPrelude* o_);
69 [[nodiscard]] static bool IsDeepUserdata(lua_State* const L_, StackIndex const idx_); 71 [[nodiscard]]
70 [[nodiscard]] static DeepFactory* LookupFactory(lua_State* L_, StackIndex index_, LookupMode mode_); 72 static bool IsDeepUserdata(lua_State* const L_, StackIndex const idx_);
73 [[nodiscard]]
74 static DeepFactory* LookupFactory(lua_State* L_, StackIndex index_, LookupMode mode_);
71 static void PushDeepProxy(DestState L_, DeepPrelude* o_, UserValueCount nuv_, LookupMode mode_, lua_State* errL_); 75 static void PushDeepProxy(DestState L_, DeepPrelude* o_, UserValueCount nuv_, LookupMode mode_, lua_State* errL_);
72 void pushDeepUserdata(DestState L_, UserValueCount nuv_) const; 76 void pushDeepUserdata(DestState L_, UserValueCount nuv_) const;
73 [[nodiscard]] DeepPrelude* toDeep(lua_State* L_, StackIndex index_) const; 77 [[nodiscard]]
78 DeepPrelude* toDeep(lua_State* L_, StackIndex index_) const;
74}; 79};
75 80
76// ################################################################################################# 81// #################################################################################################