Review fixes.

This commit is contained in:
Vladimir Byko-Ianko 2018-03-19 18:47:45 +03:00 committed by Tatiana Yan
parent 4b774f507b
commit da0ab14b68
5 changed files with 8 additions and 8 deletions

View file

@ -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);

View file

@ -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<m2::RegionD> const & borders)
{
Sort();
CheckValid();
CheckValidSortedUnique();
ClipLines(borders);
ClipStops();
ClipNetworks();
@ -367,7 +367,7 @@ void GraphData::ClipGraph(vector<m2::RegionD> const & borders)
ClipTransfer();
ClipEdges();
ClipShapes();
CheckValid();
CheckValidSortedUnique();
}
void GraphData::SetGateBestPedestrianSegment(size_t gateIdx, SingleMwmSegment const & s)

View file

@ -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.

View file

@ -515,7 +515,7 @@ void SerializeAndDeserializeGraph(GraphData & src, GraphData & dst)
MemReader reader(buffer.data(), buffer.size());
dst.DeserializeAll(reader);
dst.CheckValid();
dst.CheckValidSortedUnique();
}
// ^

View file

@ -473,7 +473,7 @@ void CheckValid(std::vector<Item> const & items, std::string const & name)
template <class Item>
void CheckSorted(std::vector<Item> 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 <class Item>