Skip to content

Commit b655d0c

Browse files
authored
Merge pull request #2698 from sloriot/SMS-fix_tight_num_edges
Fix #2643
2 parents a9a8c4b + 989264e commit b655d0c

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)