소스 검색

Remove use of `std::string` in test

Avoiding using the standard library here
Ninni Pipping 2 년 전
부모
커밋
6ca1432daf
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  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) {
-	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.