We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07e1de8 commit c2b4b99Copy full SHA for c2b4b99
libc/src/__support/fixed_point/fx_bits.h
@@ -256,9 +256,9 @@ template <typename XType> LIBC_INLINE constexpr XType divi(int n, int d) {
256
constexpr int F = FXRep<XType>::FRACTION_LEN;
257
int64_t scaled_n = static_cast<int64_t>(n) << F;
258
int64_t res64 = scaled_n >> k;
259
- constexpr int TotalBits = sizeof(XType) * 8;
260
- const int64_t max_limit = (1LL << (TotalBits - 1)) - 1;
261
- const int64_t min_limit = -(1LL << (TotalBits - 1));
+ constexpr int TOTAL_BITS = sizeof(XType) * 8;
+ const int64_t max_limit = (1LL << (TOTAL_BITS - 1)) - 1;
+ const int64_t min_limit = -(1LL << (TOTAL_BITS - 1));
262
if (res64 > max_limit) {
263
return FXRep<XType>::MAX();
264
} else if (res64 < min_limit) {
0 commit comments