From 6ca1432daf8e8593747e94f4ca2c98a76f2ca660 Mon Sep 17 00:00:00 2001 From: Ninni Pipping Date: Tue, 8 Aug 2023 17:51:55 +0200 Subject: [PATCH] Remove use of `std::string` in test Avoiding using the standard library here --- tests/servers/rendering/test_shader_preprocessor.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/servers/rendering/test_shader_preprocessor.h b/tests/servers/rendering/test_shader_preprocessor.h index 41a009ccf59..d65eb522e8f 100644 --- a/tests/servers/rendering/test_shader_preprocessor.h +++ b/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.