We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b75310 commit 8a984d8Copy full SHA for 8a984d8
src/OrcLib/Utils/Guard.h
@@ -83,7 +83,7 @@ class PointerGuard
83
PointerGuard& operator=(const PointerGuard&) = delete;
84
PointerGuard(const PointerGuard&) = delete;
85
86
- PointerGuard(PointerGuard&& o)
+ PointerGuard(PointerGuard&& o) noexcept
87
{
88
m_data = o.m_data;
89
o.m_data = nullptr;
@@ -106,6 +106,17 @@ class PointerGuard
106
107
T* operator->() const noexcept { return m_data; }
108
109
+ PointerGuard& operator=(PointerGuard&& o) noexcept
110
+ {
111
+ if (this != &o)
112
113
+ m_data = o.m_data;
114
+ o.m_data = nullptr;
115
+ }
116
+
117
+ return *this;
118
119
120
protected:
121
T* m_data;
122
};
0 commit comments