mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 09:09:19 +02:00
Replace starts_with and ends_with with string class methods
This commit is contained in:
@@ -190,7 +190,7 @@ sound_source::deserialize_mapping( cParser &Input ) {
|
||||
}
|
||||
m_soundproofing = soundproofing;
|
||||
}
|
||||
else if( starts_with( key, "sound" ) ) {
|
||||
else if( key.starts_with("sound") ) {
|
||||
// sound chunks, defined with key soundX where X = activation threshold
|
||||
auto const indexstart { key.find_first_of( "-1234567890" ) };
|
||||
auto const indexend { key.find_first_not_of( "-1234567890", indexstart ) };
|
||||
@@ -221,7 +221,7 @@ sound_source::deserialize_mapping( cParser &Input ) {
|
||||
Input.getToken<float>( false, "\n\r\t ,;" ),
|
||||
0.0f, 1.0f );
|
||||
}
|
||||
else if( starts_with( key, "pitch" ) ) {
|
||||
else if ( key.starts_with("pitch") ) {
|
||||
// sound chunk pitch, defined with key pitchX where X = activation threshold
|
||||
auto const indexstart { key.find_first_of( "-1234567890" ) };
|
||||
auto const indexend { key.find_first_not_of( "-1234567890", indexstart ) };
|
||||
|
||||
Reference in New Issue
Block a user