mirror of https://github.com/CGAL/cgal
Fix a warning -Wmaybe-uninitialized
With g++48, with -Wall -O3, there was the following warning:
include/CGAL/Weighted_point.h:137:5: warning: '*((void*)& p +8)' may be used uninitialized in this function [-Wmaybe-uninitialized]
wp = Weighted_point<Point,Weight>(p,w);
^
include/CGAL/Weighted_point.h:130:9: note: '*((void*)& p +8)' was declared here
Point p;
^
include/CGAL/Weighted_point.h:137:5: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized]
wp = Weighted_point<Point,Weight>(p,w);
^
Trivial bug-fix for master.
This commit is contained in:
parent
32b8625a46
commit
ab7f9d0047
|
|
@ -129,6 +129,7 @@ operator>>(std::istream &is, Weighted_point<Point,Weight> &wp)
|
|||
Weight w;
|
||||
Point p;
|
||||
is >> p;
|
||||
if(!is) return is;
|
||||
if(is_ascii(is))
|
||||
is >> w;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue