Kaydet (Commit) 2bd18402 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

cid#1371306: Add move semantics

Change-Id: Id669a84742cc4ffa3bb9f225af7fa4d218999681
üst f0f60075
......@@ -90,12 +90,24 @@ public:
/// Copy constructor
inline Registry(const Registry& toCopy);
Registry(Registry && other): m_pApi(other.m_pApi), m_hImpl(other.m_hImpl)
{ other.m_hImpl = nullptr; }
/// Destructor. The Destructor close the registry if it is open.
inline ~Registry();
/// Assign operator
inline Registry& operator = (const Registry& toAssign);
Registry & operator =(Registry && other) {
if (m_hImpl != nullptr) {
m_pApi->release(m_hImpl);
}
m_hImpl = other.m_hImpl;
other.m_hImpl = nullptr;
return *this;
}
/// checks if the registry points to a valid registry data file.
inline bool isValid() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment