Removes potentially dangerous and misleading lat, lon subscript oeprator
This commit is contained in:
parent
7d0955c0f4
commit
6cd55e535c
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
#include "util/typedefs.hpp"
|
#include "util/typedefs.hpp"
|
||||||
|
|
||||||
#include <boost/assert.hpp>
|
|
||||||
|
|
||||||
#include "osrm/coordinate.hpp"
|
#include "osrm/coordinate.hpp"
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@ -44,21 +42,6 @@ struct QueryNode
|
|||||||
return QueryNode(static_cast<int>(90 * COORDINATE_PRECISION),
|
return QueryNode(static_cast<int>(90 * COORDINATE_PRECISION),
|
||||||
static_cast<int>(180 * COORDINATE_PRECISION), MAX_OSM_NODEID);
|
static_cast<int>(180 * COORDINATE_PRECISION), MAX_OSM_NODEID);
|
||||||
}
|
}
|
||||||
|
|
||||||
value_type operator[](const std::size_t n) const
|
|
||||||
{
|
|
||||||
switch (n)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
return lat;
|
|
||||||
case 0:
|
|
||||||
return lon;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
BOOST_ASSERT_MSG(false, "should not happen");
|
|
||||||
return std::numeric_limits<int>::lowest();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user