cgal icon indicating copy to clipboard operation
cgal copied to clipboard

"dereferencable" is a misspelling

Open lrineau opened this issue 3 years ago • 1 comments

Issue Details

In Visual Studio, I have an automatic spell checker running in background, reporting issues. Usually, they are all false-positives (like "polytope: unknown word"). But the spell checker pointed out "dereferencable". The correct spelling is "dereferenceable".

The issue is that we have several occurrences in CGAL, including one in the API: Compact_container::owns_dereferencable.

What should we do?

See all the occurences
[lrineau@fernand]~/Git/cgal-master% ack dereferencable ^build*       
Combinatorial_map/include/CGAL/Compact_container_with_index.h
755:  bool owns_dereferencable(const_iterator cit) const

Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt
45:dereferencable and past-the-end values,

STL_Extension/doc/STL_Extension/CGAL/Compact_container.h
675:bool owns_dereferencable(const_iterator pos);

STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h
297:  bool owns_dereferencable(const_iterator pos);

STL_Extension/include/CGAL/Concurrent_compact_container.h
545:  bool owns_dereferencable(const_iterator cit) const

STL_Extension/include/CGAL/Compact_container.h
540:  bool owns_dereferencable(const_iterator cit) const

STL_Extension/test/STL_Extension/test_Compact_container.cpp
245:  // owns() and owns_dereferencable().
248:    assert(c9.owns_dereferencable(it));
250:    assert(! c10.owns_dereferencable(it));
253:  assert(! c9.owns_dereferencable(c9.end()));

STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp
325:  // owns() and owns_dereferencable().
328:    assert(c9.owns_dereferencable(it));
330:    assert(! c10.owns_dereferencable(it));
333:  assert(! c9.owns_dereferencable(c9.end()));

TDS_3/include/CGAL/Triangulation_data_structure_3.h
2052:    return vertices().owns_dereferencable(v);
2105:  return cells().owns_dereferencable(c);
2152:    return cells().owns_dereferencable(c);
2164:    return cells().owns_dereferencable(c);

lrineau avatar Sep 06 '22 10:09 lrineau

My 2 cents:

  • in general it is good to fix spelling errors as they are just looking bad
  • looks like hard to change as it might be used by users and thus break their code. Maybe a transition period with deprecated
  • when it is not very likely that users use it change it.

Note the documentation now shows: image

note the extra `, which probably should be removed anyway.

albert-github avatar Sep 06 '22 11:09 albert-github