mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-31 02:00:28 +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:
@@ -52,11 +52,11 @@ void control_mapper::insert(TGauge const &Gauge, std::string const &Label)
|
||||
|
||||
if (Gauge.SubModel != nullptr)
|
||||
{
|
||||
m_controlnames.emplace(Gauge.SubModel, Label);
|
||||
m_controlnames.try_emplace(Gauge.SubModel, Label);
|
||||
}
|
||||
if (Gauge.SubModelOn != nullptr)
|
||||
{
|
||||
m_controlnames.emplace(Gauge.SubModelOn, Label);
|
||||
m_controlnames.try_emplace(Gauge.SubModelOn, Label);
|
||||
}
|
||||
|
||||
m_names.emplace(Label);
|
||||
|
||||
Reference in New Issue
Block a user