From: Kienan Stewart Date: Wed, 11 Dec 2024 15:53:23 +0000 (-0500) Subject: common: Add arm() function to scope_exit objects X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=50736a23c024ed92b7cab22aa16a1f05f980861a;p=lttng-tools.git common: Add arm() function to scope_exit objects Change-Id: Ib8bc147f0fb7f884de4005af9bb372362af41850 Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/scope-exit.hpp b/src/common/scope-exit.hpp index f8225754a..693d116c5 100644 --- a/src/common/scope-exit.hpp +++ b/src/common/scope-exit.hpp @@ -62,6 +62,11 @@ public: scope_exit& operator=(scope_exit&&) = delete; scope_exit() = delete; + void arm() noexcept + { + _armed = true; + } + void disarm() noexcept { _armed = false;