mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
maintenance: string search methods
This commit is contained in:
@@ -1141,8 +1141,9 @@ texture_manager::unit( GLint const Textureunit ) {
|
||||
texture_handle
|
||||
texture_manager::create( std::string Filename, bool const Loadnow, GLint Formathint ) {
|
||||
|
||||
if( Filename.find( '|' ) != std::string::npos )
|
||||
if( contains( Filename, '|' ) ) {
|
||||
Filename.erase( Filename.find( '|' ) ); // po | może być nazwa kolejnej tekstury
|
||||
}
|
||||
|
||||
std::pair<std::string, std::string> locator; // resource name, resource type
|
||||
std::string traits;
|
||||
@@ -1181,8 +1182,8 @@ texture_manager::create( std::string Filename, bool const Loadnow, GLint Formath
|
||||
replace_slashes( Filename );
|
||||
erase_leading_slashes( Filename );
|
||||
// temporary code for legacy assets -- textures with names beginning with # are to be sharpened
|
||||
if( ( Filename.front() == '#' )
|
||||
|| ( Filename.find( "/#" ) != std::string::npos ) ) {
|
||||
if( ( starts_with( Filename, "#" ) )
|
||||
|| ( contains( Filename, "/#" ) ) ) {
|
||||
traits += '#';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user