mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-07 01:06:48 +08:00
template interface cleanup for min_safe_u64 and max_digits_u64.
This commit is contained in:
parent
d32ae04b1b
commit
c762936589
@ -1174,13 +1174,13 @@ fastfloat_really_inline constexpr uint8_t ch_to_digit(UC c) {
|
|||||||
return int_luts<>::chdigit[static_cast<unsigned char>(c)];
|
return int_luts<>::chdigit[static_cast<unsigned char>(c)];
|
||||||
}
|
}
|
||||||
|
|
||||||
fastfloat_really_inline constexpr uint8_t max_digits_u64(uint32_t base) {
|
fastfloat_really_inline constexpr uint8_t max_digits_u64(uint8_t base) {
|
||||||
return int_luts<>::maxdigits_u64[base - 2];
|
return int_luts<>::maxdigits_u64[base - 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
// If a u64 is exactly max_digits_u64() in length, this is
|
// If a u64 is exactly max_digits_u64() in length, this is
|
||||||
// the value below which it has definitely overflowed.
|
// the value below which it has definitely overflowed.
|
||||||
fastfloat_really_inline constexpr uint64_t min_safe_u64(uint32_t base) {
|
fastfloat_really_inline constexpr uint64_t min_safe_u64(uint8_t base) {
|
||||||
return int_luts<>::min_safe_u64[base - 2];
|
return int_luts<>::min_safe_u64[base - 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user