X-Git-Url: http://git.liburcu.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fwaiter.hpp;fp=src%2Fcommon%2Fwaiter.hpp;h=09823dd4f94a6ec3c74032abc86be23cace3b48d;hp=7f5c2f171f4e10448e011cff42a0cc7022d05a85;hb=ac8791840c1815f10336210b4c0d7046eb515692;hpb=0729ea5558053d5a1a0d7aea51febf63ee1f3b3f diff --git a/src/common/waiter.hpp b/src/common/waiter.hpp index 7f5c2f171..09823dd4f 100644 --- a/src/common/waiter.hpp +++ b/src/common/waiter.hpp @@ -14,7 +14,7 @@ #include "macros.hpp" -#include +#include #include #include @@ -29,16 +29,8 @@ class waker { public: waker(const waker&) = default; waker(waker&&) = default; - waker& operator=(const waker& other) - { - _state = other._state; - return *this; - } - waker& operator=(waker&& other) - { - _state = other._state; - return *this; - } + waker& operator=(const waker& other) = default; + waker& operator=(waker&& other) = default; void wake(); @@ -49,7 +41,7 @@ private: { } - int32_t& _state; + std::reference_wrapper _state; }; class waiter final {