using in place swapping macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -938,7 +938,7 @@ bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height,
|
|||||||
unsigned char temp;
|
unsigned char temp;
|
||||||
if ( !stream.ReadAll(&aWord, 2) )
|
if ( !stream.ReadAll(&aWord, 2) )
|
||||||
return false;
|
return false;
|
||||||
aWord = wxUINT16_SWAP_ON_BE(aWord);
|
wxUINT16_SWAP_ON_BE_IN_PLACE(aWord);
|
||||||
linepos += 2;
|
linepos += 2;
|
||||||
/* Use the masks and calculated amount of shift
|
/* Use the masks and calculated amount of shift
|
||||||
to retrieve the color data out of the word. Then
|
to retrieve the color data out of the word. Then
|
||||||
@@ -958,7 +958,7 @@ bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height,
|
|||||||
if ( !stream.ReadAll(&aDword, 4) )
|
if ( !stream.ReadAll(&aDword, 4) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
aDword = wxINT32_SWAP_ON_BE(aDword);
|
wxINT32_SWAP_ON_BE_IN_PLACE(aDword);
|
||||||
linepos += 4;
|
linepos += 4;
|
||||||
temp = (unsigned char)((aDword & rmask) >> rshift);
|
temp = (unsigned char)((aDword & rmask) >> rshift);
|
||||||
ptr[poffset] = temp;
|
ptr[poffset] = temp;
|
||||||
|
|||||||
Reference in New Issue
Block a user