[Gtkradiant] bug800 - minor issues
Sat, 17 May 2003 15:56:42 +0100
I've committed fixes for most of the issues raised in the last
review. These are the only ones that remain..
(copied from CHANGES)
> typedef unsigned int size_type; goes away, use size_t
Using size_t means an extra dependency (though only on stdc headers).
A byte_type and size_type associated with streams allows all stream-related code to deal with streams in a more abstract way, without any performance penalties.
Once you get used to the member typedef, I find it also helps to make the function prototypes clearly readable without having to read documentation for each parameter.
> - remove libs/bytestreamutils.h
> put that functionality into the IStream stuff / idatastream.h stuff
> anything you retrieve from an IStream should be endian-correct
The integer-extraction functions have a dependency on the endian-conversion stuff in cmdlib, so I put them in an optional extra header.
Only some users of input streams will need those utilities (most users just read arrays of bytes), so they shouldn't be in idatastream.h.
Headers such as pkzip.h operate on input streams in the same way - it doesn't make sense to put those functions in idatastream.h either.