diff options
author | Tom Tsou <tom.tsou@ettus.com> | 2017-06-16 10:21:16 -0700 |
---|---|---|
committer | Tom Tsou <tom@tsou.cc> | 2017-06-19 17:02:41 +0000 |
commit | 87d158cc2d8768355855e2de365c39ece3980250 (patch) | |
tree | 0086f362fc86617875b709804105e99dec518586 /CommonLibs/Vector.h | |
parent | 7278a87767b03e07dc608f6fa1752665a66f917b (diff) |
common: Declare explicit Vector move constructor
Vector class already has a semantically odd non-const copy
constructor that serves the same function as a C++11 move
constructor. Make the move constructor semantics explicit
and address Coverity at the same time.
Change-Id: I22e0099abe601b0c59beee808f7560837c6977dd
Fixes: Coverity CID 170738
Diffstat (limited to 'CommonLibs/Vector.h')
-rw-r--r-- | CommonLibs/Vector.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CommonLibs/Vector.h b/CommonLibs/Vector.h index eae674b..15d6710 100644 --- a/CommonLibs/Vector.h +++ b/CommonLibs/Vector.h @@ -118,8 +118,8 @@ template <class T> class Vector { /** Build an empty Vector of a given size. */ Vector(size_t wSize=0):mData(NULL) { resize(wSize); } - /** Build a Vector by shifting the data block. */ - Vector(Vector<T>& other) + /** Build a Vector by moving another. */ + Vector(Vector<T>&& other) :mData(other.mData),mStart(other.mStart),mEnd(other.mEnd) { other.mData=NULL; } |