Skip to content

Commit caa32e6

Browse files
committed
fix: change to single line if for countls and change x to f (typo)
1 parent 11fe65a commit caa32e6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libc/src/__support/fixed_point/fx_bits.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,11 @@ countls(T f) {
187187
constexpr int CONTAIN_LEN = cpp::numeric_limits<BitType>::digits;
188188
constexpr int PADDING_LEN = CONTAIN_LEN - FXRep::TOTAL_LEN;
189189

190-
if constexpr (FXRep::SIGN_LEN != 0) {
190+
if constexpr (FXRep::SIGN_LEN != 0)
191191
if (f < 0)
192192
f = bit_not(f);
193-
}
194193

195-
BitType value_bits = FXBits(x)::get_bits();
194+
BitType value_bits = FXBits(f)::get_bits();
196195
return cpp::countl_zero(value_bits) - PADDING_LEN;
197196
}
198197

0 commit comments

Comments
 (0)