MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / ch_to_digit

Function ch_to_digit

app/src/ThirdParty/fast_float.h:1461–1468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1459
1460template <typename UC>
1461fastfloat_really_inline constexpr uint8_t ch_to_digit(UC c) {
1462 // wchar_t and char can be signed, so we need to be careful.
1463 using UnsignedUC = typename std::make_unsigned<UC>::type;
1464 return int_luts<>::chdigit[static_cast<unsigned char>(
1465 static_cast<UnsignedUC>(c) &
1466 static_cast<UnsignedUC>(
1467 -((static_cast<UnsignedUC>(c) & ~0xFFull) == 0)))];
1468}
1469
1470fastfloat_really_inline constexpr size_t max_digits_u64(int base) {
1471 return int_luts<>::maxdigits_u64[base - 2];

Callers 1

fast_float.hFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected