From 5357ec65cd4857552b617596794018ce61cfe44c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 4 Dec 2013 22:04:08 +0100 Subject: 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 Reviewed-by: Oswald Buddenhagen --- src/linguist/lupdate/cpp.cpp | 2 -- 1 file changed, 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; -- cgit v1.2.3