From 7967522d1c8bc2ec0dc1491b2d1bb803e530bdef Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Fri, 16 Oct 2020 09:03:52 +0300 Subject: [PATCH] Const correctness of Context::GetDistance(). --- routing/base/astar_algorithm.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routing/base/astar_algorithm.hpp b/routing/base/astar_algorithm.hpp index 1d774693e8..4ea7fa7463 100644 --- a/routing/base/astar_algorithm.hpp +++ b/routing/base/astar_algorithm.hpp @@ -330,7 +330,7 @@ private: bestDistance.insert_or_assign(state.vertex, state.distance); } - std::optional GetDistance(Vertex const & vertex) + std::optional GetDistance(Vertex const & vertex) const { auto const it = bestDistance.find(vertex); return it != bestDistance.cend() ? std::optional(it->second) : std::nullopt;