From f6f4116389fc4dc5375b806392377e0e5c39e663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 9 Oct 2018 21:17:38 +0200 Subject: [PATCH] bump simplecpp --- externals/simplecpp/simplecpp.cpp | 2 +- externals/simplecpp/simplecpp.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/externals/simplecpp/simplecpp.cpp b/externals/simplecpp/simplecpp.cpp index 772aed07d..5d92006e2 100644 --- a/externals/simplecpp/simplecpp.cpp +++ b/externals/simplecpp/simplecpp.cpp @@ -1089,7 +1089,7 @@ std::string simplecpp::TokenList::lastLine(int maxsize) const if (!ret.empty()) ret = ' ' + ret; ret = (tok->str()[0] == '\"' ? std::string("%str%") - : std::isdigit(static_cast(tok->str()[0])) ? std::string("%num%") : tok->str()) + ret; + : tok->number ? std::string("%num%") : tok->str()) + ret; if (++count > maxsize) return ""; } diff --git a/externals/simplecpp/simplecpp.h b/externals/simplecpp/simplecpp.h index df1d4d2fe..b4bce4c1d 100644 --- a/externals/simplecpp/simplecpp.h +++ b/externals/simplecpp/simplecpp.h @@ -113,7 +113,9 @@ namespace simplecpp { op = (string.size() == 1U) ? string[0] : '\0'; } - const TokenString& str() const { return string; } + const TokenString& str() const { + return string; + } void setstr(const std::string &s) { string = s; flags(); @@ -258,7 +260,7 @@ namespace simplecpp { std::string readUntil(std::istream &istr, const Location &location, const char start, const char end, OutputList *outputList); - std::string lastLine(int maxsize=10) const; + std::string lastLine(int maxsize=100000) const; unsigned int fileIndex(const std::string &filename);