mirror of
https://github.com/shadps4-emu/ext-fmt.git
synced 2024-11-24 02:09:49 +00:00
Fix warnings
This commit is contained in:
parent
ab1474ef66
commit
07d5a86a7c
@ -1018,10 +1018,12 @@ Char* format_uint(Char* buffer, internal::uintptr_t n, int num_digits,
|
||||
bool = false) {
|
||||
auto char_digits = std::numeric_limits<unsigned char>::digits / 4;
|
||||
int start = (num_digits + char_digits - 1) / char_digits - 1;
|
||||
if (int start_digits = num_digits % char_digits)
|
||||
buffer = format_uint<BASE_BITS>(buffer, n.value[start--], start_digits);
|
||||
if (int start_digits = num_digits % char_digits) {
|
||||
unsigned value = n.value[start--];
|
||||
buffer = format_uint<BASE_BITS>(buffer, value, start_digits);
|
||||
}
|
||||
for (; start >= 0; --start) {
|
||||
auto value = n.value[start];
|
||||
unsigned value = n.value[start];
|
||||
buffer += char_digits;
|
||||
auto p = buffer;
|
||||
for (int i = 0; i < char_digits; ++i) {
|
||||
|
@ -94,7 +94,7 @@ TEST(FPTest, GetCachedPower) {
|
||||
EXPECT_LE(exp, fp.e);
|
||||
int dec_exp_step = 8;
|
||||
EXPECT_LE(fp.e, exp + dec_exp_step * log2(10));
|
||||
EXPECT_DOUBLE_EQ(pow(10, dec_exp), ldexp(fp.f, fp.e));
|
||||
EXPECT_DOUBLE_EQ(pow(10, dec_exp), ldexp(static_cast<double>(fp.f), fp.e));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user