From e887a33052a8003715dc0d80007d048d86b57c25 Mon Sep 17 00:00:00 2001 From: Mikhail Gorbushin Date: Tue, 30 Apr 2019 18:39:16 +0300 Subject: [PATCH] [generator] review fixes --- generator/restriction_collector.cpp | 4 ++-- generator/restriction_generator.cpp | 1 + generator/restriction_writer.cpp | 2 +- generator/restriction_writer.hpp | 5 ++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/generator/restriction_collector.cpp b/generator/restriction_collector.cpp index 59f09515e5..9327ee4013 100644 --- a/generator/restriction_collector.cpp +++ b/generator/restriction_collector.cpp @@ -94,7 +94,7 @@ bool RestrictionCollector::ParseRestrictions(string const & path) return false; Restriction::Type restrictionType; - auto viaType = RestrictionWriter::ViaType::Max; + auto viaType = RestrictionWriter::ViaType::Count; FromString(*iter, restrictionType); ++iter; @@ -120,7 +120,7 @@ bool RestrictionCollector::ParseRestrictions(string const & path) if (viaType == RestrictionWriter::ViaType::Node) CHECK_EQUAL(osmIds.size(), 2, ("Only |from| and |to| osmId.")); - CHECK_NOT_EQUAL(viaType, RestrictionWriter::ViaType::Max, ()); + CHECK_NOT_EQUAL(viaType, RestrictionWriter::ViaType::Count, ()); AddRestriction(coords, restrictionType, osmIds); } return true; diff --git a/generator/restriction_generator.cpp b/generator/restriction_generator.cpp index 5aebce13ab..08993a7e88 100644 --- a/generator/restriction_generator.cpp +++ b/generator/restriction_generator.cpp @@ -28,6 +28,7 @@ namespace { using namespace routing; + std::unique_ptr CreateIndexGraph(std::string const & targetPath, std::string const & mwmPath, diff --git a/generator/restriction_writer.cpp b/generator/restriction_writer.cpp index 18840b0101..191cfcb3e4 100644 --- a/generator/restriction_writer.cpp +++ b/generator/restriction_writer.cpp @@ -201,7 +201,7 @@ std::string DebugPrint(RestrictionWriter::ViaType const & type) { case RestrictionWriter::ViaType::Node: return RestrictionWriter::kNodeString; case RestrictionWriter::ViaType::Way: return RestrictionWriter::kWayString; - case RestrictionWriter::ViaType::Max: UNREACHABLE(); + case RestrictionWriter::ViaType::Count: UNREACHABLE(); } UNREACHABLE(); } diff --git a/generator/restriction_writer.hpp b/generator/restriction_writer.hpp index a14a908458..e561f28631 100644 --- a/generator/restriction_writer.hpp +++ b/generator/restriction_writer.hpp @@ -19,7 +19,7 @@ public: Node, Way, - Max, + Count, }; static std::string const kNodeString; @@ -28,8 +28,11 @@ public: RestrictionWriter(std::string const & fullPath, generator::cache::IntermediateDataReader const & cache); + // generator::CollectorInterface overrides: + // @{ void CollectRelation(RelationElement const & relationElement) override; void Save() override {} + // @} static ViaType ConvertFromString(std::string const & str);