diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-25 14:40:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-29 09:23:46 +0200 |
commit | 6380dde50f2f7c2e93c3ef3a1c88254cd3760d7f (patch) | |
tree | f1124d1752aa36678c9654e9ee9928e813e54e28 | |
parent | 82ca8bf77c7ea4ea9f5604235cbab012532e4494 (diff) |
cid#1371209 Missing move assignment operator
Change-Id: Ib383d2a12ac13a78f4ecf6817379ebbe0dc83194
-rw-r--r-- | include/store/store.hxx | 19 |
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() */ |