MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / skip_zeros

Function skip_zeros

source/extern/fast_float.h:3288–3305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3286}
3287template <typename UC>
3288fastfloat_really_inline FASTFLOAT_CONSTEXPR20 void
3289skip_zeros(UC const *&first, UC const *last) noexcept {
3290 uint64_t val;
3291 while (!cpp20_and_in_constexpr() &&
3292 std::distance(first, last) >= int_cmp_len<UC>()) {
3293 ::memcpy(&val, first, sizeof(uint64_t));
3294 if (val != int_cmp_zeros<UC>()) {
3295 break;
3296 }
3297 first += int_cmp_len<UC>();
3298 }
3299 while (first != last) {
3300 if (*first != UC('0')) {
3301 break;
3302 }
3303 first++;
3304 }
3305}
3306
3307// determine if any non-zero digits were truncated.
3308// all characters must be valid digits.

Callers 1

parse_mantissaFunction · 0.85

Calls 1

cpp20_and_in_constexprFunction · 0.85

Tested by

no test coverage detected