Skip to content

Commit

Permalink
xrDXT: Fix conformance in For loop scope (#104).
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Jan 15, 2016
1 parent 8cd1471 commit 92ef30e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/xrDXT/Image_DXTC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -990,9 +990,11 @@ inline void GetColorBlockColors_m1(DXTColBlock* pBlock, Color8888* col_0, Color8
//-----------------------------------------------------------------------------
WORD GetNumberOfBits(DWORD dwMask)
{
for (WORD wBits = 0; dwMask; wBits++)
WORD wBits = 0;
while (dwMask)
{
dwMask = dwMask & (dwMask - 1);
dwMask &= dwMask-1;
wBits++;
}
return wBits;
}

0 comments on commit 92ef30e

Please sign in to comment.