diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-11-20 18:03:33 +0100 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-11-20 18:03:33 +0100 |
commit | 0f6f3c207c46fa28059403e5f16af774d20c7ea2 (patch) | |
tree | 8031145bb2534c33ca0f2c65b9de85696c8a8ee0 /src/linda.cpp | |
parent | 304e4dfabe4555dff4aa72e75b677405fd30d1b3 (diff) | |
download | lanes-0f6f3c207c46fa28059403e5f16af774d20c7ea2.tar.gz lanes-0f6f3c207c46fa28059403e5f16af774d20c7ea2.tar.bz2 lanes-0f6f3c207c46fa28059403e5f16af774d20c7ea2.zip |
More [[nodiscard]] boyscouting
Diffstat (limited to 'src/linda.cpp')
-rw-r--r-- | src/linda.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/linda.cpp b/src/linda.cpp index 99d0cbe..43d2a91 100644 --- a/src/linda.cpp +++ b/src/linda.cpp | |||
@@ -83,7 +83,8 @@ namespace { | |||
83 | // ############################################################################################# | 83 | // ############################################################################################# |
84 | 84 | ||
85 | template <bool OPT> | 85 | template <bool OPT> |
86 | [[nodiscard]] static inline Linda* ToLinda(lua_State* const L_, StackIndex const idx_) | 86 | [[nodiscard]] |
87 | static inline Linda* ToLinda(lua_State* const L_, StackIndex const idx_) | ||
87 | { | 88 | { |
88 | Linda* const _linda{ static_cast<Linda*>(LindaFactory::Instance.toDeep(L_, idx_)) }; | 89 | Linda* const _linda{ static_cast<Linda*>(LindaFactory::Instance.toDeep(L_, idx_)) }; |
89 | if constexpr (!OPT) { | 90 | if constexpr (!OPT) { |
@@ -104,7 +105,8 @@ namespace { | |||
104 | */ | 105 | */ |
105 | 106 | ||
106 | template <bool OPT> | 107 | template <bool OPT> |
107 | [[nodiscard]] static int LindaToString(lua_State* const L_, StackIndex const idx_) | 108 | [[nodiscard]] |
109 | static int LindaToString(lua_State* const L_, StackIndex const idx_) | ||
108 | { | 110 | { |
109 | Linda* const _linda{ ToLinda<OPT>(L_, idx_) }; | 111 | Linda* const _linda{ ToLinda<OPT>(L_, idx_) }; |
110 | if (_linda != nullptr) { | 112 | if (_linda != nullptr) { |