From 1d49dad22c59dab7b937ea2a685fb6c3d5a08b0f Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 15 Oct 2020 17:27:33 +0200 Subject: Fix warning, make sure temporary is moved into return value Seen on clang 12; might be a compiler bug, but doesn't hurt either. Change-Id: I4aba8406c99951106e57fe9e61c688e649963cd6 Reviewed-by: Lars Knoll --- src/corelib/text/qstringtokenizer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/corelib/text/qstringtokenizer.h b/src/corelib/text/qstringtokenizer.h index b4272ec069..d6944cbcae 100644 --- a/src/corelib/text/qstringtokenizer.h +++ b/src/corelib/text/qstringtokenizer.h @@ -337,7 +337,7 @@ public: { for (auto e : *this) c.emplace_back(e); - return c; + return std::move(c); } #ifdef Q_QDOC @@ -350,7 +350,7 @@ public: { for (auto e : *this) c.emplace_back(e); - return c; + return std::move(c); } }; -- cgit v1.2.3