summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-03-21 14:26:48 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-26 05:06:17 +0100
commit470f92167f64b4cc39fa43952829ed10d028986b (patch)
tree48aac11fcdb6bce94a3ddbf2bdfc710b0c6c0c1d /src/tools
parentfff8b698ab50d84a9b3e37f087b075ea495b66c9 (diff)
Silence warning by Apple Clang 4.2 about adding an integer to a string
It gives a good suggestion on what to do and even shows us how to do it. doc.cpp:2681:34: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] result += " " + (column % tabSize); ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ doc.cpp:2681:34: note: use array indexing to silence this warning result += " " + (column % tabSize); ^ & [ ] Change-Id: Idd2157ab04cd2a3e37a1336bb5e8926ddc14823a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/qdoc/doc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp
index e20e85028f..12056502d5 100644
--- a/src/tools/qdoc/doc.cpp
+++ b/src/tools/qdoc/doc.cpp
@@ -2678,7 +2678,7 @@ QString DocParser::untabifyEtc(const QString& str)
if (c == QLatin1Char('\r'))
continue;
if (c == QLatin1Char('\t')) {
- result += " " + (column % tabSize);
+ result += &" "[column % tabSize];
column = ((column / tabSize) + 1) * tabSize;
continue;
}