File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -275,10 +275,9 @@ class simplecpp::TokenList::Stream {
275275 return ch;
276276 }
277277
278- unsigned char peekChar () {
279- const int pk = peek ();
280- auto ch = static_cast <unsigned char >(pk);
281- if (pk == EOF)
278+ int peekChar () {
279+ int ch = peek ();
280+ if (ch == EOF)
282281 return ch;
283282
284283 // For UTF-16 encoded files the BOM is 0xfeff/0xfffe. If the
@@ -288,7 +287,7 @@ class simplecpp::TokenList::Stream {
288287 const auto ch2 = static_cast <unsigned char >(peek ());
289288 unget ();
290289 const int ch16 = makeUtf16Char (ch, ch2);
291- ch = static_cast < unsigned char >((( ch16 >= 0x80 ) ? 0xff : ch16)) ;
290+ ch = ( ch16 >= 0x80 ) ? 0xff : ch16;
292291 }
293292
294293 // Handling of newlines..
@@ -601,7 +600,7 @@ std::string simplecpp::TokenList::stringify(bool linenrs) const
601600 return ret.str ();
602601}
603602
604- static bool isNameChar (unsigned char ch)
603+ static bool isNameChar (int ch)
605604{
606605 return std::isalnum (ch) || ch == ' _' || ch == ' $' ;
607606}
You can’t perform that action at this time.
0 commit comments