From 0381e0dd9d0904c9893fd1ed2210b40c3fd3ad93 Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Tue, 14 Aug 2012 15:04:09 +0200 Subject: [PATCH] Const'ing a member function --- Algorithms/DouglasPeucker.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Algorithms/DouglasPeucker.h b/Algorithms/DouglasPeucker.h index 7585a909d..63388db1e 100644 --- a/Algorithms/DouglasPeucker.h +++ b/Algorithms/DouglasPeucker.h @@ -34,7 +34,7 @@ or see http://www.gnu.org/licenses/agpl.txt. * Note: points may also be pre-selected*/ //These thresholds are more or less heuristically chosen. -static const double DouglasPeuckerThresholds[19] = { 10240000., 5120000., 2560000., 1280000., 640000., 320000., 160000., 80000., 40000., 20000., 10000., 5000., 2400., 1200., 200, 16, 6, 3., 1. }; +static double DouglasPeuckerThresholds[19] = { 10240000., 5120000., 2560000., 1280000., 640000., 320000., 160000., 80000., 40000., 20000., 10000., 5000., 2400., 1200., 200, 16, 6, 3., 1. }; template class DouglasPeucker { @@ -43,7 +43,7 @@ private: //Stack to simulate the recursion std::stack recursionStack; - double ComputeDistanceOfPointToLine(const _Coordinate& inputPoint, const _Coordinate& source, const _Coordinate& target) { + double ComputeDistanceOfPointToLine(const _Coordinate& inputPoint, const _Coordinate& source, const _Coordinate& target) const { double r; const double x = (double)inputPoint.lat; const double y = (double)inputPoint.lon;