diff --git a/simulation/traffic_simulator/include/traffic_simulator/api/configuration.hpp b/simulation/traffic_simulator/include/traffic_simulator/api/configuration.hpp index 2e2aa6fc990..4be810be98d 100644 --- a/simulation/traffic_simulator/include/traffic_simulator/api/configuration.hpp +++ b/simulation/traffic_simulator/include/traffic_simulator/api/configuration.hpp @@ -68,7 +68,7 @@ struct Configuration explicit Configuration( const Pathname & map_path, const Pathname & scenario_path, - const std::set auto_sink_entity_types = {}) + const std::set & auto_sink_entity_types = {}) : auto_sink_entity_types(auto_sink_entity_types), map_path(assertMapPath(map_path)), lanelet2_map_file(findLexicographicallyFirstFilenameOf(map_path, ".osm")), @@ -80,7 +80,7 @@ struct Configuration explicit Configuration( const Pathname & map_path, const Filename & lanelet2_map_file, const Pathname & scenario_path, - const std::set auto_sink_entity_types = {}) + const std::set & auto_sink_entity_types = {}) : auto_sink_entity_types(auto_sink_entity_types), map_path(assertMapPath(map_path)), lanelet2_map_file(lanelet2_map_file), diff --git a/simulation/traffic_simulator/include/traffic_simulator/lanelet_wrapper/traffic_rules.hpp b/simulation/traffic_simulator/include/traffic_simulator/lanelet_wrapper/traffic_rules.hpp index f96a3486a75..0ea608c2999 100644 --- a/simulation/traffic_simulator/include/traffic_simulator/lanelet_wrapper/traffic_rules.hpp +++ b/simulation/traffic_simulator/include/traffic_simulator/lanelet_wrapper/traffic_rules.hpp @@ -62,7 +62,7 @@ class GermanRoadShoulderPassableVehicle : public lanelet::traffic_rules::GermanV return {}; } - auto startsWith = [](const std::string & str, const std::string & substr) { + auto startsWith = [](std::string_view str, std::string_view substr) { return str.compare(0, substr.size(), substr) == 0; }; return lanelet::utils::anyOf(participants->second, [this, startsWith](auto & participant) {