diff options
author | Jack Lloyd <[email protected]> | 2017-10-06 21:09:01 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-10-06 21:09:01 -0400 |
commit | 9e3dca25c7197c39a815ce39da670a4232212a45 (patch) | |
tree | 06282ebe4c88e0f840320cf8b8584eab8550fec2 /src/lib/block | |
parent | aff93b716eda9d10be9f02e4b436b672510ab179 (diff) |
Address some bool/int conversion warnings from Sonar
Nothing major but probably good to clean these up.
Diffstat (limited to 'src/lib/block')
-rw-r--r-- | src/lib/block/idea/idea.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/block/idea/idea.cpp b/src/lib/block/idea/idea.cpp index 4795a126a..c0364b325 100644 --- a/src/lib/block/idea/idea.cpp +++ b/src/lib/block/idea/idea.cpp @@ -26,7 +26,8 @@ inline uint16_t mul(uint16_t x, uint16_t y) const uint32_t P_hi = P >> 16; const uint32_t P_lo = P & 0xFFFF; - const uint16_t r_1 = static_cast<uint16_t>((P_lo - P_hi) + (P_lo < P_hi)); + const uint16_t carry = (P_lo < P_hi); + const uint16_t r_1 = static_cast<uint16_t>((P_lo - P_hi) + carry); const uint16_t r_2 = 1 - x - y; return CT::select(Z_mask, r_1, r_2); |