Skip to content

Commit 989264e

Browse files
committed
only the counts must be tight
lSize must be num_edges as we use an array for edge property we access using halfedge index properties
1 parent a9a8c4b commit 989264e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse_impl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ namespace Surface_mesh_simplification
111111

112112
Equal_3 equal_points = Traits().equal_3_object();
113113

114-
size_type lSize = static_cast<size_type>(
115-
std::distance( boost::begin(edges(mSurface)),
116-
boost::end(edges(mSurface)) ) );
114+
size_type lSize = num_edges(mSurface);
117115

118-
mInitialEdgeCount = mCurrentEdgeCount = lSize;
116+
mInitialEdgeCount = mCurrentEdgeCount = static_cast<size_type>(
117+
std::distance( boost::begin(edges(mSurface)),
118+
boost::end(edges(mSurface)) ) );;
119119

120120
mEdgeDataArray.reset( new Edge_data[lSize] ) ;
121121

0 commit comments

Comments
 (0)