From 8d4aaa945dd785e3a16e0010d62975adb9bc6eb0 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 30 Nov 2022 11:55:32 +0000 Subject: [PATCH] Use istream.eof() --- CGAL_Core/include/CGAL/CORE/CoreIO_impl.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h index 0e4a2044e74..f63446d6364 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h @@ -103,7 +103,7 @@ int skip_comment_line (std::istream & in) { } } while (c == ' ' || c == '\t' || c == '\n'); - if (c == EOF) + if (in.eof()) core_io_error_handler("CoreIO::read_from_file()","unexpected end of file."); in.putback(c); @@ -191,7 +191,11 @@ void read_base_number(std::istream& in, BigInt& m, long length, long maxBits) { buffer = new char[size+2]; // read digits - for (int i=0; (i