Skip to content

Commit

Permalink
Use find_first_not_of()
Browse files Browse the repository at this point in the history
  • Loading branch information
VReaperV committed Jun 16, 2024
1 parent 655fee2 commit 3f8d932
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/engine/renderer/gl_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3f8d932

Please sign in to comment.