Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'routing')
-rw-r--r--routing/features_road_graph.cpp6
-rw-r--r--routing/features_road_graph.hpp12
-rw-r--r--routing/nearest_edge_finder.cpp7
-rw-r--r--routing/pedestrian_model.hpp1
-rw-r--r--routing/road_graph.cpp9
-rw-r--r--routing/road_graph.hpp1
-rw-r--r--routing/routing_tests/astar_router_test.cpp2
7 files changed, 12 insertions, 26 deletions
diff --git a/routing/features_road_graph.cpp b/routing/features_road_graph.cpp
index f915d4c3ab..df7f85c325 100644
--- a/routing/features_road_graph.cpp
+++ b/routing/features_road_graph.cpp
@@ -38,8 +38,7 @@ string GetFeatureCountryName(FeatureID const featureId)
}
} // namespace
-FeaturesRoadGraph::Value::Value(MwmSet::MwmHandle && handle)
- : m_mwmHandle(move(handle))
+FeaturesRoadGraph::Value::Value(MwmSet::MwmHandle && handle) : m_mwmHandle(move(handle))
{
if (!m_mwmHandle.IsAlive())
return;
@@ -342,6 +341,7 @@ FeaturesRoadGraph::Value const & FeaturesRoadGraph::LockMwm(MwmSet::MwmId const
if (itr != m_mwmLocks.end())
return itr->second;
- return m_mwmLocks.insert(make_pair(move(mwmId), Value(m_index.GetMwmHandleById(mwmId)))).first->second;
+ return m_mwmLocks.insert(make_pair(move(mwmId), Value(m_index.GetMwmHandleById(mwmId))))
+ .first->second;
}
} // namespace routing
diff --git a/routing/features_road_graph.hpp b/routing/features_road_graph.hpp
index 63800328b5..89091101dc 100644
--- a/routing/features_road_graph.hpp
+++ b/routing/features_road_graph.hpp
@@ -84,16 +84,8 @@ private:
Value() = default;
explicit Value(MwmSet::MwmHandle && handle);
- bool IsAlive() const
- {
- return m_mwmHandle.IsAlive();
- }
-
- bool HasAltitudeLoader() const
- {
- return m_altitudeLoader && m_altitudeLoader->HasAltitudes();
- }
-
+ bool IsAlive() const { return m_mwmHandle.IsAlive(); }
+ bool HasAltitudeLoader() const { return m_altitudeLoader && m_altitudeLoader->HasAltitudes(); }
MwmSet::MwmHandle m_mwmHandle;
unique_ptr<feature::AltitudeLoader> m_altitudeLoader;
};
diff --git a/routing/nearest_edge_finder.cpp b/routing/nearest_edge_finder.cpp
index 7c8f2ff867..d7c9c76d7f 100644
--- a/routing/nearest_edge_finder.cpp
+++ b/routing/nearest_edge_finder.cpp
@@ -11,7 +11,6 @@
namespace routing
{
NearestEdgeFinder::Candidate::Candidate() : m_dist(numeric_limits<double>::max()), m_segId(0) {}
-
NearestEdgeFinder::NearestEdgeFinder(m2::PointD const & point)
: m_point(point)
{
@@ -44,8 +43,10 @@ void NearestEdgeFinder::AddInformationSource(FeatureID const & featureId, IRoadG
// information.
bool const isAltitude = res.m_segStart.GetAltitude() != feature::kInvalidAltitude &&
res.m_segEnd.GetAltitude() != feature::kInvalidAltitude;
- feature::TAltitude const projPointAlt = isAltitude ? static_cast<feature::TAltitude>(
- (res.m_segStart.GetAltitude() + res.m_segEnd.GetAltitude()) / 2) : feature::kInvalidAltitude;
+ feature::TAltitude const projPointAlt =
+ isAltitude ? static_cast<feature::TAltitude>(
+ (res.m_segStart.GetAltitude() + res.m_segEnd.GetAltitude()) / 2)
+ : feature::kInvalidAltitude;
res.m_projPoint = Junction(pt, projPointAlt);
}
}
diff --git a/routing/pedestrian_model.hpp b/routing/pedestrian_model.hpp
index f28eba80e1..93ebd6fdb1 100644
--- a/routing/pedestrian_model.hpp
+++ b/routing/pedestrian_model.hpp
@@ -16,7 +16,6 @@ public:
/// VehicleModel overrides:
bool IsOneWay(FeatureType const &) const override { return false; }
-
static PedestrianModel const & AllLimitsInstance();
protected:
diff --git a/routing/road_graph.cpp b/routing/road_graph.cpp
index db32e7d486..58864fa80e 100644
--- a/routing/road_graph.cpp
+++ b/routing/road_graph.cpp
@@ -67,7 +67,6 @@ void ReverseEdges(size_t beginIdx, IRoadGraph::TEdgeVector & edges)
// Junction --------------------------------------------------------------------
Junction::Junction() : m_point(m2::PointD::Zero()), m_altitude(feature::kInvalidAltitude) {}
-
Junction::Junction(m2::PointD const & point, feature::TAltitude altitude)
: m_point(point), m_altitude(altitude)
{}
@@ -142,7 +141,6 @@ string DebugPrint(Edge const & r)
IRoadGraph::RoadInfo::RoadInfo()
: m_speedKMPH(0.0), m_bidirectional(false)
{}
-
IRoadGraph::RoadInfo::RoadInfo(RoadInfo && ri)
: m_junctions(move(ri.m_junctions))
, m_speedKMPH(ri.m_speedKMPH)
@@ -158,8 +156,7 @@ IRoadGraph::RoadInfo::RoadInfo(bool bidirectional, double speedKMPH,
void IRoadGraph::CrossOutgoingLoader::LoadEdges(FeatureID const & featureId, RoadInfo const & roadInfo)
{
ForEachEdge(roadInfo, [&featureId, &roadInfo, this](size_t segId, Junction const & endJunction,
- bool forward)
- {
+ bool forward) {
if (forward || roadInfo.m_bidirectional || m_mode == IRoadGraph::Mode::IgnoreOnewayTag)
m_edges.emplace_back(featureId, forward, segId, m_cross, endJunction);
});
@@ -169,8 +166,7 @@ void IRoadGraph::CrossOutgoingLoader::LoadEdges(FeatureID const & featureId, Roa
void IRoadGraph::CrossIngoingLoader::LoadEdges(FeatureID const & featureId, RoadInfo const & roadInfo)
{
ForEachEdge(roadInfo, [&featureId, &roadInfo, this](size_t segId, Junction const & endJunction,
- bool forward)
- {
+ bool forward) {
if (!forward || roadInfo.m_bidirectional || m_mode == IRoadGraph::Mode::IgnoreOnewayTag)
m_edges.emplace_back(featureId, !forward, segId, endJunction, m_cross);
});
@@ -222,7 +218,6 @@ void IRoadGraph::ResetFakes()
{
m_outgoingEdges.clear();
}
-
void IRoadGraph::AddFakeEdges(Junction const & junction,
vector<pair<Edge, Junction>> const & vicinity)
{
diff --git a/routing/road_graph.hpp b/routing/road_graph.hpp
index 505376aed5..f11056cbac 100644
--- a/routing/road_graph.hpp
+++ b/routing/road_graph.hpp
@@ -29,7 +29,6 @@ public:
inline m2::PointD const & GetPoint() const { return m_point; }
inline feature::TAltitude GetAltitude() const { return m_altitude; }
-
private:
friend string DebugPrint(Junction const & r);
diff --git a/routing/routing_tests/astar_router_test.cpp b/routing/routing_tests/astar_router_test.cpp
index 3f7a125997..2645807d58 100644
--- a/routing/routing_tests/astar_router_test.cpp
+++ b/routing/routing_tests/astar_router_test.cpp
@@ -7,8 +7,8 @@
#include "routing/route.hpp"
#include "routing/router_delegate.hpp"
-#include "indexer/feature_altitude.hpp"
#include "indexer/classificator_loader.hpp"
+#include "indexer/feature_altitude.hpp"
#include "base/logging.hpp"
#include "base/macros.hpp"