diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-09-19 15:58:19 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-09-27 11:43:08 +0100 |
commit | 5fa199c6520b21a869486618a87a370b54bcc894 (patch) | |
tree | 32f1a65796f248b9a686dfa3e0f20aaa3be8aaf9 /contrib/epee/include/copyable_atomic.h | |
parent | Merge pull request #2533 (diff) | |
download | monero-5fa199c6520b21a869486618a87a370b54bcc894.tar.xz |
copyable_atomic: add a ctor with initial value
Diffstat (limited to 'contrib/epee/include/copyable_atomic.h')
-rw-r--r-- | contrib/epee/include/copyable_atomic.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/epee/include/copyable_atomic.h b/contrib/epee/include/copyable_atomic.h index 410b4b4ff..00a5f484b 100644 --- a/contrib/epee/include/copyable_atomic.h +++ b/contrib/epee/include/copyable_atomic.h @@ -35,6 +35,8 @@ namespace epee public: copyable_atomic() {}; + copyable_atomic(uint32_t value) + { store(value); } copyable_atomic(const copyable_atomic& a):std::atomic<uint32_t>(a.load()) {} copyable_atomic& operator= (const copyable_atomic& a) |