mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-11-09 14:49:59 +08:00
fix for UTF-16 emoji parsing.
This commit is contained in:
parent
363141fc43
commit
ce06f10c2a
@ -31,7 +31,9 @@ fastfloat_really_inline constexpr bool has_simd_opt() noexcept {
|
||||
// able to optimize it well.
|
||||
template <typename UC>
|
||||
fastfloat_really_inline constexpr bool is_integer(UC c) noexcept {
|
||||
return static_cast<uint8_t>(c - UC('0')) <= 9;
|
||||
const auto d = c - UC('0');
|
||||
// UC may be signed.
|
||||
return d >= 0 && d <= 9;
|
||||
}
|
||||
|
||||
#if FASTFLOAT_IS_BIG_ENDIAN
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user