ofz: Undefined-shift
Change-Id: Ibb42de616566aabdf6596b7c45d0afab90118bc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175877 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
parent
52a91c1e32
commit
15eb26d0f2
1 changed files with 5 additions and 2 deletions
|
@ -119,8 +119,11 @@ fix16_t fix16_div(fix16_t a, fix16_t b)
|
|||
int shift = std::countl_zero(remainder);
|
||||
if (shift > bit_pos)
|
||||
shift = bit_pos;
|
||||
remainder = (remainder & mask(32 - shift)) << shift;
|
||||
bit_pos -= shift;
|
||||
if (shift)
|
||||
{
|
||||
remainder = (remainder & mask(32 - shift)) << shift;
|
||||
bit_pos -= shift;
|
||||
}
|
||||
|
||||
uint32_t div = remainder / divider;
|
||||
remainder = remainder % divider;
|
||||
|
|
Loading…
Reference in a new issue