From: Jérémie Galarneau Date: Fri, 22 Mar 2024 15:58:51 +0000 (-0400) Subject: Clean-up: waiter: coding style changes X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=eaa3b7be342a4ce2eed12f148b23ee48f3c8bdcf;p=lttng-tools.git Clean-up: waiter: coding style changes Mark non-throwing functions as noexcept when possible and mark waker as final since we don't expect user to derive from it. Signed-off-by: Jérémie Galarneau Change-Id: I9b2a4c4376b2a96e7238d93e2ad60b1f55317dc2 --- diff --git a/src/common/waiter.hpp b/src/common/waiter.hpp index 09823dd4f..cdd0913cc 100644 --- a/src/common/waiter.hpp +++ b/src/common/waiter.hpp @@ -23,21 +23,21 @@ namespace synchro { class waiter; class wait_queue; -class waker { +class waker final { friend waiter; public: - waker(const waker&) = default; - waker(waker&&) = default; - waker& operator=(const waker& other) = default; - waker& operator=(waker&& other) = default; + waker(const waker&) noexcept = default; + waker(waker&&) noexcept = default; + waker& operator=(const waker& other) noexcept = default; + waker& operator=(waker&& other) noexcept = default; void wake(); ~waker() = default; private: - waker(int32_t& state) : _state{ state } + explicit waker(int32_t& state) noexcept : _state{ state } { }