mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/Taxi: Fixed warnings in TaxiPathGraph
This commit is contained in:
@@ -147,9 +147,17 @@ std::size_t TaxiPathGraph::GetCompleteNodeRoute(TaxiNodesEntry const* from, Taxi
|
||||
{
|
||||
shortestPath.clear();
|
||||
std::vector<vertex_descriptor> p(boost::num_vertices(m_graph));
|
||||
std::vector<uint32> d(boost::num_vertices(m_graph));
|
||||
|
||||
boost::dijkstra_shortest_paths(m_graph, GetVertexIDFromNodeID(from),
|
||||
boost::predecessor_map(boost::make_iterator_property_map(p.begin(), boost::get(boost::vertex_index, m_graph)))
|
||||
.distance_map(boost::make_iterator_property_map(d.begin(), boost::get(boost::vertex_index, m_graph)))
|
||||
.vertex_index_map(boost::get(boost::vertex_index, m_graph))
|
||||
.distance_compare(std::less<uint32>())
|
||||
.distance_combine(boost::closed_plus<uint32>())
|
||||
.distance_inf(std::numeric_limits<uint32>::max())
|
||||
.distance_zero(0)
|
||||
.visitor(boost::dijkstra_visitor<boost::null_visitor>())
|
||||
.weight_map(boost::make_transform_value_property_map(
|
||||
[player](EdgeCost const& edgeCost) { return edgeCost.EvaluateDistance(player); },
|
||||
boost::get(boost::edge_weight, m_graph))));
|
||||
|
||||
@@ -40,11 +40,11 @@ private:
|
||||
uint32 Distance;
|
||||
uint32 EvaluateDistance(Player const* player) const;
|
||||
};
|
||||
typedef boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::property<boost::vertex_index_t, uint32>, boost::property<boost::edge_weight_t, EdgeCost>> Graph;
|
||||
typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::property<boost::vertex_index_t, uint32>, boost::property<boost::edge_weight_t, EdgeCost>> Graph;
|
||||
typedef boost::property_map<Graph, boost::edge_weight_t>::type WeightMap;
|
||||
typedef Graph::vertex_descriptor vertex_descriptor;
|
||||
typedef Graph::edge_descriptor edge_descriptor;
|
||||
typedef std::pair<uint32, uint32> edge;
|
||||
typedef std::pair<vertex_descriptor, vertex_descriptor> edge;
|
||||
|
||||
TaxiPathGraph() { }
|
||||
~TaxiPathGraph() { }
|
||||
|
||||
Reference in New Issue
Block a user