From b3c3d15e448e33c670ffa4f6849dca27919e666c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 31 Jul 2013 10:43:32 +0200 Subject: [PATCH] don't claim that single slashes are comments Change-Id: Iae5c66ebebe580595a16caa765eeee9f5e97f2c4 Reviewed-by: hjk Reviewed-by: Oswald Buddenhagen --- src/linguist/lupdate/cpp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/linguist/lupdate/cpp.cpp b/src/linguist/lupdate/cpp.cpp index 37547bd..3df17dc 100644 --- a/src/linguist/lupdate/cpp.cpp +++ b/src/linguist/lupdate/cpp.cpp @@ -832,6 +832,7 @@ uint CppParser::getToken() *ptr++ = yyCh; } while (yyCh != '\n'); yyWord.resize(ptr - (ushort *)yyWord.unicode()); + return Tok_Comment; } else if (yyCh == '*') { bool metAster = false; ushort *ptr = (ushort *)yyWord.unicode() + yyWord.length(); @@ -854,8 +855,9 @@ uint CppParser::getToken() yyWord.resize(ptr - (ushort *)yyWord.unicode() - 2); yyCh = getChar(); + return Tok_Comment; } - return Tok_Comment; + break; case '"': { ushort *ptr = (ushort *)yyWord.unicode() + yyWord.length(); yyCh = getChar(); -- 2.7.4