summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/store/store.hxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/store/store.hxx b/include/store/store.hxx
index 1aa19b58825f..672b2196dc5e 100644
--- a/include/store/store.hxx
+++ b/include/store/store.hxx
@@ -156,6 +156,14 @@ public:
(void) store_acquireHandle (m_hImpl);
}
+ /** Move construction.
+ */
+ inline OStoreDirectory (OStoreDirectory && rhs)
+ : m_hImpl (rhs.m_hImpl)
+ {
+ rhs.m_hImpl = nullptr;
+ }
+
/** Assignment.
*/
inline OStoreDirectory & operator= (OStoreDirectory const & rhs)
@@ -168,6 +176,17 @@ public:
return *this;
}
+ /** Move assignment.
+ */
+ inline OStoreDirectory & operator= (OStoreDirectory && rhs)
+ {
+ if (m_hImpl)
+ (void) store_releaseHandle (m_hImpl);
+ m_hImpl = rhs.m_hImpl;
+ rhs.m_hImpl = nullptr;
+ return *this;
+ }
+
/** Open the directory.
@see store_openDirectory()
*/