Commit 188a3055 authored by Ing. Jan Trávníček's avatar Ing. Jan Trávníček

fix comparators of grids

parent d841790e
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment