projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: waiter: use std::reference_wrapper instead of a raw reference
[lttng-tools.git]
/
src
/
common
/
waiter.hpp
diff --git
a/src/common/waiter.hpp
b/src/common/waiter.hpp
index 7f5c2f171f4e10448e011cff42a0cc7022d05a85..09823dd4f94a6ec3c74032abc86be23cace3b48d 100644
(file)
--- a/
src/common/waiter.hpp
+++ b/
src/common/waiter.hpp
@@
-14,7
+14,7
@@
#include "macros.hpp"
#include "macros.hpp"
-#include <
stdbool.h
>
+#include <
functional
>
#include <stdint.h>
#include <urcu/wfstack.h>
#include <stdint.h>
#include <urcu/wfstack.h>
@@
-29,16
+29,8
@@
class waker {
public:
waker(const waker&) = default;
waker(waker&&) = default;
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();
void wake();
@@
-49,7
+41,7
@@
private:
{
}
{
}
-
int32_t&
_state;
+
std::reference_wrapper<int32_t>
_state;
};
class waiter final {
};
class waiter final {
This page took
0.022918 seconds
and
4
git commands to generate.