mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
format
This commit is contained in:
parent
bb956b29db
commit
0b6d911220
@ -1134,8 +1134,10 @@ template <typename UC>
|
|||||||
fastfloat_really_inline constexpr uint8_t ch_to_digit(UC c) {
|
fastfloat_really_inline constexpr uint8_t ch_to_digit(UC c) {
|
||||||
// wchar_t and char can be signed, so we need to be careful.
|
// wchar_t and char can be signed, so we need to be careful.
|
||||||
using UnsignedUC = typename std::make_unsigned<UC>::type;
|
using UnsignedUC = typename std::make_unsigned<UC>::type;
|
||||||
return int_luts<>::chdigit[static_cast<unsigned char>(static_cast<UnsignedUC>(c)
|
return int_luts<>::chdigit[static_cast<unsigned char>(
|
||||||
& static_cast<UnsignedUC>(-((static_cast<UnsignedUC>(c) & ~0xFFull) == 0)))];
|
static_cast<UnsignedUC>(c) &
|
||||||
|
static_cast<UnsignedUC>(
|
||||||
|
-((static_cast<UnsignedUC>(c) & ~0xFFull) == 0)))];
|
||||||
}
|
}
|
||||||
|
|
||||||
fastfloat_really_inline constexpr size_t max_digits_u64(int base) {
|
fastfloat_really_inline constexpr size_t max_digits_u64(int base) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user