From f3f9a0e1f9d36d2c09de8f1277f0654a7bb6f967 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Thu, 26 May 2016 12:46:32 +0300 Subject: [PATCH] Style fix. --- map/framework.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/map/framework.cpp b/map/framework.cpp index cee04151b4..928f090264 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -2420,10 +2420,15 @@ RouterType Framework::GetBestRouter(m2::PointD const & startPoint, m2::PointD co { if (MercatorBounds::DistanceOnEarth(startPoint, finalPoint) < kKeepPedestrianDistanceMeters) { - if (GetLastUsedRouter() == RouterType::Pedestrian) - return RouterType::Pedestrian; - if (GetLastUsedRouter() == RouterType::Bicycle) - return RouterType::Bicycle; + auto const lastUsedRouter = GetLastUsedRouter(); + switch (lastUsedRouter) + { + case RouterType::Pedestrian: + case RouterType::Bicycle: + return lastUsedRouter; + case RouterType::Vehicle: + ; // fall through + } // Return on a short distance the vehicle router flag only if we are already have routing files. auto countryFileGetter = [this](m2::PointD const & pt)