Skip to content

Commit

Permalink
get_name_for_id -> GetNameForID
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarex committed Mar 18, 2016
1 parent 88db0ba commit 497e415
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion include/engine/api/base_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()});
}

Expand Down
2 changes: 1 addition & 1 deletion include/engine/datafacade/datafacade_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion include/engine/datafacade/internal_datafacade.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned>::max() == name_id)
{
Expand Down
2 changes: 1 addition & 1 deletion include/engine/datafacade/shared_datafacade.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned>::max() == name_id)
{
Expand Down
4 changes: 2 additions & 2 deletions include/engine/guidance/assemble_leg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down
8 changes: 4 additions & 4 deletions include/engine/guidance/assemble_steps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ std::vector<RouteStep> 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,
Expand All @@ -113,7 +113,7 @@ std::vector<RouteStep> 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,
Expand Down Expand Up @@ -141,7 +141,7 @@ std::vector<RouteStep> 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,
Expand All @@ -164,7 +164,7 @@ std::vector<RouteStep> 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,
Expand Down
2 changes: 1 addition & 1 deletion include/util/name_table.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/extractor/guidance/turn_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)};
Expand Down
2 changes: 1 addition & 1 deletion src/util/name_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned>::max() == name_id)
{
Expand Down

0 comments on commit 497e415

Please sign in to comment.