From d7e25ddc2b042f5f2a81756d66e42d22e5c8104a Mon Sep 17 00:00:00 2001 From: Matthew Wilber Date: Sat, 11 Jan 2003 03:20:08 +0000 Subject: [PATCH] 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 --- headers/os/translation/BitmapStream.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/headers/os/translation/BitmapStream.h b/headers/os/translation/BitmapStream.h index 75aa464362..057d5a0f1c 100644 --- a/headers/os/translation/BitmapStream.h +++ b/headers/os/translation/BitmapStream.h @@ -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;