Remove use of `std::string` in test

Avoiding using the standard library here
This commit is contained in:
Ninni Pipping 2023-08-08 17:51:55 +02:00
parent f7bc653cbe
commit 6ca1432daf
1 changed files with 1 additions and 2 deletions

View File

@ -52,8 +52,7 @@ bool is_variable_char(unsigned char c) {
}
bool is_operator_char(unsigned char c) {
static const std::string operators = "<>=+-*/";
return operators.find(c) != std::string::npos;
return (c == '*') || (c == '+') || (c == '-') || (c == '/') || ((c >= '<') && (c <= '>'));
}
// Remove unnecessary spaces from a line.