From edf96b984d406cb7c00eb83f1b7e8588ac663c1f Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Fri, 9 Mar 2018 10:18:02 +0100 Subject: fixup oversight in rvalue overloads of operator+=() and operator<<() ammends 4dee5446bee9c7417bf6f5dc44294a0b7238a9ba Change-Id: Ia0ca27644eb71815a93d6e76681b8a9e61a4e7ab Reviewed-by: Allan Sandfeld Jensen --- src/corelib/tools/qvarlengtharray.h | 4 ++-- src/corelib/tools/qvector.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h index bc22ea26f6..a6bd7847a5 100644 --- a/src/corelib/tools/qvarlengtharray.h +++ b/src/corelib/tools/qvarlengtharray.h @@ -176,11 +176,11 @@ public: inline QVarLengthArray &operator<<(const T &t) { append(t); return *this; } inline QVarLengthArray &operator<<(T &&t) - { append(t); return *this; } + { append(std::move(t)); return *this; } inline QVarLengthArray &operator+=(const T &t) { append(t); return *this; } inline QVarLengthArray &operator+=(T &&t) - { append(t); return *this; } + { append(std::move(t)); return *this; } void prepend(T &&t); void prepend(const T &t); diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index e4c7fd06d8..345ba4b097 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -284,9 +284,9 @@ public: inline QVector &operator<<(const QVector &l) { *this += l; return *this; } inline QVector &operator+=(T &&t) - { append(t); return *this; } + { append(std::move(t)); return *this; } inline QVector &operator<<(T &&t) - { append(t); return *this; } + { append(std::move(t)); return *this; } QList toList() const; -- cgit v1.2.3