diff --git a/generator/transit_generator.cpp b/generator/transit_generator.cpp index bf96c3b003..bf6ff60397 100644 --- a/generator/transit_generator.cpp +++ b/generator/transit_generator.cpp @@ -176,7 +176,7 @@ void ProcessGraph(string const & mwmPath, TCountryId const & countryId, { CalculateBestPedestrianSegments(mwmPath, countryId, data); data.Sort(); - data.CheckValid(); + data.CheckValidSortedUnique(); } void BuildTransit(string const & mwmDir, TCountryId const & countryId, @@ -207,7 +207,7 @@ void BuildTransit(string const & mwmDir, TCountryId const & countryId, return; // Empty transit section. ProcessGraph(mwmPath, countryId, mapping, jointData); - jointData.CheckValid(); + jointData.CheckValidSortedUnique(); FilesContainerW cont(mwmPath, FileWriter::OP_WRITE_EXISTING); FileWriter writer = cont.GetWriter(TRANSIT_FILE_TAG); diff --git a/transit/transit_graph_data.cpp b/transit/transit_graph_data.cpp index 73e087cec7..2e83e6f460 100644 --- a/transit/transit_graph_data.cpp +++ b/transit/transit_graph_data.cpp @@ -325,7 +325,7 @@ void GraphData::Clear() Visit(v); } -void GraphData::CheckValid() const +void GraphData::CheckValidSortedUnique() const { { CheckSortedVisitor v; @@ -359,7 +359,7 @@ void GraphData::Sort() void GraphData::ClipGraph(vector const & borders) { Sort(); - CheckValid(); + CheckValidSortedUnique(); ClipLines(borders); ClipStops(); ClipNetworks(); @@ -367,7 +367,7 @@ void GraphData::ClipGraph(vector const & borders) ClipTransfer(); ClipEdges(); ClipShapes(); - CheckValid(); + CheckValidSortedUnique(); } void GraphData::SetGateBestPedestrianSegment(size_t gateIdx, SingleMwmSegment const & s) diff --git a/transit/transit_graph_data.hpp b/transit/transit_graph_data.hpp index ba9734c456..46cbababe7 100644 --- a/transit/transit_graph_data.hpp +++ b/transit/transit_graph_data.hpp @@ -134,7 +134,7 @@ public: void DeserializeForCrossMwm(Reader & reader); void AppendTo(GraphData const & rhs); void Clear(); - void CheckValid() const; + void CheckValidSortedUnique() const; bool IsEmpty() const; /// \brief Sorts all class fields by their ids. diff --git a/transit/transit_tests/transit_graph_test.cpp b/transit/transit_tests/transit_graph_test.cpp index da2d8e50ec..dfbd89e3a5 100644 --- a/transit/transit_tests/transit_graph_test.cpp +++ b/transit/transit_tests/transit_graph_test.cpp @@ -515,7 +515,7 @@ void SerializeAndDeserializeGraph(GraphData & src, GraphData & dst) MemReader reader(buffer.data(), buffer.size()); dst.DeserializeAll(reader); - dst.CheckValid(); + dst.CheckValidSortedUnique(); } // ^ diff --git a/transit/transit_types.hpp b/transit/transit_types.hpp index 4918714328..ef7c6b03a7 100644 --- a/transit/transit_types.hpp +++ b/transit/transit_types.hpp @@ -473,7 +473,7 @@ void CheckValid(std::vector const & items, std::string const & name) template void CheckSorted(std::vector const & items, std::string const & name) { - CHECK(std::is_sorted(items.cend(), items.cend()), ("Table is not sorted. Table name:", name)); + CHECK(std::is_sorted(items.cbegin(), items.cend()), ("Table is not sorted. Table name:", name)); } template