diff options
Diffstat (limited to 'libs/graph/example/astar_maze.cpp')
-rw-r--r-- | libs/graph/example/astar_maze.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/graph/example/astar_maze.cpp b/libs/graph/example/astar_maze.cpp index 20cff4fdd1..fad2c208f2 100644 --- a/libs/graph/example/astar_maze.cpp +++ b/libs/graph/example/astar_maze.cpp @@ -139,7 +139,7 @@ public: euclidean_heuristic(vertex_descriptor goal):m_goal(goal) {}; double operator()(vertex_descriptor v) { - return sqrt(pow(m_goal[0] - v[0], 2) + pow(m_goal[1] - v[1], 2)); + return sqrt(pow(double(m_goal[0] - v[0]), 2) + pow(double(m_goal[1] - v[1]), 2)); } private: @@ -221,7 +221,7 @@ std::ostream& operator<<(std::ostream& output, const maze& m) { if (x == 0) output << BARRIER; // Put the character representing this point in the maze grid. - vertex_descriptor u = {{x, y}}; + vertex_descriptor u = {{x, vertices_size_type(y)}}; if (m.solution_contains(u)) output << "."; else if (m.has_barrier(u)) |