diff --git a/routing_common/bicycle_model.cpp b/routing_common/bicycle_model.cpp index 8ab96c3c5a8..00e9a432731 100644 --- a/routing_common/bicycle_model.cpp +++ b/routing_common/bicycle_model.cpp @@ -7,6 +7,8 @@ #include "indexer/classificator.hpp" #include "indexer/feature.hpp" +using namespace routing; + namespace { @@ -49,7 +51,7 @@ double constexpr kSpeedPlatformKMpH = 3.0; double constexpr kSpeedPierKMpH = 7.0; // Default -routing::VehicleModel::InitListT const g_bicycleLimitsDefault = +VehicleModel::InitListT const g_bicycleLimitsDefault = { { {"highway", "trunk"}, kSpeedTrunkKMpH, true /* transitAllowed */ }, { {"highway", "trunk_link"}, kSpeedTrunkLinkKMpH, true }, @@ -72,7 +74,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsDefault = }; // All options available. -routing::VehicleModel::InitListT const g_bicycleLimitsAll = +VehicleModel::InitListT const g_bicycleLimitsAll = { { {"highway", "trunk"}, kSpeedTrunkKMpH, true }, { {"highway", "trunk_link"}, kSpeedTrunkLinkKMpH, true }, @@ -98,7 +100,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsAll = }; // Same as defaults except trunk and trunk_link are not allowed -routing::VehicleModel::InitListT const g_bicycleLimitsNoTrunk = +VehicleModel::InitListT const g_bicycleLimitsNoTrunk = { { {"highway", "primary"}, kSpeedPrimaryKMpH, true }, { {"highway", "primary_link"}, kSpeedPrimaryLinkKMpH, true }, @@ -119,7 +121,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsNoTrunk = }; // Same as defaults except pedestrian is allowed -routing::VehicleModel::InitListT const g_bicycleLimitsPedestrianAllowed = +VehicleModel::InitListT const g_bicycleLimitsPedestrianAllowed = { { {"highway", "trunk"}, kSpeedTrunkKMpH, true }, { {"highway", "trunk_link"}, kSpeedTrunkLinkKMpH, true }, @@ -143,7 +145,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsPedestrianAllowed = }; // Same as defaults except bridleway is allowed -routing::VehicleModel::InitListT const g_bicycleLimitsBridlewayAllowed = +VehicleModel::InitListT const g_bicycleLimitsBridlewayAllowed = { { {"highway", "trunk"}, kSpeedTrunkKMpH, true }, { {"highway", "trunk_link"}, kSpeedTrunkLinkKMpH, true }, @@ -167,10 +169,10 @@ routing::VehicleModel::InitListT const g_bicycleLimitsBridlewayAllowed = }; // Australia -routing::VehicleModel::InitListT const g_bicycleLimitsAustralia = g_bicycleLimitsAll; +VehicleModel::InitListT const g_bicycleLimitsAustralia = g_bicycleLimitsAll; // Austria -routing::VehicleModel::InitListT const g_bicycleLimitsAustria = +VehicleModel::InitListT const g_bicycleLimitsAustria = { // No trunk, trunk_link, path { {"highway", "primary"}, kSpeedPrimaryKMpH, true }, @@ -191,7 +193,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsAustria = }; // Belarus -routing::VehicleModel::InitListT const g_bicycleLimitsBelarus = +VehicleModel::InitListT const g_bicycleLimitsBelarus = { // Footway and pedestrian are allowed { {"highway", "trunk"}, kSpeedTrunkKMpH, true }, @@ -217,7 +219,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsBelarus = }; // Belgium -routing::VehicleModel::InitListT const g_bicycleLimitsBelgium = +VehicleModel::InitListT const g_bicycleLimitsBelgium = { // No trunk, trunk_link // Pedestrian is allowed @@ -241,7 +243,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsBelgium = }; // Brazil -routing::VehicleModel::InitListT const g_bicycleLimitsBrazil = +VehicleModel::InitListT const g_bicycleLimitsBrazil = { // Bridleway and fotway are allowed { {"highway", "trunk"}, kSpeedTrunkKMpH, true }, @@ -267,10 +269,10 @@ routing::VehicleModel::InitListT const g_bicycleLimitsBrazil = }; // Denmark -routing::VehicleModel::InitListT const g_bicycleLimitsDenmark = g_bicycleLimitsNoTrunk; +VehicleModel::InitListT const g_bicycleLimitsDenmark = g_bicycleLimitsNoTrunk; // France -routing::VehicleModel::InitListT const g_bicycleLimitsFrance = +VehicleModel::InitListT const g_bicycleLimitsFrance = { // No trunk, trunk_link // Pedestrian is allowed @@ -294,34 +296,34 @@ routing::VehicleModel::InitListT const g_bicycleLimitsFrance = }; // Finland -routing::VehicleModel::InitListT const g_bicycleLimitsFinland = g_bicycleLimitsPedestrianAllowed; +VehicleModel::InitListT const g_bicycleLimitsFinland = g_bicycleLimitsPedestrianAllowed; // Germany -routing::VehicleModel::InitListT const g_bicycleLimitsGermany = g_bicycleLimitsDefault; +VehicleModel::InitListT const g_bicycleLimitsGermany = g_bicycleLimitsDefault; // Hungary -routing::VehicleModel::InitListT const g_bicycleLimitsHungary = g_bicycleLimitsNoTrunk; +VehicleModel::InitListT const g_bicycleLimitsHungary = g_bicycleLimitsNoTrunk; // Iceland -routing::VehicleModel::InitListT const g_bicycleLimitsIceland = g_bicycleLimitsAll; +VehicleModel::InitListT const g_bicycleLimitsIceland = g_bicycleLimitsAll; // Netherlands -routing::VehicleModel::InitListT const g_bicycleLimitsNetherlands = g_bicycleLimitsNoTrunk; +VehicleModel::InitListT const g_bicycleLimitsNetherlands = g_bicycleLimitsNoTrunk; // Norway -routing::VehicleModel::InitListT const g_bicycleLimitsNorway = g_bicycleLimitsAll; +VehicleModel::InitListT const g_bicycleLimitsNorway = g_bicycleLimitsAll; // Oman -routing::VehicleModel::InitListT const g_bicycleLimitsOman = g_bicycleLimitsBridlewayAllowed; +VehicleModel::InitListT const g_bicycleLimitsOman = g_bicycleLimitsBridlewayAllowed; // Poland -routing::VehicleModel::InitListT const g_bicycleLimitsPoland = g_bicycleLimitsNoTrunk; +VehicleModel::InitListT const g_bicycleLimitsPoland = g_bicycleLimitsNoTrunk; // Romania -routing::VehicleModel::InitListT const g_bicycleLimitsRomania = g_bicycleLimitsNoTrunk; +VehicleModel::InitListT const g_bicycleLimitsRomania = g_bicycleLimitsNoTrunk; // Russian Federation -routing::VehicleModel::InitListT const g_bicycleLimitsRussia = +VehicleModel::InitListT const g_bicycleLimitsRussia = { // Footway and pedestrian are allowed // No transit for service and living_street @@ -348,19 +350,19 @@ routing::VehicleModel::InitListT const g_bicycleLimitsRussia = }; // Slovakia -routing::VehicleModel::InitListT const g_bicycleLimitsSlovakia = g_bicycleLimitsNoTrunk; +VehicleModel::InitListT const g_bicycleLimitsSlovakia = g_bicycleLimitsNoTrunk; // Spain -routing::VehicleModel::InitListT const g_bicycleLimitsSpain = g_bicycleLimitsPedestrianAllowed; +VehicleModel::InitListT const g_bicycleLimitsSpain = g_bicycleLimitsPedestrianAllowed; // Switzerland -routing::VehicleModel::InitListT const g_bicycleLimitsSwitzerland = g_bicycleLimitsNoTrunk; +VehicleModel::InitListT const g_bicycleLimitsSwitzerland = g_bicycleLimitsNoTrunk; // Turkey -routing::VehicleModel::InitListT const g_bicycleLimitsTurkey = g_bicycleLimitsDefault; +VehicleModel::InitListT const g_bicycleLimitsTurkey = g_bicycleLimitsDefault; // Ukraine -routing::VehicleModel::InitListT const g_bicycleLimitsUkraine = +VehicleModel::InitListT const g_bicycleLimitsUkraine = { // No trunk // Footway and perestrian are allowed @@ -386,10 +388,10 @@ routing::VehicleModel::InitListT const g_bicycleLimitsUkraine = }; // United Kingdom -routing::VehicleModel::InitListT const g_bicycleLimitsUK = g_bicycleLimitsBridlewayAllowed; +VehicleModel::InitListT const g_bicycleLimitsUK = g_bicycleLimitsBridlewayAllowed; // United States of America -routing::VehicleModel::InitListT const g_bicycleLimitsUS = +VehicleModel::InitListT const g_bicycleLimitsUS = { // Bridleway and pedesprian are allowed { {"highway", "trunk"}, kSpeedTrunkKMpH, true }, @@ -484,7 +486,7 @@ BicycleModel const & BicycleModel::AllLimitsInstance() BicycleModelFactory::BicycleModelFactory() { // Names must be the same with country names from countries.txt - m_models[string()] = make_shared(g_bicycleLimitsDefault); + m_models[""] = make_shared(g_bicycleLimitsDefault); m_models["Australia"] = make_shared(g_bicycleLimitsAustralia); m_models["Austria"] = make_shared(g_bicycleLimitsAustria); m_models["Belarus"] = make_shared(g_bicycleLimitsBelarus); @@ -513,7 +515,7 @@ BicycleModelFactory::BicycleModelFactory() shared_ptr BicycleModelFactory::GetVehicleModel() const { - auto const itr = m_models.find(string()); + auto const itr = m_models.find(""); ASSERT(itr != m_models.end(), ()); return itr->second; } @@ -527,6 +529,6 @@ shared_ptr BicycleModelFactory::GetVehicleModelForCountry(string return itr->second; } LOG(LDEBUG, ("Bicycle model wasn't found, default bicycle model is used instead:", country)); - return BicycleModelFactory::GetVehicleModel(); + return GetVehicleModel(); } } // routing diff --git a/routing_common/car_model.cpp b/routing_common/car_model.cpp index 35a1d5be6e2..694d9eb0026 100644 --- a/routing_common/car_model.cpp +++ b/routing_common/car_model.cpp @@ -7,6 +7,7 @@ #include using namespace std; +using namespace routing; namespace { @@ -37,9 +38,9 @@ double constexpr kSpeedFerryMotorcarVehicleKMpH = 15.0; double constexpr kSpeedRailMotorcarVehicleKMpH = 25.0; double constexpr kSpeedShuttleTrainKMpH = 25.0; -routing::VehicleModel::InitListT const g_carLimitsDefault = +VehicleModel::InitListT const g_carLimitsDefault = { - {{"highway", "motorway"}, kSpeedMotorwayKMpH, true}, + {{"highway", "motorway"}, kSpeedMotorwayKMpH, true /* isTransitAllowed */ }, {{"highway", "motorway_link"}, kSpeedMotorwayLinkKMpH, true}, {{"highway", "trunk"}, kSpeedTrunkKMpH, true}, {{"highway", "trunk_link"}, kSpeedTrunkLinkKMpH, true}, @@ -63,7 +64,7 @@ routing::VehicleModel::InitListT const g_carLimitsDefault = //{ {"highway", "construction"}, 40 }, }; -routing::VehicleModel::InitListT const g_carLimitsNoLivingStreetTransit = +VehicleModel::InitListT const g_carLimitsNoLivingStreetTransit = { {{"highway", "motorway"}, kSpeedMotorwayKMpH, true}, {{"highway", "motorway_link"}, kSpeedMotorwayLinkKMpH, true}, @@ -83,7 +84,7 @@ routing::VehicleModel::InitListT const g_carLimitsNoLivingStreetTransit = {{"highway", "track"}, kSpeedTrackKMpH, true}, }; -routing::VehicleModel::InitListT const g_carLimitsNoLivingStreetAndServiceTransit = +VehicleModel::InitListT const g_carLimitsNoLivingStreetAndServiceTransit = { {{"highway", "motorway"}, kSpeedMotorwayKMpH, true}, {{"highway", "motorway_link"}, kSpeedMotorwayLinkKMpH, true}, @@ -103,17 +104,17 @@ routing::VehicleModel::InitListT const g_carLimitsNoLivingStreetAndServiceTransi {{"highway", "track"}, kSpeedTrackKMpH, true}, }; -routing::VehicleModel::InitListT const g_carLimitsAustralia = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsAustralia = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsAustria = g_carLimitsNoLivingStreetTransit; +VehicleModel::InitListT const g_carLimitsAustria = g_carLimitsNoLivingStreetTransit; -routing::VehicleModel::InitListT const g_carLimitsBelarus = g_carLimitsNoLivingStreetTransit; +VehicleModel::InitListT const g_carLimitsBelarus = g_carLimitsNoLivingStreetTransit; -routing::VehicleModel::InitListT const g_carLimitsBelgium = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsBelgium = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsBrazil = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsBrazil = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsDenmark = +VehicleModel::InitListT const g_carLimitsDenmark = { // No track {{"highway", "motorway"}, kSpeedMotorwayKMpH, true}, @@ -133,11 +134,11 @@ routing::VehicleModel::InitListT const g_carLimitsDenmark = {{"highway", "road"}, kSpeedRoadKMpH, true}, }; -routing::VehicleModel::InitListT const g_carLimitsFrance = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsFrance = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsFinland = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsFinland = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsGermany = +VehicleModel::InitListT const g_carLimitsGermany = { // No transit for track {{"highway", "motorway"}, kSpeedMotorwayKMpH, true}, @@ -158,35 +159,35 @@ routing::VehicleModel::InitListT const g_carLimitsGermany = {{"highway", "track"}, kSpeedTrackKMpH, false}, }; -routing::VehicleModel::InitListT const g_carLimitsHungary = g_carLimitsNoLivingStreetTransit; +VehicleModel::InitListT const g_carLimitsHungary = g_carLimitsNoLivingStreetTransit; -routing::VehicleModel::InitListT const g_carLimitsIceland = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsIceland = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsNetherlands = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsNetherlands = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsNorway = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsNorway = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsOman = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsOman = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsPoland = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsPoland = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsRomania = g_carLimitsNoLivingStreetTransit; +VehicleModel::InitListT const g_carLimitsRomania = g_carLimitsNoLivingStreetTransit; -routing::VehicleModel::InitListT const g_carLimitsRussia = g_carLimitsNoLivingStreetAndServiceTransit; +VehicleModel::InitListT const g_carLimitsRussia = g_carLimitsNoLivingStreetAndServiceTransit; -routing::VehicleModel::InitListT const g_carLimitsSlovakia = g_carLimitsNoLivingStreetTransit; +VehicleModel::InitListT const g_carLimitsSlovakia = g_carLimitsNoLivingStreetTransit; -routing::VehicleModel::InitListT const g_carLimitsSpain = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsSpain = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsSwitzerland = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsSwitzerland = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsTurkey = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsTurkey = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsUkraine = g_carLimitsNoLivingStreetAndServiceTransit; +VehicleModel::InitListT const g_carLimitsUkraine = g_carLimitsNoLivingStreetAndServiceTransit; -routing::VehicleModel::InitListT const g_carLimitsUK = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsUK = g_carLimitsDefault; -routing::VehicleModel::InitListT const g_carLimitsUS = g_carLimitsDefault; +VehicleModel::InitListT const g_carLimitsUS = g_carLimitsDefault; } // namespace @@ -227,7 +228,7 @@ CarModel const & CarModel::AllLimitsInstance() CarModelFactory::CarModelFactory() { // Names must be the same with country names from countries.txt - m_models[string()] = make_shared(g_carLimitsDefault); + m_models[""] = make_shared(g_carLimitsDefault); m_models["Australia"] = make_shared(g_carLimitsAustralia); m_models["Austria"] = make_shared(g_carLimitsAustria); m_models["Belarus"] = make_shared(g_carLimitsBelarus); @@ -256,7 +257,7 @@ CarModelFactory::CarModelFactory() shared_ptr CarModelFactory::GetVehicleModel() const { - auto const itr = m_models.find(string()); + auto const itr = m_models.find(""); ASSERT(itr != m_models.end(), ()); return itr->second; } @@ -270,6 +271,6 @@ shared_ptr CarModelFactory::GetVehicleModelForCountry(string cons return itr->second; } LOG(LDEBUG, ("Car model wasn't found, default car model is used instead:", country)); - return CarModelFactory::GetVehicleModel(); + return GetVehicleModel(); } } // namespace routing diff --git a/routing_common/pedestrian_model.cpp b/routing_common/pedestrian_model.cpp index 399d37d22d7..137a85dbd84 100644 --- a/routing_common/pedestrian_model.cpp +++ b/routing_common/pedestrian_model.cpp @@ -7,6 +7,8 @@ #include "indexer/classificator.hpp" #include "indexer/feature.hpp" +using namespace routing; + namespace { @@ -49,7 +51,7 @@ double constexpr kSpeedPlatformKMpH = 5.0; double constexpr kSpeedPierKMpH = 4.0; // Default -routing::VehicleModel::InitListT const g_pedestrianLimitsDefault = +VehicleModel::InitListT const g_pedestrianLimitsDefault = { { {"highway", "trunk"}, kSpeedTrunkKMpH, true /* transitAllowed */ }, { {"highway", "trunk_link"}, kSpeedTrunkLinkKMpH, true }, @@ -73,7 +75,7 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsDefault = }; // All options available. -routing::VehicleModel::InitListT const g_pedestrianLimitsAll = +VehicleModel::InitListT const g_pedestrianLimitsAll = { { {"highway", "trunk"}, kSpeedTrunkKMpH, true }, { {"highway", "trunk_link"}, kSpeedTrunkLinkKMpH, true }, @@ -99,7 +101,7 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsAll = }; // Same as defaults except trunk and trunk link are not allowed. -routing::VehicleModel::InitListT const g_pedestrianLimitsNoTrunk = +VehicleModel::InitListT const g_pedestrianLimitsNoTrunk = { { {"highway", "primary"}, kSpeedPrimaryKMpH, true }, { {"highway", "primary_link"}, kSpeedPrimaryLinkKMpH, true }, @@ -122,7 +124,7 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsNoTrunk = }; // Same as defaults except cycleway is allowed. -routing::VehicleModel::InitListT const g_pedestrianLimitsCyclewayAllowed = +VehicleModel::InitListT const g_pedestrianLimitsCyclewayAllowed = { { {"highway", "trunk"}, kSpeedTrunkKMpH, true }, { {"highway", "trunk_link"}, kSpeedTrunkLinkKMpH, true }, @@ -147,7 +149,7 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsCyclewayAllowed = }; // Same as defaults except cycleway is allowed and trunk and trunk_link are not allowed. -routing::VehicleModel::InitListT const g_pedestrianLimitsCyclewayAllowedNoTrunk = +VehicleModel::InitListT const g_pedestrianLimitsCyclewayAllowedNoTrunk = { { {"highway", "primary"}, kSpeedPrimaryKMpH, true }, { {"highway", "primary_link"}, kSpeedPrimaryLinkKMpH, true }, @@ -170,16 +172,16 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsCyclewayAllowedNoTrunk }; // Australia -routing::VehicleModel::InitListT const g_pedestrianLimitsAustralia = g_pedestrianLimitsAll; +VehicleModel::InitListT const g_pedestrianLimitsAustralia = g_pedestrianLimitsAll; // Austria -routing::VehicleModel::InitListT const g_pedestrianLimitsAustria = g_pedestrianLimitsNoTrunk; +VehicleModel::InitListT const g_pedestrianLimitsAustria = g_pedestrianLimitsNoTrunk; // Belarus -routing::VehicleModel::InitListT const g_pedestrianLimitsBelarus = g_pedestrianLimitsCyclewayAllowed; +VehicleModel::InitListT const g_pedestrianLimitsBelarus = g_pedestrianLimitsCyclewayAllowed; // Belgium -routing::VehicleModel::InitListT const g_pedestrianLimitsBelgium = +VehicleModel::InitListT const g_pedestrianLimitsBelgium = { // Trunk and trunk_link are not allowed // Bridleway and cycleway are allowed @@ -205,64 +207,64 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsBelgium = }; // Brazil -routing::VehicleModel::InitListT const g_pedestrianLimitsBrazil = g_pedestrianLimitsAll; +VehicleModel::InitListT const g_pedestrianLimitsBrazil = g_pedestrianLimitsAll; // Denmark -routing::VehicleModel::InitListT const g_pedestrianLimitsDenmark = g_pedestrianLimitsCyclewayAllowedNoTrunk; +VehicleModel::InitListT const g_pedestrianLimitsDenmark = g_pedestrianLimitsCyclewayAllowedNoTrunk; // France -routing::VehicleModel::InitListT const g_pedestrianLimitsFrance = g_pedestrianLimitsNoTrunk; +VehicleModel::InitListT const g_pedestrianLimitsFrance = g_pedestrianLimitsNoTrunk; // Finland -routing::VehicleModel::InitListT const g_pedestrianLimitsFinland = g_pedestrianLimitsCyclewayAllowed; +VehicleModel::InitListT const g_pedestrianLimitsFinland = g_pedestrianLimitsCyclewayAllowed; // Germany -routing::VehicleModel::InitListT const g_pedestrianLimitsGermany = g_pedestrianLimitsDefault; +VehicleModel::InitListT const g_pedestrianLimitsGermany = g_pedestrianLimitsDefault; // Hungary -routing::VehicleModel::InitListT const g_pedestrianLimitsHungary = g_pedestrianLimitsNoTrunk; +VehicleModel::InitListT const g_pedestrianLimitsHungary = g_pedestrianLimitsNoTrunk; // Iceland -routing::VehicleModel::InitListT const g_pedestrianLimitsIceland = g_pedestrianLimitsAll; +VehicleModel::InitListT const g_pedestrianLimitsIceland = g_pedestrianLimitsAll; // Netherlands -routing::VehicleModel::InitListT const g_pedestrianLimitsNetherlands = g_pedestrianLimitsCyclewayAllowedNoTrunk; +VehicleModel::InitListT const g_pedestrianLimitsNetherlands = g_pedestrianLimitsCyclewayAllowedNoTrunk; // Norway -routing::VehicleModel::InitListT const g_pedestrianLimitsNorway = g_pedestrianLimitsAll; +VehicleModel::InitListT const g_pedestrianLimitsNorway = g_pedestrianLimitsAll; // Oman -routing::VehicleModel::InitListT const g_pedestrianLimitsOman = g_pedestrianLimitsAll; +VehicleModel::InitListT const g_pedestrianLimitsOman = g_pedestrianLimitsAll; // Poland -routing::VehicleModel::InitListT const g_pedestrianLimitsPoland = g_pedestrianLimitsNoTrunk; +VehicleModel::InitListT const g_pedestrianLimitsPoland = g_pedestrianLimitsNoTrunk; // Romania -routing::VehicleModel::InitListT const g_pedestrianLimitsRomania = g_pedestrianLimitsNoTrunk; +VehicleModel::InitListT const g_pedestrianLimitsRomania = g_pedestrianLimitsNoTrunk; // Russian Federation -routing::VehicleModel::InitListT const g_pedestrianLimitsRussia = g_pedestrianLimitsCyclewayAllowed; +VehicleModel::InitListT const g_pedestrianLimitsRussia = g_pedestrianLimitsCyclewayAllowed; // Slovakia -routing::VehicleModel::InitListT const g_pedestrianLimitsSlovakia = g_pedestrianLimitsNoTrunk; +VehicleModel::InitListT const g_pedestrianLimitsSlovakia = g_pedestrianLimitsNoTrunk; // Spain -routing::VehicleModel::InitListT const g_pedestrianLimitsSpain = g_pedestrianLimitsNoTrunk; +VehicleModel::InitListT const g_pedestrianLimitsSpain = g_pedestrianLimitsNoTrunk; // Switzerland -routing::VehicleModel::InitListT const g_pedestrianLimitsSwitzerland = g_pedestrianLimitsNoTrunk; +VehicleModel::InitListT const g_pedestrianLimitsSwitzerland = g_pedestrianLimitsNoTrunk; // Turkey -routing::VehicleModel::InitListT const g_pedestrianLimitsTurkey = g_pedestrianLimitsAll; +VehicleModel::InitListT const g_pedestrianLimitsTurkey = g_pedestrianLimitsAll; // Ukraine -routing::VehicleModel::InitListT const g_pedestrianLimitsUkraine = g_pedestrianLimitsNoTrunk; +VehicleModel::InitListT const g_pedestrianLimitsUkraine = g_pedestrianLimitsNoTrunk; // United Kingdom -routing::VehicleModel::InitListT const g_pedestrianLimitsUK = g_pedestrianLimitsAll; +VehicleModel::InitListT const g_pedestrianLimitsUK = g_pedestrianLimitsAll; // United States of America -routing::VehicleModel::InitListT const g_pedestrianLimitsUS = g_pedestrianLimitsAll; +VehicleModel::InitListT const g_pedestrianLimitsUS = g_pedestrianLimitsAll; } // namespace @@ -318,7 +320,7 @@ PedestrianModel const & PedestrianModel::AllLimitsInstance() PedestrianModelFactory::PedestrianModelFactory() { // Names must be the same with country names from countries.txt - m_models[string()] = make_shared(g_pedestrianLimitsDefault); + m_models[""] = make_shared(g_pedestrianLimitsDefault); m_models["Australia"] = make_shared(g_pedestrianLimitsAustralia); m_models["Austria"] = make_shared(g_pedestrianLimitsAustria); m_models["Belarus"] = make_shared(g_pedestrianLimitsBelarus); @@ -347,7 +349,7 @@ PedestrianModelFactory::PedestrianModelFactory() shared_ptr PedestrianModelFactory::GetVehicleModel() const { - auto const itr = m_models.find(string()); + auto const itr = m_models.find(""); ASSERT(itr != m_models.end(), ()); return itr->second; } @@ -361,6 +363,6 @@ shared_ptr PedestrianModelFactory::GetVehicleModelForCountry(stri return itr->second; } LOG(LDEBUG, ("Pedestrian model wasn't found, default model is used instead:", country)); - return PedestrianModelFactory::GetVehicleModel(); + return GetVehicleModel(); } } // routing