Skip to content

Commit 7348b46

Browse files
committed
Fix a warning
Otherwise `p` can be used without being initialized.
1 parent bf3937f commit 7348b46

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Alpha_shapes_3/test/Alpha_shapes_3/include/CGAL/_test_weighted_alpha_shape_3.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ file_input(std::ifstream& is, std::list<Weighted_point>& L)
3737
typename Weighted_point::Point p;
3838
for( ; n>0 ; n--)
3939
{
40-
is >> p;
41-
L.push_back(Weighted_point(p,5*(n/10)));
40+
if(is >> p) {
41+
L.push_back(Weighted_point(p,5*(n/10)));
42+
}
4243
}
4344
std::cout << "Points inserted" << std::endl;
4445
return true;

0 commit comments

Comments
 (0)