From 0762359c1dcade9ff4abe02acfaa3b033028dfd4 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Thu, 19 Apr 2018 13:50:08 +0300 Subject: Review fixes. --- routing/index_graph.cpp | 4 ++-- routing/index_graph_loader.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'routing') diff --git a/routing/index_graph.cpp b/routing/index_graph.cpp index c8820bc01e..9c4264b9f0 100644 --- a/routing/index_graph.cpp +++ b/routing/index_graph.cpp @@ -60,8 +60,8 @@ namespace routing IndexGraph::IndexGraph(shared_ptr geometry, shared_ptr estimator) : m_geometry(geometry), m_estimator(move(estimator)) { - ASSERT(m_geometry, ()); - ASSERT(m_estimator, ()); + CHECK(m_geometry, ()); + CHECK(m_estimator, ()); } void IndexGraph::GetEdgeList(Segment const & segment, bool isOutgoing, vector & edges) diff --git a/routing/index_graph_loader.cpp b/routing/index_graph_loader.cpp index c568ea3343..307dd3f132 100644 --- a/routing/index_graph_loader.cpp +++ b/routing/index_graph_loader.cpp @@ -31,7 +31,7 @@ private: struct GeometryIndexGraph { shared_ptr m_geometry; - shared_ptr m_indexGraph; + unique_ptr m_indexGraph; }; GeometryIndexGraph & CreateGeometry(NumMwmId numMwmId); @@ -108,7 +108,7 @@ IndexGraphLoaderImpl::GeometryIndexGraph & IndexGraphLoaderImpl::CreateIndexGrap if (!handle.IsAlive()) MYTHROW(RoutingException, ("Can't get mwm handle for", file)); - graph.m_indexGraph = make_shared(graph.m_geometry, m_estimator); + graph.m_indexGraph = make_unique(graph.m_geometry, m_estimator); my::Timer timer; MwmValue const & mwmValue = *handle.GetValue(); DeserializeIndexGraph(mwmValue, m_vehicleType, *graph.m_indexGraph); -- cgit v1.2.3