From fe10420d237ce345a4be023aa5472e752815e48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 31 Mar 2019 07:49:43 +0200 Subject: [PATCH] Bump simplecpp --- externals/simplecpp/simplecpp.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/externals/simplecpp/simplecpp.cpp b/externals/simplecpp/simplecpp.cpp index 617710b58..2da0c4435 100644 --- a/externals/simplecpp/simplecpp.cpp +++ b/externals/simplecpp/simplecpp.cpp @@ -327,15 +327,6 @@ static void ungetChar(std::istream &istr, unsigned int bom) istr.unget(); } -static unsigned char prevChar(std::istream &istr, unsigned int bom) -{ - ungetChar(istr, bom); - ungetChar(istr, bom); - unsigned char c = readChar(istr, bom); - readChar(istr, bom); - return c; -} - static unsigned short getAndSkipBOM(std::istream &istr) { const int ch1 = istr.peek(); @@ -556,7 +547,8 @@ void simplecpp::TokenList::readfile(std::istream &istr, const std::string &filen // string / char literal else if (ch == '\"' || ch == '\'') { std::string prefix; - if (cback() && cback()->name && !std::isspace(prevChar(istr, bom)) && (isStringLiteralPrefix(cback()->str()))) { + if (cback() && cback()->name && isStringLiteralPrefix(cback()->str()) && + ((cback()->location.col + cback()->str().size()) == location.col)) { prefix = cback()->str(); } // C++11 raw string literal