Skip to content

Commit 3c863e2

Browse files
authored
bumped simplecpp to 1.0.0 (#5616)
1 parent 099d96f commit 3c863e2

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

externals/simplecpp/simplecpp.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ static bool isOct(const std::string &s)
7979
return s.size()>1 && (s[0]=='0') && (s[1] >= '0') && (s[1] < '8');
8080
}
8181

82-
// TODO: added an underscore since this conflicts with a function of the same name in utils.h from Cppcheck source when building Cppcheck with MSBuild
82+
// TODO: added an undercore since this conflicts with a function of the same name in utils.h from Cppcheck source when building Cppcheck with MSBuild
8383
static bool isStringLiteral_(const std::string &s)
8484
{
8585
return s.size() > 1 && (s[0]=='\"') && (*s.rbegin()=='\"');
8686
}
8787

88-
// TODO: added an underscore since this conflicts with a function of the same name in utils.h from Cppcheck source when building Cppcheck with MSBuild
88+
// TODO: added an undercore since this conflicts with a function of the same name in utils.h from Cppcheck source when building Cppcheck with MSBuild
8989
static bool isCharLiteral_(const std::string &s)
9090
{
9191
// char literal patterns can include 'a', '\t', '\000', '\xff', 'abcd', and maybe ''
@@ -627,8 +627,6 @@ void simplecpp::TokenList::readfile(Stream &stream, const std::string &filename,
627627
unsigned char ch = stream.readChar();
628628
if (!stream.good())
629629
break;
630-
if (ch < ' ' && ch != '\t' && ch != '\n' && ch != '\r')
631-
ch = ' ';
632630

633631
if (ch >= 0x80) {
634632
if (outputList) {
@@ -694,7 +692,7 @@ void simplecpp::TokenList::readfile(Stream &stream, const std::string &filename,
694692
continue;
695693
}
696694

697-
if (std::isspace(ch)) {
695+
if (ch <= ' ') {
698696
location.col++;
699697
continue;
700698
}

0 commit comments

Comments
 (0)