From a4106505afe5b5b8447bd5cde5085bfca81698b9 Mon Sep 17 00:00:00 2001 From: mvglasow Date: Wed, 28 May 2025 19:48:40 +0300 Subject: [PATCH] [traffxml] Code cleanup Signed-off-by: mvglasow --- traffxml/traff_decoder.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/traffxml/traff_decoder.cpp b/traffxml/traff_decoder.cpp index df9284885..b6b009673 100644 --- a/traffxml/traff_decoder.cpp +++ b/traffxml/traff_decoder.cpp @@ -542,7 +542,6 @@ void RoutingTraffDecoder::DecodeLocationDirection(traffxml::TraffMessage & messa { bool adjustToPrevRoute = false; // calculate a fresh route, no adjustments to previous one uint64_t routeId = 0; // used in callbacks to identify the route, we might not need it at all - std::string routerName; // set later std::vector points; if (message.m_location.value().m_from) @@ -576,26 +575,20 @@ void RoutingTraffDecoder::DecodeLocationDirection(traffxml::TraffMessage & messa routing::Checkpoints checkpoints(std::move(points)); /* - * This code is mostly lifted from: - * - AsyncRouter::CalculateRoute(Checkpoints const &, m2::PointD const &, bool, ReadyCallbackOwnership const &, - * NeedMoreMapsCallback const &, RemoveRouteCallback const &, ProgressCallback, uint32_t) - * - AsyncRouter::CalculateRoute() + * This code is mostly lifted from AsyncRouter::CalculateRoute(), both with and without arguments. */ - // AsyncRouter::CalculateRoute(with args) /* * AsyncRouter::CalculateRoute() has a `DelegateProxy`, which is private. We just need the return * value of GetDelegate(), which is a `routing::RouterDelegate`, so use that instead. We don’t - * nedd any of the callbacks, therefore we don’t set them. + * need any of the callbacks, therefore we don’t set them. */ routing::RouterDelegate delegate; delegate.SetTimeout(kRouterTimeoutSec); - // AsyncRouter::CalculateRoute() if (!m_router && !InitRouter()) return; - routerName = m_router->GetName(); /* * TODO is that for following a track? If so, can we use that with just 2–3 reference points? * – Doesn’t look like it, m_guides only seems to get used in test functions