aboutsummaryrefslogtreecommitdiff
path: root/src/lane.hpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-12-17 11:53:15 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2024-12-17 11:53:15 +0100
commit48c99e29ae38db79522fb2833f3144ae58c7a906 (patch)
tree4fbf42918fa22fad025e75733dbe3caf76325f9b /src/lane.hpp
parentefd5318b2d9132996bf35a6af2e82706665890ff (diff)
downloadlanes-48c99e29ae38db79522fb2833f3144ae58c7a906.tar.gz
lanes-48c99e29ae38db79522fb2833f3144ae58c7a906.tar.bz2
lanes-48c99e29ae38db79522fb2833f3144ae58c7a906.zip
Some constitude tweaks
Diffstat (limited to 'src/lane.hpp')
-rw-r--r--src/lane.hpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lane.hpp b/src/lane.hpp
index 183c8bf..595bf4d 100644
--- a/src/lane.hpp
+++ b/src/lane.hpp
@@ -166,11 +166,9 @@ class Lane
166 CancelResult cancel(CancelOp op_, std::chrono::time_point<std::chrono::steady_clock> until_, WakeLane wakeLane_, int hookCount_); 166 CancelResult cancel(CancelOp op_, std::chrono::time_point<std::chrono::steady_clock> until_, WakeLane wakeLane_, int hookCount_);
167 void closeState() 167 void closeState()
168 { 168 {
169 lua_State* const _L{ S };
170 S = nullptr;
171 L = nullptr; 169 L = nullptr;
172 nresults = 0; 170 nresults = 0;
173 lua_close(_L); // this collects our coroutine thread at the same time 171 lua_close(std::exchange(S, nullptr)); // this collects our coroutine thread at the same time
174 } 172 }
175 [[nodiscard]] 173 [[nodiscard]]
176 std::string_view errorTraceLevelString() const; 174 std::string_view errorTraceLevelString() const;