diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-08-13 20:53:32 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-09-12 10:00:30 +0200 |
commit | 2ad5d62f11a1823f2a7ddb13f0b0351acf4b86dc (patch) | |
tree | 45ec941cc2dab2b0b8cd5d60775efec944a2dd85 /src/corelib/tools/qstring.cpp | |
parent | b53bf377a90e3964936890a1cc8f45d724554863 (diff) |
Micro-optimize qt_section_chunk ctor
Use C++11 move semantics, and the ctor-init-list.
Change-Id: I1a5faa83ef552e8d98ce994edf967770a73cab0e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index e7bad15b5d..48e336055b 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -3966,7 +3966,7 @@ QString QString::section(const QString &sep, int start, int end, SectionFlags fl class qt_section_chunk { public: qt_section_chunk() {} - qt_section_chunk(int l, QString s) { length = l; string = s; } + qt_section_chunk(int l, QString s) : length(l), string(qMove(s)) {} int length; QString string; }; |