[wxInputStream] unlogic Eof() behavior

Christian Buhtz yspam at gmx.net
Wed Jan 31 11:07:58 PST 2007


As described in the docs of wxInputStream Eof() return 'true' after 
reading behind(!) the last byte. So If I read the last existing byte 
Eof() does NOT return true. I have to read one non-existing byte more 
and produce an error with it, to get Eof() == true.

I think it is quite unlogic and inconsitens behavior.

I have to check eof by myself with

wxInputStream::TellI() == wxInputStream::GetSize()

But it is just a workaround.

Is there a concept behind it?
Should we fix it?
Should we add a wxInputStream::LastByteRead() methode?
...?





More information about the wx-dev mailing list