Skip to content

Commit 488044a

Browse files
committed
Cosmetics
1 parent 4a2c696 commit 488044a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/slimcpplib/long_fixdiv.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ constexpr long_fixed_divider<type_t> long_fixed_divider<type_t>::create(const ty
159159

160160
if (divider == 1) {
161161

162-
multiplier = ~type_t(0);
163-
addition = ~type_t(0);
162+
multiplier = type_t(~type_t(0));
163+
addition = type_t(~type_t(0));
164164
shift = 0;
165165

166166
} else {
@@ -182,8 +182,8 @@ constexpr type_t long_fixed_divider<type_t>::divide(const type_t& dividend) cons
182182
type_t mul_lo = dividend;
183183
type_t mul_hi = mul(mul_lo, multiplier);
184184

185-
//if (addition != 0)
186-
mul_hi += add(mul_lo, addition);
185+
if (addition != 0)
186+
mul_hi += add(mul_lo, addition);
187187

188188
return mul_hi >>= shift;
189189
}

0 commit comments

Comments
 (0)