CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.88k stars 1.38k forks source link

Fix iteration on dynamic bit set #8272

Closed sloriot closed 3 months ago

sloriot commented 3 months ago

if ID = unsigned int, this can lead to an infinite loop

lrineau commented 3 months ago

I suggest you add a test for the corresponding issue.

lrineau commented 3 months ago

... The reason is that there was necessarily a warning, in the original code (when the ID type is not size_t). There might be other interesting warnings.

sloriot commented 3 months ago

If ID == unsigned int, we had:

warning: comparison is always true due to limited range of data type [-Wtype-limits]
lrineau commented 3 months ago

If ID == unsigned int, we had:

warning: comparison is always true due to limited range of data type [-Wtype-limits]

That is what I mean. I suggest to add tests so that PMP is also tested with such inputs: when the ranges of indices is a range of int or unsigned int. That is quite common, for the graphics community as far as I know.

sloriot commented 3 months ago

Successfully tested in CGAL-6.0-Ic-264