]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/input.cpp
Fix EOF handling
[libs/datafile.git] / source / input.cpp
index e03a92126944703234a8d6fa330c4eba66cacb5e..f3f8f23f3343fa9352a618c82f8c151f2811573e 100644 (file)
@@ -34,5 +34,10 @@ int Input::peek()
        return next;
 }
 
+Input::operator bool() const
+{
+       return next>=0 || !in.eof();
+}
+
 } // namespace DataFile
 } // namespace Msp