From 497e4154a7c144c29db2dc8f16d6bf991eeb826f Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Fri, 18 Mar 2016 19:21:13 +0100 Subject: [PATCH] get_name_for_id -> GetNameForID --- include/engine/api/base_api.hpp | 2 +- include/engine/datafacade/datafacade_base.hpp | 2 +- include/engine/datafacade/internal_datafacade.hpp | 2 +- include/engine/datafacade/shared_datafacade.hpp | 2 +- include/engine/guidance/assemble_leg.hpp | 4 ++-- include/engine/guidance/assemble_steps.hpp | 8 ++++---- include/util/name_table.hpp | 2 +- src/extractor/guidance/turn_analysis.cpp | 4 ++-- src/util/name_table.cpp | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/engine/api/base_api.hpp b/include/engine/api/base_api.hpp index a16b931fa94..48ad4200455 100644 --- a/include/engine/api/base_api.hpp +++ b/include/engine/api/base_api.hpp @@ -48,7 +48,7 @@ class BaseAPI protected: util::json::Object MakeWaypoint(const PhantomNode &phantom) const { - return json::makeWaypoint(phantom.location, facade.get_name_for_id(phantom.name_id), + return json::makeWaypoint(phantom.location, facade.GetNameForID(phantom.name_id), Hint{phantom, facade.GetCheckSum()}); } diff --git a/include/engine/datafacade/datafacade_base.hpp b/include/engine/datafacade/datafacade_base.hpp index 743ed8b3fca..cd45be71cc9 100644 --- a/include/engine/datafacade/datafacade_base.hpp +++ b/include/engine/datafacade/datafacade_base.hpp @@ -138,7 +138,7 @@ class BaseDataFacade virtual unsigned GetNameIndexFromEdgeID(const unsigned id) const = 0; - virtual std::string get_name_for_id(const unsigned name_id) const = 0; + virtual std::string GetNameForID(const unsigned name_id) const = 0; virtual std::size_t GetCoreSize() const = 0; diff --git a/include/engine/datafacade/internal_datafacade.hpp b/include/engine/datafacade/internal_datafacade.hpp index 4137555cc92..3c0c84d7cc9 100644 --- a/include/engine/datafacade/internal_datafacade.hpp +++ b/include/engine/datafacade/internal_datafacade.hpp @@ -551,7 +551,7 @@ class InternalDataFacade final : public BaseDataFacade return m_name_ID_list.at(id); } - std::string get_name_for_id(const unsigned name_id) const override final + std::string GetNameForID(const unsigned name_id) const override final { if (std::numeric_limits::max() == name_id) { diff --git a/include/engine/datafacade/shared_datafacade.hpp b/include/engine/datafacade/shared_datafacade.hpp index 423592b25d1..6838c63eff4 100644 --- a/include/engine/datafacade/shared_datafacade.hpp +++ b/include/engine/datafacade/shared_datafacade.hpp @@ -621,7 +621,7 @@ class SharedDataFacade final : public BaseDataFacade return m_name_ID_list.at(id); } - std::string get_name_for_id(const unsigned name_id) const override final + std::string GetNameForID(const unsigned name_id) const override final { if (std::numeric_limits::max() == name_id) { diff --git a/include/engine/guidance/assemble_leg.hpp b/include/engine/guidance/assemble_leg.hpp index 6f0b168c0c2..90fa583ac28 100644 --- a/include/engine/guidance/assemble_leg.hpp +++ b/include/engine/guidance/assemble_leg.hpp @@ -139,12 +139,12 @@ RouteLeg assembleLeg(const DataFacadeT &facade, BOOST_ASSERT(summary_array.begin() != summary_array.end()); std::string summary = std::accumulate(std::next(summary_array.begin()), summary_array.end(), - facade.get_name_for_id(summary_array.front()), + facade.GetNameForID(summary_array.front()), [&facade](std::string previous, const std::uint32_t name_id) { if (name_id != 0) { - previous += ", " + facade.get_name_for_id(name_id); + previous += ", " + facade.GetNameForID(name_id); } return previous; }); diff --git a/include/engine/guidance/assemble_steps.hpp b/include/engine/guidance/assemble_steps.hpp index 9a7b0e5fa8d..e32c00a9151 100644 --- a/include/engine/guidance/assemble_steps.hpp +++ b/include/engine/guidance/assemble_steps.hpp @@ -92,7 +92,7 @@ std::vector assembleSteps(const DataFacadeT &facade, if (path_point.turn_instruction != extractor::guidance::TurnInstruction::NO_TURN()) { BOOST_ASSERT(segment_duration >= 0); - const auto name = facade.get_name_for_id(path_point.name_id); + const auto name = facade.GetNameForID(path_point.name_id); const auto distance = leg_geometry.segment_distances[segment_index]; steps.push_back(RouteStep{path_point.name_id, name, @@ -113,7 +113,7 @@ std::vector assembleSteps(const DataFacadeT &facade, const int duration = segment_duration + target_duration; BOOST_ASSERT(duration >= 0); steps.push_back(RouteStep{target_node.name_id, - facade.get_name_for_id(target_node.name_id), + facade.GetNameForID(target_node.name_id), duration / 10., distance, target_mode, @@ -141,7 +141,7 @@ std::vector assembleSteps(const DataFacadeT &facade, BOOST_ASSERT(duration >= 0); steps.push_back(RouteStep{source_node.name_id, - facade.get_name_for_id(source_node.name_id), + facade.GetNameForID(source_node.name_id), duration / 10., leg_geometry.segment_distances[segment_index], source_mode, @@ -164,7 +164,7 @@ std::vector assembleSteps(const DataFacadeT &facade, // This step has length zero, the only reason we need it is the target location steps.push_back( RouteStep{target_node.name_id, - facade.get_name_for_id(target_node.name_id), + facade.GetNameForID(target_node.name_id), ZERO_DURACTION, ZERO_DISTANCE, target_mode, diff --git a/include/util/name_table.hpp b/include/util/name_table.hpp index e94d622d52b..2f1887a355b 100644 --- a/include/util/name_table.hpp +++ b/include/util/name_table.hpp @@ -23,7 +23,7 @@ class NameTable public: NameTable(const std::string &filename); - std::string get_name_for_id(const unsigned name_id) const; + std::string GetNameForID(const unsigned name_id) const; }; } // namespace util } // namespace osrm diff --git a/src/extractor/guidance/turn_analysis.cpp b/src/extractor/guidance/turn_analysis.cpp index 594e180bc1d..0b26c1ec7d5 100644 --- a/src/extractor/guidance/turn_analysis.cpp +++ b/src/extractor/guidance/turn_analysis.cpp @@ -752,8 +752,8 @@ TurnInstruction TurnAnalysis::getInstructionForObvious(const std::size_t num_roa const auto &in_data = node_based_graph.GetEdgeData(via_edge); const auto &out_data = node_based_graph.GetEdgeData(road.turn.eid); if (in_data.name_id != out_data.name_id && - requiresNameAnnounced(name_table.get_name_for_id(in_data.name_id), - name_table.get_name_for_id(out_data.name_id))) + requiresNameAnnounced(name_table.GetNameForID(in_data.name_id), + name_table.GetNameForID(out_data.name_id))) return {TurnType::NewName, getTurnDirection(road.turn.angle)}; else return {TurnType::Suppressed, getTurnDirection(road.turn.angle)}; diff --git a/src/util/name_table.cpp b/src/util/name_table.cpp index 18ed6917718..e3d5cef3511 100644 --- a/src/util/name_table.cpp +++ b/src/util/name_table.cpp @@ -40,7 +40,7 @@ NameTable::NameTable(const std::string &filename) } } -std::string NameTable::get_name_for_id(const unsigned name_id) const +std::string NameTable::GetNameForID(const unsigned name_id) const { if (std::numeric_limits::max() == name_id) {