aboutsummaryrefslogtreecommitdiff
path: root/src/lane.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-12-03 17:13:35 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2024-12-03 17:13:35 +0100
commitd8580e14fec64dd5bf3dd492a4811b290cbe4aec (patch)
tree8dcd3117f7427671e34509badd4c08957d8f0914 /src/lane.cpp
parent307fd830eb168005a3ba3d557343284814757eff (diff)
downloadlanes-d8580e14fec64dd5bf3dd492a4811b290cbe4aec.tar.gz
lanes-d8580e14fec64dd5bf3dd492a4811b290cbe4aec.tar.bz2
lanes-d8580e14fec64dd5bf3dd492a4811b290cbe4aec.zip
Internal rework of an enum bad practice usage
Diffstat (limited to 'src/lane.cpp')
-rw-r--r--src/lane.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lane.cpp b/src/lane.cpp
index 923eabd..9ab574e 100644
--- a/src/lane.cpp
+++ b/src/lane.cpp
@@ -930,10 +930,10 @@ CancelResult Lane::cancel(CancelOp const op_, std::chrono::time_point<std::chron
930 930
931 // signal the linda to wake up the thread so that it can react to the cancel query 931 // signal the linda to wake up the thread so that it can react to the cancel query
932 // let us hope we never land here with a pointer on a linda that has been destroyed... 932 // let us hope we never land here with a pointer on a linda that has been destroyed...
933 if (op_ == CancelOp::Soft) { 933 if (op_.mode == CancelRequest::Soft) {
934 return internalCancel(CancelRequest::Soft, until_, wakeLane_); 934 return internalCancel(CancelRequest::Soft, until_, wakeLane_);
935 } else if (op_ > CancelOp::Soft) { 935 } else if (op_.hookMask != LuaHookMask::None) {
936 lua_sethook(L, _cancelHook, static_cast<int>(op_), hookCount_); 936 lua_sethook(L, _cancelHook, static_cast<int>(op_.hookMask), hookCount_);
937 } 937 }
938 938
939 return internalCancel(CancelRequest::Hard, until_, wakeLane_); 939 return internalCancel(CancelRequest::Hard, until_, wakeLane_);