summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringliteral.h
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2020-04-20 14:42:02 +0200
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2020-04-23 10:30:44 +0200
commit871e2981dde9836311bbc560f58805c4b0d61839 (patch)
tree733f52bfd2a3a1ef2f739131ee2a4d6aa906ec87 /src/corelib/text/qstringliteral.h
parent0c6b4dd4ad66d86d5a8dba998679ea53a563b685 (diff)
QStringLiteral: Remove const temporary that may prevent optimization
clang-tidy 10 was complaining about http://clang.llvm.org/extra/clang-tidy/checks/performance-no-automatic-move.html Change-Id: Iea5276e401a10f3ead8599e135dec1f0fa63a0dc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qstringliteral.h')
-rw-r--r--src/corelib/text/qstringliteral.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/text/qstringliteral.h b/src/corelib/text/qstringliteral.h
index 2a7e607c63..ab2a5f83f7 100644
--- a/src/corelib/text/qstringliteral.h
+++ b/src/corelib/text/qstringliteral.h
@@ -69,8 +69,7 @@ Q_STATIC_ASSERT_X(sizeof(qunicodechar) == 2,
Q_STATIC_STRING_DATA_HEADER_INITIALIZER(Size), \
QT_UNICODE_LITERAL(str) }; \
QStringDataPtr holder = { qstring_literal.data_ptr() }; \
- const QString qstring_literal_temp(holder); \
- return qstring_literal_temp; \
+ return QString(holder); \
}()) \
/**/