octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

seekg calls in ls-mat5.cc


From: John W. Eaton
Subject: seekg calls in ls-mat5.cc
Date: Thu, 21 Apr 2005 15:08:24 -0400

There are a number of places in ls-mat5.cc where we have things like

   is.seekg (tmp_pos + static_cast<std::streamoff> (PAD (len)));

This seems risky to me because I don't think there is any guarantee
that a cast from an integer type to a std::streamoff type is
guaranteed to work (std::streamoff might not be implemented with a
simple integer data type).

Is it really necessary to save and restore the file position when
reading MAT files or is there another way that we could implement
these functions to avoid all the calls to seekg?

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]