diff --git a/src/DGtal/geometry/tools/MelkmanConvexHull.h b/src/DGtal/geometry/tools/MelkmanConvexHull.h index ac2028e2a4..f6ac1eef97 100644 --- a/src/DGtal/geometry/tools/MelkmanConvexHull.h +++ b/src/DGtal/geometry/tools/MelkmanConvexHull.h @@ -147,13 +147,13 @@ namespace DGtal * Rationale: we do not want to iterate over the same point, * duplicated at the begin and at the end of the container. */ - ConstIterator begin(); + ConstIterator begin() const; /** * End iterator * @return a const iterator to the end of the container */ - ConstIterator end(); + ConstIterator end() const; /** * Writes/Displays the object on an output stream. diff --git a/src/DGtal/geometry/tools/MelkmanConvexHull.ih b/src/DGtal/geometry/tools/MelkmanConvexHull.ih index 41893e0beb..1b1583cb3d 100644 --- a/src/DGtal/geometry/tools/MelkmanConvexHull.ih +++ b/src/DGtal/geometry/tools/MelkmanConvexHull.ih @@ -109,7 +109,7 @@ DGtal::MelkmanConvexHull::add(const Point& aPoint) template inline typename DGtal::MelkmanConvexHull::ConstIterator -DGtal::MelkmanConvexHull::begin() +DGtal::MelkmanConvexHull::begin() const { if (myContainer.size() == 0) return myContainer.end(); @@ -121,7 +121,7 @@ DGtal::MelkmanConvexHull::begin() template inline typename DGtal::MelkmanConvexHull::ConstIterator -DGtal::MelkmanConvexHull::end() +DGtal::MelkmanConvexHull::end() const { return myContainer.end(); }