summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-12-04 22:04:08 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-07 19:49:05 +0100
commit5357ec65cd4857552b617596794018ce61cfe44c (patch)
tree11463114cf846d944ab8ac90860ae3567dccbdc3
parent81ef9e8428382524dd35626cb1087e57768c9f32 (diff)
don't reset yyWord right away
there is no point in doing that - all tokens that actually "fill" the word, calculate the size "from scratch" anyway. not resetting it potentially allows us to use the word after reading further tokens. though comments between the tokens would mess things up ... Change-Id: I27f16444a0a94e3abb37dcf15f2cc788ebe63c7c Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
-rw-r--r--src/linguist/lupdate/cpp.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/linguist/lupdate/cpp.cpp b/src/linguist/lupdate/cpp.cpp
index 66659a28f..aa32cda43 100644
--- a/src/linguist/lupdate/cpp.cpp
+++ b/src/linguist/lupdate/cpp.cpp
@@ -471,7 +471,6 @@ bool CppParser::getMacroArgs()
{
// Failing this assertion would mean losing the preallocated buffer.
Q_ASSERT(yyWord.isDetached());
- yyWord.resize(0);
while (isspace(yyCh))
yyCh = getChar();
@@ -514,7 +513,6 @@ CppParser::TokenType CppParser::getToken()
restart:
// Failing this assertion would mean losing the preallocated buffer.
Q_ASSERT(yyWord.isDetached());
- yyWord.resize(0);
while (yyCh != EOF) {
yyLineNo = yyCurLineNo;