mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 08:39:19 +02:00
refactor(sonar): use transparent comparators for string-keyed maps (cpp:S6045)
std::unordered_map instances and map types exposed in headers used by other modules are left as they are.
This commit is contained in:
@@ -235,7 +235,7 @@ sound_source::deserialize_mapping( cParser &Input ) {
|
||||
else if( key == "placement:" ) {
|
||||
using enum sound_placement;
|
||||
auto const value { Input.getToken<std::string>( true, "\n\r\t ,;" ) };
|
||||
std::map<std::string, sound_placement> const placements {
|
||||
std::map<std::string, sound_placement, std::less<>> const placements {
|
||||
{ "internal", internal },
|
||||
{ "engine", engine },
|
||||
{ "external", external },
|
||||
@@ -256,7 +256,7 @@ sound_source::deserialize_mapping( cParser &Input ) {
|
||||
}
|
||||
else {
|
||||
// floating point properties
|
||||
std::map<std::string, float &> const properties {
|
||||
std::map<std::string, float &, std::less<>> const properties {
|
||||
{ "frequencyfactor:", m_frequencyfactor },
|
||||
{ "frequencyoffset:", m_frequencyoffset },
|
||||
{ "amplitudefactor:", m_amplitudefactor },
|
||||
|
||||
Reference in New Issue
Block a user