Skip to content

Commit

Permalink
avoid some redundant checks in TokenList::readfile() (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave authored Oct 8, 2023
1 parent dbae338 commit edb7b86
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions simplecpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,6 @@ void simplecpp::TokenList::readfile(Stream &stream, const std::string &filename,
unsigned char ch = stream.readChar();
if (!stream.good())
break;
if (ch < ' ' && ch != '\t' && ch != '\n' && ch != '\r')
ch = ' ';

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

if (std::isspace(ch)) {
if (ch <= ' ') {
location.col++;
continue;
}
Expand Down

0 comments on commit edb7b86

Please sign in to comment.