get_name_for_id -> GetNameForID
This commit is contained in:
parent
ea93f6f560
commit
5c01878542
@ -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()});
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
});
|
||||
|
@ -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,
|
||||
@ -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,
|
||||
@ -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,
|
||||
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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)};
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user