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:
Laurent Rineau 2013-12-12 17:43:35 +01:00
parent 32b8625a46
commit ab7f9d0047
1 changed files with 1 additions and 0 deletions

View File

@ -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