From 3f8d9327ff6abff6087d5fdcfdc4abd0af398fc3 Mon Sep 17 00:00:00 2001 From: VReaperV Date: Sun, 16 Jun 2024 15:29:52 +0300 Subject: [PATCH] Use find_first_not_of() --- src/engine/renderer/gl_shader.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/engine/renderer/gl_shader.cpp b/src/engine/renderer/gl_shader.cpp index ca2e99a304..3fd3cad4d8 100644 --- a/src/engine/renderer/gl_shader.cpp +++ b/src/engine/renderer/gl_shader.cpp @@ -836,11 +836,7 @@ std::string GLShaderManager::BuildGPUShaderText( Str::StringRef mainShaderNa continue; } - const std::string::iterator beginIt = std::find_if( line.begin(), line.end(), - []( unsigned char character ) { - return !std::isspace( character ); - } ); - if ( beginIt - line.begin() != int( position ) ) { // Signed/unsigned CI bullshit + if ( line.find_first_not_of( " \t" ) != position ) { shaderMain += line + "\n"; continue; }