Skip to content

Commit edb7b86

Browse files
authored
avoid some redundant checks in TokenList::readfile() (#324)
1 parent dbae338 commit edb7b86

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

simplecpp.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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)