diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-10-26 23:24:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-10-26 23:24:41 +0200 |
commit | 6f065a7aff86528e5c780dccb50aeaecdb7896fb (patch) | |
tree | fdd1b809b3e73c537ee780a3de175937976245ec /sfx2 | |
parent | 11d2f3d6e1b6c9baf43d8521293c53525108436d (diff) |
Avoid undefined left shift of signed integer
...after 022b1b2a40fcaf8d201081dead44c1d3346d1972 "tdf#96505 Get rid of cargo
cult long integer literals"
Change-Id: I9e5cc9d63c2eddd1ad766c2f6b01a9ff49a09bfd
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/bastyp/bitset.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx index 665209b4c554..8a49a02661c9 100644 --- a/sfx2/source/bastyp/bitset.cxx +++ b/sfx2/source/bastyp/bitset.cxx @@ -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; |