diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-12 11:11:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-12 14:22:48 +0100 |
commit | 9f3906f1f0c860449b452871f7cb19b77a508eb5 (patch) | |
tree | daeb782723fdb5df476ebae0ce8b2790d1420835 /o3tl | |
parent | 1d7dd96e313dd23ca8d49abf879d51db448f76ee (diff) |
coverity#1371178 Missing move assignment operator
Change-Id: Ib7df699269bcacd5dbf64662c47b538aee9235a5
Diffstat (limited to 'o3tl')
-rw-r--r-- | o3tl/qa/cow_wrapper_clients.cxx | 24 | ||||
-rw-r--r-- | o3tl/qa/cow_wrapper_clients.hxx | 4 |
2 files changed, 28 insertions, 0 deletions
diff --git a/o3tl/qa/cow_wrapper_clients.cxx b/o3tl/qa/cow_wrapper_clients.cxx index 959bddf93413..1ede35a2805d 100644 --- a/o3tl/qa/cow_wrapper_clients.cxx +++ b/o3tl/qa/cow_wrapper_clients.cxx @@ -56,6 +56,11 @@ cow_wrapper_client2::cow_wrapper_client2( const cow_wrapper_client2& rSrc ) : { } +cow_wrapper_client2::cow_wrapper_client2( cow_wrapper_client2&& rSrc ) : + maImpl( std::move( rSrc.maImpl ) ) +{ +} + cow_wrapper_client2& cow_wrapper_client2::operator=( const cow_wrapper_client2& rSrc ) { maImpl = rSrc.maImpl; @@ -63,6 +68,13 @@ cow_wrapper_client2& cow_wrapper_client2::operator=( const cow_wrapper_client2& return *this; } +cow_wrapper_client2& cow_wrapper_client2::operator=( cow_wrapper_client2&& rSrc ) +{ + maImpl = std::move(rSrc.maImpl); + + return *this; +} + void cow_wrapper_client2::modify( int nVal ) { maImpl->setValue( nVal ); @@ -122,6 +134,11 @@ cow_wrapper_client3::cow_wrapper_client3( const cow_wrapper_client3& rSrc ) : { } +cow_wrapper_client3::cow_wrapper_client3( cow_wrapper_client3&& rSrc ) : + maImpl( std::move( rSrc.maImpl ) ) +{ +} + cow_wrapper_client3& cow_wrapper_client3::operator=( const cow_wrapper_client3& rSrc ) { maImpl = rSrc.maImpl; @@ -129,6 +146,13 @@ cow_wrapper_client3& cow_wrapper_client3::operator=( const cow_wrapper_client3& return *this; } +cow_wrapper_client3& cow_wrapper_client3::operator=( cow_wrapper_client3&& rSrc ) +{ + maImpl = std::move(rSrc.maImpl); + + return *this; +} + void cow_wrapper_client3::modify( int nVal ) { maImpl->setValue( nVal ); diff --git a/o3tl/qa/cow_wrapper_clients.hxx b/o3tl/qa/cow_wrapper_clients.hxx index 48b745a93564..138f496a773e 100644 --- a/o3tl/qa/cow_wrapper_clients.hxx +++ b/o3tl/qa/cow_wrapper_clients.hxx @@ -69,7 +69,9 @@ public: ~cow_wrapper_client2(); cow_wrapper_client2( const cow_wrapper_client2& ); + cow_wrapper_client2( cow_wrapper_client2&& ); cow_wrapper_client2& operator=( const cow_wrapper_client2& ); + cow_wrapper_client2& operator=( cow_wrapper_client2&& ); void modify( int nVal ); int queryUnmodified() const; @@ -98,7 +100,9 @@ public: ~cow_wrapper_client3(); cow_wrapper_client3( const cow_wrapper_client3& ); + cow_wrapper_client3( cow_wrapper_client3&& ); cow_wrapper_client3& operator=( const cow_wrapper_client3& ); + cow_wrapper_client3& operator=( cow_wrapper_client3&& ); void modify( int nVal ); int queryUnmodified() const; |