From bd45c71d8d742753db975ef648458b9e5b30b150 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Thu, 24 Dec 2015 10:16:58 +0300 Subject: [PATCH] No need to clear empty strings --- lib/tokenlist.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index f942bdaf1..2fdb72d9d 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -236,8 +236,8 @@ bool TokenList::createTokens(std::istream &code, const std::string& file0) if (!CurrentToken.empty()) { addtoken(CurrentToken, lineno, FileIndex, true); _back->isExpandedMacro(expandedMacro); + CurrentToken.clear(); } - CurrentToken.clear(); expandedMacro = true; continue; } @@ -352,10 +352,9 @@ bool TokenList::createTokens(std::istream &code, const std::string& file0) if (!CurrentToken.empty()) { _back->isExpandedMacro(expandedMacro); expandedMacro = false; + CurrentToken.clear(); } - CurrentToken.clear(); - if (ch == '\n') { if (_settings->terminated()) return false;