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 22, 2024
1 parent 77ed763 commit 689923e
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 689923e

Please sign in to comment.