summaryrefslogtreecommitdiffstats
path: root/src/corelib/arch/qatomic_cxx11.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-07-12 12:37:16 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-07-13 06:33:07 +0000
commit5c46d07a7ce1542301b6e428f9f8d07738e7518f (patch)
tree7a650b0895d5c812f282b0d199a93dd736b5fd94 /src/corelib/arch/qatomic_cxx11.h
parent49f9328175fe42d00c6e15a8599b1a912bb9863d (diff)
Optimize QString::insert()
When the insertion position is not beyond end(), call resize() instead of expand(), which fills the new size with spaces, which, however would just be overwritten by the following memmove(). Add some Q_UNLIKELY to indicate that we strongly expect the resize() case to be the more common. Change-Id: Iaf3215dd53c2cbd18f2fd8a5f80af8f6844944da Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/arch/qatomic_cxx11.h')
0 files changed, 0 insertions, 0 deletions