diff --git a/Spatial_searching/examples/Spatial_searching/distance_browsing.cpp b/Spatial_searching/examples/Spatial_searching/distance_browsing.cpp index 9d5880abc13..8ef9f285c0e 100644 --- a/Spatial_searching/examples/Spatial_searching/distance_browsing.cpp +++ b/Spatial_searching/examples/Spatial_searching/distance_browsing.cpp @@ -35,7 +35,7 @@ int main() { std::cout << "The first 5 nearest neighbours with positive x-coord are: " << std::endl; for (int j=0; (j < 5)&&(it!=end); ++j,++it) - std::cout << (*it).first << " at squared distance = " << (*it).second << std::endl; + std::cout << (*it).first << " at squared distance = " << it->second << std::endl; return 0; } diff --git a/Spatial_searching/include/CGAL/Incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Incremental_neighbor_search.h index c4bce75c23c..918882700b5 100644 --- a/Spatial_searching/include/CGAL/Incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Incremental_neighbor_search.h @@ -138,7 +138,7 @@ namespace CGAL { typedef std::input_iterator_tag iterator_category; typedef Point_with_transformed_distance value_type; - typedef Point_with_transformed_distance* pointer; + typedef const Point_with_transformed_distance* pointer; typedef const Point_with_transformed_distance& reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; diff --git a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h index 06acd3d43bc..d161e6a36fe 100644 --- a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h @@ -471,7 +471,7 @@ namespace CGAL { typedef std::input_iterator_tag iterator_category; typedef Point_with_transformed_distance value_type; - typedef Point_with_transformed_distance* pointer; + typedef const Point_with_transformed_distance* pointer; typedef const Point_with_transformed_distance& reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type;