2666: Improve mln::io::off:load.

* mln/io/off/load.hh (mln::io::off:load): Ensure the end of the file is reached. --- milena/ChangeLog | 7 +++++++ milena/mln/io/off/load.hh | 11 +++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 4d2c9e9..2c8f00d 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,12 @@ 2008-10-23 Roland Levillain <roland@lrde.epita.fr> + Improve mln::io::off:load. + + * mln/io/off/load.hh (mln::io::off:load): Ensure the end of the + file is reached. + +2008-10-23 Roland Levillain <roland@lrde.epita.fr> + Adjust I/O routines to algebraic faces. * mln/io/off/load.hh (mln::io::off::load): Adjust. diff --git a/milena/mln/io/off/load.hh b/milena/mln/io/off/load.hh index 38e6b6e..60c534b 100644 --- a/milena/mln/io/off/load.hh +++ b/milena/mln/io/off/load.hh @@ -264,6 +264,17 @@ namespace mln // Image. ima.init_(pc, values); + /*--------------. + | End of file. | + `--------------*/ + + istr >> internal::eat_comment; + if (!istr.eof()) + { + std::cerr << me << ": `" << filename + << "': end of file not reached" << std::endl; + std::exit(1); + } istr.close(); } -- 1.5.6.5
participants (1)
-
Roland Levillain