Browse Source

Remove use of `std::string` in test

Avoiding using the standard library here
Ninni Pipping 2 years ago
parent
commit
6ca1432daf
1 changed files with 1 additions and 2 deletions
  1. 1 2
      tests/servers/rendering/test_shader_preprocessor.h

+ 1 - 2
tests/servers/rendering/test_shader_preprocessor.h

@@ -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 operators.find(c) != std::string::npos;
+	return (c == '*') || (c == '+') || (c == '-') || (c == '/') || ((c >= '<') && (c <= '>'));
 }
 }
 
 
 // Remove unnecessary spaces from a line.
 // Remove unnecessary spaces from a line.