mirror of https://github.com/CGAL/cgal
- Protect operator>>(MP_Float) against end of stream.
This commit is contained in:
parent
f8bcefa10a
commit
5269ae13b2
|
|
@ -1,3 +1,6 @@
|
|||
4.126 (4 Dec 2003)
|
||||
- Protect operator>>(MP_Float) against end of stream.
|
||||
|
||||
4.125 (1 Dec 2003)
|
||||
- Quotient<NT> now supports sqrt() iff NT supports it.
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ MP_Float::MP_Float(double d)
|
|||
if (d == 0)
|
||||
return;
|
||||
|
||||
CGAL_expensive_assertion(is_finite(d) && is_valid(d));
|
||||
CGAL_assertion(is_finite(d) && is_valid(d));
|
||||
CGAL_expensive_assertion_code(double bak = d;)
|
||||
|
||||
// This is subtle, because ints are not symetric against 0.
|
||||
|
|
@ -402,9 +402,10 @@ print (std::ostream & os, const MP_Float &b)
|
|||
std::istream &
|
||||
operator>> (std::istream & is, MP_Float &b)
|
||||
{
|
||||
double i;
|
||||
is >> i;
|
||||
b = MP_Float(i);
|
||||
double d;
|
||||
is >> d;
|
||||
if (is)
|
||||
b = MP_Float(d);
|
||||
return is;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue