We do not want to cast every signed char to unsigned when passing to isspace, so we implement the replacement. Shall work for Unicode too. If chars are signed, conversion from char to int could generate negative values, resulting in undefined behavior in standard isspace.
| 181 | // If chars are signed, conversion from char to int could generate negative |
| 182 | // values, resulting in undefined behavior in standard isspace. |
| 183 | bool IsSpace(int ch) |
| 184 | { |
| 185 | return ch==' ' || ch=='\t'; |
| 186 | } |
| 187 | |
| 188 | |
| 189 | // We do not want to cast every signed char to unsigned when passing to |
no outgoing calls
no test coverage detected