mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-03 21:12:07 +01:00
refactor(sonar): use try_emplace for map insertion (cpp:S6030)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -278,7 +278,7 @@ TGauge::Load_mapping( cParser &Input, TGauge::scratch_data &Scratchpad ) {
|
||||
auto const indexstart { key.find_first_of( "-1234567890" ) };
|
||||
auto const indexend { key.find_first_not_of( "-1234567890", indexstart ) };
|
||||
if( indexstart != std::string::npos ) {
|
||||
m_soundfxvalues.emplace(
|
||||
m_soundfxvalues.try_emplace(
|
||||
std::stoi( key.substr( indexstart, indexend - indexstart ) ),
|
||||
sound_source( m_soundtemplate ).deserialize( Input, sound_type::single ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user