A beta tester reported that PackageBuilder failed to load when the OBOS libtranslation.so was used. This was because the

OBOS BBitmapStream was missing a protected function.  I implemented the protected function (SwapHeader) and changed the cl
ass to use it instead of the previous functions that I wrote to provide similar behavior.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2406 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matthew Wilber 2003-01-11 03:20:08 +00:00
parent 9f9e1f50fb
commit d7e25ddc2b
1 changed files with 5 additions and 9 deletions

View File

@ -91,15 +91,11 @@ protected:
bool fDetached;
// true if the bitmap has been detached, false if not
static status_t ConvertBEndianToHost(TranslatorBitmap *);
// Converts a TranslatorBitmap struct from the Big Endian
// format to the host format. This is needed because
// the headers are always stored in the Big Endian format
// when read in from or written out to files.
status_t SetBigEndianHeader();
// Sets fpBigEndianHeader to be the Big Endian version
// of the data in fHeader. I need a Big Endian copy
// of fHeader for the ReadAt() function.
void SwapHeader(const TranslatorBitmap *source,
TranslatorBitmap *destination);
// swaps the byte order of source, no matter what the
// byte order of source is, and copies the result to
// destination
private:
TranslatorBitmap *fpBigEndianHeader;