]> git.lttng.org Git - lttng-tools.git/commitdiff
common: Add arm() function to scope_exit objects
authorKienan Stewart <kstewart@efficios.com>
Wed, 11 Dec 2024 15:53:23 +0000 (10:53 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 18 Dec 2024 15:55:06 +0000 (15:55 +0000)
Change-Id: Ib8bc147f0fb7f884de4005af9bb372362af41850
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/scope-exit.hpp

index f8225754a6ff7c1ff62146fe9fbc18ad228bd9f5..693d116c55f88cd3c3ae4196cd37096037be2f9e 100644 (file)
@@ -62,6 +62,11 @@ public:
        scope_exit& operator=(scope_exit&&) = delete;
        scope_exit() = delete;
 
+       void arm() noexcept
+       {
+               _armed = true;
+       }
+
        void disarm() noexcept
        {
                _armed = false;
This page took 0.029233 seconds and 4 git commands to generate.