mirror of https://github.com/CGAL/cgal
Bug fix: `remove_outliers` was removing ALL points when no outliers were found
Bug in current code: when no outliers are found, `f2r` is `sorted_points.end()`. So, `if (sit == f2r)` is never true, and `out` keeps its initial value, which is `points.begin()`.
This commit is contained in:
parent
b26fa9b5ba
commit
597970b368
|
|
@ -266,7 +266,7 @@ remove_outliers(
|
||||||
|
|
||||||
// Replaces [points.begin(), points.end()) range by the sorted content.
|
// Replaces [points.begin(), points.end()) range by the sorted content.
|
||||||
iterator pit = points.begin();
|
iterator pit = points.begin();
|
||||||
iterator out = points.begin();
|
iterator out = points.end();
|
||||||
|
|
||||||
for (auto sit = sorted_points.begin(); sit != sorted_points.end(); ++ sit)
|
for (auto sit = sorted_points.begin(); sit != sorted_points.end(); ++ sit)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue