Skip to content

Commit 6d2a389

Browse files
committed
fixed test suite warnings in fitting
1 parent d41072d commit 6d2a389

File tree

1 file changed

+3
-3
lines changed
  • Shape_detection/include/CGAL/Shape_detection/Region_growing/internal

1 file changed

+3
-3
lines changed

Shape_detection/include/CGAL/Shape_detection/Region_growing/internal/fitting.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ bool circle_fit (const PointRange& points,
6161
= { FT(0), FT(0), FT(0), FT(0), FT(0),
6262
FT(0), FT(0), FT(0), FT(0), FT(0) };
6363

64-
A[0] = points.size();
64+
A[0] = static_cast<FT>(points.size());
6565
for (const Point_2& p : points)
6666
{
6767
FT x = p.x() - bbox.xmin();
@@ -126,7 +126,7 @@ bool sphere_fit (const PointRange& points,
126126
FT(0), FT(0), FT(0), FT(0), FT(0),
127127
FT(0), FT(0), FT(0), FT(0), FT(0) };
128128

129-
A[0] = points.size();
129+
A[0] = static_cast<FT>(points.size());
130130
for (const Point_3& p : points)
131131
{
132132
FT x = p.x() - bbox.xmin();
@@ -228,7 +228,7 @@ bool cylinder_fit (const PointRange& points,
228228
Line_3 line (point, axis);
229229
point = line.projection(ref);
230230

231-
point_on_axis = barycenter (point_on_axis, nb, point, 1);
231+
point_on_axis = barycenter (point_on_axis, static_cast<FT>(nb), point, FT(1));
232232

233233
radius += abs(radius);
234234

0 commit comments

Comments
 (0)