diff options
author | Jędrzej Nowacki <jedrzej.nowacki@digia.com> | 2014-07-28 10:20:25 +0200 |
---|---|---|
committer | Jędrzej Nowacki <jedrzej.nowacki@digia.com> | 2014-08-07 15:54:03 +0200 |
commit | 2f1ab7156ad50b1cd4c50708ae0f6e5529ce9974 (patch) | |
tree | 1a33efae60e2f860ffe877e6ab31cd78c9155cf0 | |
parent | 8b7a2d582c4c3030c48c799a4384a62be8f605b0 (diff) |
Micro-optimize qdoc codeparser.
There is no need to allocate new string while a simple reference is
enough.
Change-Id: I137b58fc180fe9a7bff9d0f9e546ca04aa9f4696
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
-rw-r--r-- | src/tools/qdoc/codeparser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/qdoc/codeparser.cpp b/src/tools/qdoc/codeparser.cpp index e25056e353..3b0a650a74 100644 --- a/src/tools/qdoc/codeparser.cpp +++ b/src/tools/qdoc/codeparser.cpp @@ -340,8 +340,8 @@ void CodeParser::extractPageLinkAndDesc(const QString& arg, else { int spaceAt = arg.indexOf(QLatin1Char(' ')); if (arg.contains(QLatin1String(".html")) && spaceAt != -1) { - *link = arg.left(spaceAt).trimmed(); - *desc = arg.mid(spaceAt).trimmed(); + *link = arg.leftRef(spaceAt).trimmed().toString(); + *desc = arg.midRef(spaceAt).trimmed().toString(); } else { *link = arg; |