From 699454ae84d76afd4f0198fffe65d2392ef98fa1 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 29 Nov 2022 13:22:00 +0000 Subject: [PATCH] STL Extensions: Correct spelling --- .../include/CGAL/Compact_container_with_index.h | 5 ++++- .../Chapter_iterators_and_circulators.txt | 2 +- STL_Extension/doc/STL_Extension/CGAL/Compact_container.h | 2 +- .../doc/STL_Extension/CGAL/Concurrent_compact_container.h | 2 +- STL_Extension/include/CGAL/Compact_container.h | 8 +++++++- STL_Extension/include/CGAL/Concurrent_compact_container.h | 6 +++++- .../test/STL_Extension/test_Compact_container.cpp | 8 ++++---- .../STL_Extension/test_Concurrent_compact_container.cpp | 8 ++++---- TDS_3/include/CGAL/Triangulation_data_structure_3.h | 8 ++++---- 9 files changed, 31 insertions(+), 18 deletions(-) diff --git a/Combinatorial_map/include/CGAL/Compact_container_with_index.h b/Combinatorial_map/include/CGAL/Compact_container_with_index.h index 37d555793b6..7cbd54e5c94 100644 --- a/Combinatorial_map/include/CGAL/Compact_container_with_index.h +++ b/Combinatorial_map/include/CGAL/Compact_container_with_index.h @@ -752,7 +752,10 @@ public: return false; } - bool owns_dereferencable(const_iterator cit) const + bool owns_dereferenceable(const_iterator cit) const + { return cit!=end() && owns(cit); } + + CGAL_DEPRECATED bool owns_dereferencable(const_iterator cit) const { return cit!=end() && owns(cit); } /** Reserve method to ensure that the capacity of the Compact_container be diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt index b7450d5cd3d..bb7567c4858 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt @@ -42,7 +42,7 @@ Thus we will not give a full description of these concept here but only a few hints about how to use and write handle, iterators and circulators in \cgal. Developers should consult the above-mentioned references to become familiar with the iterator, circulator and handle concepts. In particular, the notions of iterator and circulator ranges, -dereferencable and past-the-end values, +dereferenceable and past-the-end values, mutable and constant iterators and circulators, and the different categories (forward, bidirectional, random-access, etc.) of iterators and circulators, are fundamental. diff --git a/STL_Extension/doc/STL_Extension/CGAL/Compact_container.h b/STL_Extension/doc/STL_Extension/CGAL/Compact_container.h index 98a1af5ceb6..dd409ee8f02 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/Compact_container.h +++ b/STL_Extension/doc/STL_Extension/CGAL/Compact_container.h @@ -672,7 +672,7 @@ bool owns(const_iterator pos); /*! * returns whether `pos` is in the range `[cc.begin(), cc`.end())` (`cc.end()` excluded). */ -bool owns_dereferencable(const_iterator pos); +bool owns_dereferenceable(const_iterator pos); /// @} diff --git a/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h b/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h index 65e853f489a..608c81f2f7a 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h @@ -294,7 +294,7 @@ complexity. No exception is thrown. /// returns whether `pos` is in the range `[ccc.begin(), ccc.end()]` (`ccc.end()` included). bool owns(const_iterator pos); /// returns whether `pos` is in the range `[ccc.begin(), ccc`.end())` (`ccc.end()` excluded). - bool owns_dereferencable(const_iterator pos); + bool owns_dereferenceable(const_iterator pos); /// @} diff --git a/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index 93a6debd770..cbdec0be4ac 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -537,7 +537,13 @@ public: return false; } - bool owns_dereferencable(const_iterator cit) const + bool owns_dereferenceable(const_iterator cit) const + { + return cit != end() && owns(cit); + } + + + CGAL_DEPRECATED bool owns_dereferencable(const_iterator cit) const { return cit != end() && owns(cit); } diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index 6bbdeee9176..1c50020ae5d 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -542,11 +542,15 @@ public: return false; } - bool owns_dereferencable(const_iterator cit) const + bool owns_dereferenceable(const_iterator cit) const { return cit != end() && owns(cit); } + CGAL_DEPRECATED bool owns_dereferencable(const_iterator cit) const + { + return cit != end() && owns(cit); + } /** Reserve method to ensure that the capacity of the Concurrent_compact_container be * greater or equal than a given value n. */ diff --git a/STL_Extension/test/STL_Extension/test_Compact_container.cpp b/STL_Extension/test/STL_Extension/test_Compact_container.cpp index 661ec453cbd..d2d96cdfc4b 100644 --- a/STL_Extension/test/STL_Extension/test_Compact_container.cpp +++ b/STL_Extension/test/STL_Extension/test_Compact_container.cpp @@ -242,15 +242,15 @@ void test(const Cont &) assert(c11.size() == v1.size()); assert(c10 == c11); - // owns() and owns_dereferencable(). + // owns() and owns_dereferenceable(). for(typename Cont::const_iterator it = c9.begin(), end = c9.end(); it != end; ++it) { assert(c9.owns(it)); - assert(c9.owns_dereferencable(it)); + assert(c9.owns_dereferenceable(it)); assert(! c10.owns(it)); - assert(! c10.owns_dereferencable(it)); + assert(! c10.owns_dereferenceable(it)); } assert(c9.owns(c9.end())); - assert(! c9.owns_dereferencable(c9.end())); + assert(! c9.owns_dereferenceable(c9.end())); c9.erase(c9.begin(), c9.end()); diff --git a/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp b/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp index 00f2e1da4ec..a42676f8f7f 100644 --- a/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp +++ b/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp @@ -322,15 +322,15 @@ void test(const Cont &) assert(c11.size() == v1.size()); assert(c10 == c11);*/ - // owns() and owns_dereferencable(). + // owns() and owns_dereferenceable(). for(typename Cont::const_iterator it = c9.begin(), end = c9.end(); it != end; ++it) { assert(c9.owns(it)); - assert(c9.owns_dereferencable(it)); + assert(c9.owns_dereferenceable(it)); assert(! c10.owns(it)); - assert(! c10.owns_dereferencable(it)); + assert(! c10.owns_dereferenceable(it)); } assert(c9.owns(c9.end())); - assert(! c9.owns_dereferencable(c9.end())); + assert(! c9.owns_dereferenceable(c9.end())); c9.erase(c9.begin(), c9.end()); diff --git a/TDS_3/include/CGAL/Triangulation_data_structure_3.h b/TDS_3/include/CGAL/Triangulation_data_structure_3.h index 8f2df91c48a..6333387f28b 100644 --- a/TDS_3/include/CGAL/Triangulation_data_structure_3.h +++ b/TDS_3/include/CGAL/Triangulation_data_structure_3.h @@ -2049,7 +2049,7 @@ bool Triangulation_data_structure_3:: is_vertex(Vertex_handle v) const { - return vertices().owns_dereferencable(v); + return vertices().owns_dereferenceable(v); } template @@ -2102,7 +2102,7 @@ is_edge(Cell_handle c, int i, int j) const if ( (dimension() == 2) && ((i>2) || (j>2)) ) return false; if ((i>3) || (j>3)) return false; - return cells().owns_dereferencable(c); + return cells().owns_dereferenceable(c); } template @@ -2149,7 +2149,7 @@ is_facet(Cell_handle c, int i) const if ( (dimension() == 2) && (i!=3) ) return false; - return cells().owns_dereferencable(c); + return cells().owns_dereferenceable(c); } template @@ -2161,7 +2161,7 @@ is_cell( Cell_handle c ) const if (dimension() < 3) return false; - return cells().owns_dereferencable(c); + return cells().owns_dereferenceable(c); } template