diff --git a/libutils/include/utils/Vector.h b/libutils/include/utils/Vector.h index be35ea2f0..d5db3cb48 100644 --- a/libutils/include/utils/Vector.h +++ b/libutils/include/utils/Vector.h @@ -67,13 +67,10 @@ public: virtual ~Vector(); /*! copy operator */ - const Vector& operator = (const Vector& rhs) const; - Vector& operator = (const Vector& rhs); + Vector& operator=(const Vector& rhs); // NOLINT(cert-oop54-cpp) + Vector& operator=(const SortedVector& rhs); // NOLINT(cert-oop54-cpp) - const Vector& operator = (const SortedVector& rhs) const; - Vector& operator = (const SortedVector& rhs); - - /* + /* * empty the vector */ @@ -248,27 +245,18 @@ Vector::~Vector() { finish_vector(); } -template inline -Vector& Vector::operator = (const Vector& rhs) { - VectorImpl::operator = (rhs); +template +inline Vector& Vector::operator=(const Vector& rhs) // NOLINT(cert-oop54-cpp) +{ + VectorImpl::operator=(rhs); return *this; } -template inline -const Vector& Vector::operator = (const Vector& rhs) const { - VectorImpl::operator = (static_cast(rhs)); - return *this; -} - -template inline -Vector& Vector::operator = (const SortedVector& rhs) { - VectorImpl::operator = (static_cast(rhs)); - return *this; -} - -template inline -const Vector& Vector::operator = (const SortedVector& rhs) const { - VectorImpl::operator = (rhs); +template +inline Vector& Vector::operator=( + const SortedVector& rhs) // NOLINT(cert-oop54-cpp) +{ + VectorImpl::operator=(static_cast(rhs)); return *this; }