Kaydet (Commit) 6f065a7a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Avoid undefined left shift of signed integer

...after 022b1b2a "tdf#96505 Get rid of cargo
cult long integer literals"

Change-Id: I9e5cc9d63c2eddd1ad766c2f6b01a9ff49a09bfd
üst 11d2f3d6
......@@ -29,7 +29,7 @@
IndexBitSet& IndexBitSet::operator-=(sal_uInt16 nBit)
{
sal_uInt16 nBlock = nBit / 32;
sal_uInt32 nBitVal = 1 << (nBit % 32);
sal_uInt32 nBitVal = 1U << (nBit % 32);
if ( nBlock >= nBlocks )
return *this;
......@@ -48,7 +48,7 @@ IndexBitSet& IndexBitSet::operator-=(sal_uInt16 nBit)
IndexBitSet& IndexBitSet::operator|=( sal_uInt16 nBit )
{
sal_uInt16 nBlock = nBit / 32;
sal_uInt32 nBitVal = 1 << (nBit % 32);
sal_uInt32 nBitVal = 1U << (nBit % 32);
if ( nBlock >= nBlocks )
{
......@@ -78,7 +78,7 @@ IndexBitSet& IndexBitSet::operator|=( sal_uInt16 nBit )
bool IndexBitSet::Contains( sal_uInt16 nBit ) const
{
sal_uInt16 nBlock = nBit / 32;
sal_uInt32 nBitVal = 1 << (nBit % 32);
sal_uInt32 nBitVal = 1U << (nBit % 32);
if ( nBlock >= nBlocks )
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment