Remove use of `std::string` in test
Avoiding using the standard library here
This commit is contained in:
parent
f7bc653cbe
commit
6ca1432daf
|
@ -52,8 +52,7 @@ bool is_variable_char(unsigned char c) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_operator_char(unsigned char c) {
|
bool is_operator_char(unsigned char c) {
|
||||||
static const std::string operators = "<>=+-*/";
|
return (c == '*') || (c == '+') || (c == '-') || (c == '/') || ((c >= '<') && (c <= '>'));
|
||||||
return operators.find(c) != std::string::npos;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove unnecessary spaces from a line.
|
// Remove unnecessary spaces from a line.
|
||||||
|
|
Loading…
Reference in New Issue