diff --git a/generator/transit_generator.cpp b/generator/transit_generator.cpp index 02e7af5647..3e43461310 100644 --- a/generator/transit_generator.cpp +++ b/generator/transit_generator.cpp @@ -211,7 +211,7 @@ void DeserializerFromJson::operator()(m2::PointD & p, char const * name) void DeserializerFromJson::operator()(ShapeId & id, char const * name) { - GetTwoParamDict(name, "stop1_id", "stop2_id", id.m_stop1_id, id.m_stop2_id); + GetTwoParamDict(name, "stop1_id", "stop2_id", id.m_stop1Id, id.m_stop2Id); } void DeserializerFromJson::operator()(FeatureIdentifiers & id, char const * name) diff --git a/routing_common/transit_types.cpp b/routing_common/transit_types.cpp index 383e8690fb..0845f233ea 100644 --- a/routing_common/transit_types.cpp +++ b/routing_common/transit_types.cpp @@ -151,12 +151,12 @@ bool Gate::IsValid() const // ShapeId ---------------------------------------------------------------------------------------- bool ShapeId::operator==(ShapeId const & rhs) const { - return m_stop1_id == rhs.m_stop1_id && m_stop2_id == rhs.m_stop2_id; + return m_stop1Id == rhs.m_stop1Id && m_stop2Id == rhs.m_stop2Id; } bool ShapeId::IsValid() const { - return m_stop1_id != kInvalidLineId && m_stop2_id != kInvalidNetworkId; + return m_stop1Id != kInvalidStopId && m_stop2Id != kInvalidStopId; } // Edge ------------------------------------------------------------------------------------------- @@ -236,7 +236,7 @@ bool Line::IsValid() const // Shape ------------------------------------------------------------------------------------------ bool Shape::IsEqualForTesting(Shape const & shape) const { - if (!m_id.IsEqualForTesting(shape.m_id) && m_polyline.size() == shape.m_polyline.size()) + if (!m_id.IsEqualForTesting(shape.m_id) || m_polyline.size() != shape.m_polyline.size()) return false; for (size_t i = 0; i < m_polyline.size(); ++i) diff --git a/routing_common/transit_types.hpp b/routing_common/transit_types.hpp index 83ad9cf9b3..dcf97ffd69 100644 --- a/routing_common/transit_types.hpp +++ b/routing_common/transit_types.hpp @@ -220,22 +220,22 @@ class ShapeId { public: ShapeId() = default; - ShapeId(StopId stop1_id, StopId stop2_id) : m_stop1_id(stop1_id), m_stop2_id(stop2_id) {} + ShapeId(StopId stop1Id, StopId stop2Id) : m_stop1Id(stop1Id), m_stop2Id(stop2Id) {} bool operator==(ShapeId const & rhs) const; bool IsEqualForTesting(ShapeId const & rhs) const { return *this == rhs; } bool IsValid() const; - StopId GetStop1Id() const { return m_stop1_id; } - StopId GetStop2Id() const { return m_stop2_id; } + StopId GetStop1Id() const { return m_stop1Id; } + StopId GetStop2Id() const { return m_stop2Id; } private: DECLARE_TRANSIT_TYPE_FRIENDS - DECLARE_VISITOR_AND_DEBUG_PRINT(ShapeId, visitor(m_stop1_id, "stop1_id"), - visitor(m_stop2_id, "stop2_id")) + DECLARE_VISITOR_AND_DEBUG_PRINT(ShapeId, visitor(m_stop1Id, "stop1_id"), + visitor(m_stop2Id, "stop2_id")) - StopId m_stop1_id = kInvalidStopId; - StopId m_stop2_id = kInvalidStopId; + StopId m_stop1Id = kInvalidStopId; + StopId m_stop2Id = kInvalidStopId; }; class Edge