From 87d158cc2d8768355855e2de365c39ece3980250 Mon Sep 17 00:00:00 2001 From: Tom Tsou Date: Fri, 16 Jun 2017 10:21:16 -0700 Subject: 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 --- CommonLibs/Vector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CommonLibs') 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 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& other) + /** Build a Vector by moving another. */ + Vector(Vector&& other) :mData(other.mData),mStart(other.mStart),mEnd(other.mEnd) { other.mData=NULL; } -- cgit v1.2.3