Skip to content
Snippets Groups Projects
Commit fec5a6ed authored by Adrien Béraud's avatar Adrien Béraud
Browse files

make move operators noexcept

parent 5f8e9d94
No related branches found
No related tags found
No related merge requests found
...@@ -186,7 +186,7 @@ class OPENDHT_PUBLIC RevocationList ...@@ -186,7 +186,7 @@ class OPENDHT_PUBLIC RevocationList
public: public:
RevocationList(); RevocationList();
RevocationList(const Blob& b); RevocationList(const Blob& b);
RevocationList(RevocationList&& o) : crl(o.crl) { o.crl = nullptr; } RevocationList(RevocationList&& o) noexcept : crl(o.crl) { o.crl = nullptr; }
~RevocationList(); ~RevocationList();
RevocationList& operator=(RevocationList&& o) { crl = o.crl; o.crl = nullptr; return *this; } RevocationList& operator=(RevocationList&& o) { crl = o.crl; o.crl = nullptr; return *this; }
...@@ -500,7 +500,7 @@ struct OPENDHT_PUBLIC TrustList ...@@ -500,7 +500,7 @@ struct OPENDHT_PUBLIC TrustList
}; };
TrustList(); TrustList();
TrustList(TrustList&& o) : trust(std::move(o.trust)) { TrustList(TrustList&& o) noexcept : trust(std::move(o.trust)) {
o.trust = nullptr; o.trust = nullptr;
} }
TrustList& operator=(TrustList&& o); TrustList& operator=(TrustList&& o);
......
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
SockAddr(const SockAddr& o) { SockAddr(const SockAddr& o) {
set(o.get(), o.getLength()); set(o.get(), o.getLength());
} }
SockAddr(SockAddr&& o) : len(o.len), addr(std::move(o.addr)) { SockAddr(SockAddr&& o) noexcept : len(o.len), addr(std::move(o.addr)) {
o.len = 0; o.len = 0;
} }
......
...@@ -32,8 +32,8 @@ struct OpCacheValueStorage ...@@ -32,8 +32,8 @@ struct OpCacheValueStorage
class OpValueCache { class OpValueCache {
public: public:
OpValueCache(ValueCallback&& cb) : callback(std::forward<ValueCallback>(cb)) {} OpValueCache(ValueCallback&& cb) noexcept : callback(std::forward<ValueCallback>(cb)) {}
OpValueCache(OpValueCache&& o) : values(std::move(o.values)), callback(std::move(o.callback)) { OpValueCache(OpValueCache&& o) noexcept : values(std::move(o.values)), callback(std::move(o.callback)) {
o.callback = {}; o.callback = {};
} }
......
...@@ -34,7 +34,7 @@ public: ...@@ -34,7 +34,7 @@ public:
if (syncCallback) if (syncCallback)
syncCallback(ListenSyncStatus::ADDED); syncCallback(ListenSyncStatus::ADDED);
} }
ValueCache(ValueCache&& o) : values(std::move(o.values)), callback(std::move(o.callback)), syncCallback(std::move(o.syncCallback)) { ValueCache(ValueCache&& o) noexcept : values(std::move(o.values)), callback(std::move(o.callback)), syncCallback(std::move(o.syncCallback)) {
o.callback = {}; o.callback = {};
o.syncCallback = {}; o.syncCallback = {};
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment