Skip to content
Snippets Groups Projects
Commit 188a3055 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

fix comparators of grids

parent d841790e
No related branches found
No related tags found
1 merge request!142Fix most of libstdc++ vs libc++ incompatibilty
......@@ -109,8 +109,8 @@ int SquareGrid4<TCoordinate, TEdge>::compare(const GridBase &other) const {
template<typename TCoordinate, typename TEdge>
int SquareGrid4<TCoordinate, TEdge>::compare(const SquareGrid4 &other) const {
auto first = ext::tie(this->m_obstacles, this->m_height, this->m_width);
TCoordinate height = other.getHeight();
TCoordinate width = other.getWidth();
const TCoordinate height = other.getHeight();
const TCoordinate width = other.getWidth();
auto second = ext::tie(other.getObstacleList(), height, width);
 
static ext::compare<decltype(first)> comp;
......
......@@ -101,8 +101,8 @@ int SquareGrid8<TCoordinate, TEdge>::compare(const GridBase &other) const {
template<typename TCoordinate, typename TEdge>
int SquareGrid8<TCoordinate, TEdge>::compare(const SquareGrid8 &other) const {
auto first = ext::tie(this->m_obstacles, this->m_height, this->m_width);
TCoordinate height = other.getHeight();
TCoordinate width = other.getWidth();
const TCoordinate height = other.getHeight();
const TCoordinate width = other.getWidth();
auto second = ext::tie(other.getObstacleList(), height, width);
 
static ext::compare<decltype(first)> comp;
......
......@@ -133,8 +133,8 @@ int WeightedSquareGrid4<TCoordinate, TEdge>::compare(const GridBase &other) cons
template<typename TCoordinate, typename TEdge>
int WeightedSquareGrid4<TCoordinate, TEdge>::compare(const WeightedSquareGrid4 &other) const {
auto first = ext::tie(this->m_obstacles, this->m_height, this->m_width);
TCoordinate height = other.getHeight();
TCoordinate width = other.getWidth();
const TCoordinate height = other.getHeight();
const TCoordinate width = other.getWidth();
auto second = ext::tie(other.getObstacleList(), height, width);
 
static ext::compare<decltype(first)> comp;
......
......@@ -133,8 +133,8 @@ int WeightedSquareGrid8<TCoordinate, TEdge>::compare(const GridBase &other) cons
template<typename TCoordinate, typename TEdge>
int WeightedSquareGrid8<TCoordinate, TEdge>::compare(const WeightedSquareGrid8 &other) const {
auto first = ext::tie(this->m_obstacles, this->m_height, this->m_width);
TCoordinate height = other.getHeight();
TCoordinate width = other.getWidth();
const TCoordinate height = other.getHeight();
const TCoordinate width = other.getWidth();
auto second = ext::tie(other.getObstacleList(), height, width);
 
static ext::compare<decltype(first)> comp;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment