Fixes warning about uint type
uint is already a type defined by other libraries (ie, opencv)
This commit is contained in:
parent
82607efb57
commit
af49b46fc0
@ -1226,8 +1226,8 @@ template <typename T> FMT_API decimal_fp<T> to_decimal(T x) FMT_NOEXCEPT;
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
constexpr typename dragonbox::float_info<T>::carrier_uint exponent_mask() {
|
constexpr typename dragonbox::float_info<T>::carrier_uint exponent_mask() {
|
||||||
using uint = typename dragonbox::float_info<T>::carrier_uint;
|
using uinty = typename dragonbox::float_info<T>::carrier_uint;
|
||||||
return ((uint(1) << dragonbox::float_info<T>::exponent_bits) - 1)
|
return ((uinty(1) << dragonbox::float_info<T>::exponent_bits) - 1)
|
||||||
<< dragonbox::float_info<T>::significand_bits;
|
<< dragonbox::float_info<T>::significand_bits;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1818,18 +1818,18 @@ OutputIt write(OutputIt out, T value) {
|
|||||||
if (const_check(!is_supported_floating_point(value))) return out;
|
if (const_check(!is_supported_floating_point(value))) return out;
|
||||||
|
|
||||||
using floaty = conditional_t<std::is_same<T, long double>::value, double, T>;
|
using floaty = conditional_t<std::is_same<T, long double>::value, double, T>;
|
||||||
using uint = typename dragonbox::float_info<floaty>::carrier_uint;
|
using uinty = typename dragonbox::float_info<floaty>::carrier_uint;
|
||||||
auto bits = bit_cast<uint>(value);
|
auto bits = bit_cast<uinty>(value);
|
||||||
|
|
||||||
auto fspecs = float_specs();
|
auto fspecs = float_specs();
|
||||||
auto sign_bit = bits & (uint(1) << (num_bits<uint>() - 1));
|
auto sign_bit = bits & (uinty(1) << (num_bits<uinty>() - 1));
|
||||||
if (sign_bit != 0) {
|
if (sign_bit != 0) {
|
||||||
fspecs.sign = sign::minus;
|
fspecs.sign = sign::minus;
|
||||||
value = -value;
|
value = -value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const auto specs = basic_format_specs<Char>();
|
static const auto specs = basic_format_specs<Char>();
|
||||||
uint mask = exponent_mask<floaty>();
|
uinty mask = exponent_mask<floaty>();
|
||||||
if ((bits & mask) == mask)
|
if ((bits & mask) == mask)
|
||||||
return write_nonfinite(out, std::isinf(value), specs, fspecs);
|
return write_nonfinite(out, std::isinf(value), specs, fspecs);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user