From 5ec57560c0b497f9f48671dd200bb23d1f6eac35 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Wed, 29 Mar 2017 07:10:46 +0300 Subject: Prefer rvalue versions of toLatin() and toUtf8() ... to re-use existing buffers. Change-Id: I7c42529b8cd4400520a59e658ab76f4f8e965cd4 Reviewed-by: Thiago Macieira --- src/corelib/tools/qtimezoneprivate_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools/qtimezoneprivate_win.cpp') diff --git a/src/corelib/tools/qtimezoneprivate_win.cpp b/src/corelib/tools/qtimezoneprivate_win.cpp index 16dfaefb74..f963e10333 100644 --- a/src/corelib/tools/qtimezoneprivate_win.cpp +++ b/src/corelib/tools/qtimezoneprivate_win.cpp @@ -299,7 +299,7 @@ static QByteArray windowsSystemZoneId() id = readRegistryString(key, L"TimeZoneKeyName"); RegCloseKey(key); if (!id.isEmpty()) - return id.toUtf8(); + return std::move(id).toUtf8(); } // On XP we have to iterate over the zones until we find a match on -- cgit v1.2.3