diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index 9100000..7b3aff8 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -84,8 +84,10 @@ fastfloat_really_inline uint64_t simd_read8_to_u64(__m128i const &data) { } fastfloat_really_inline uint64_t simd_read8_to_u64(char16_t const *chars) { - return simd_read8_to_u64( - _mm_loadu_si128(reinterpret_cast<__m128i const *>(chars))); //TODO: V1032 https://pvs-studio.com/en/docs/warnings/v1032/ The pointer 'chars' is cast to a more strictly aligned pointer type. + return simd_read8_to_u64(_mm_loadu_si128(reinterpret_cast<__m128i const *>( + chars))); // TODO: V1032 https://pvs-studio.com/en/docs/warnings/v1032/ + // The pointer 'chars' is cast to a more strictly aligned + // pointer type. } #elif defined(FASTFLOAT_NEON) @@ -155,8 +157,10 @@ simd_parse_if_eight_digits_unrolled(char16_t const *chars, } #ifdef FASTFLOAT_SSE2 // Load 8 UTF-16 characters (16 bytes) - __m128i const data = - _mm_loadu_si128(reinterpret_cast<__m128i const *>(chars)); //TODO: V1032 https://pvs-studio.com/en/docs/warnings/v1032/ The pointer 'chars' is cast to a more strictly aligned pointer type. + __m128i const data = _mm_loadu_si128(reinterpret_cast<__m128i const *>( + chars)); // TODO: V1032 https://pvs-studio.com/en/docs/warnings/v1032/ The + // pointer 'chars' is cast to a more strictly aligned pointer + // type. // Branchless "are all digits?" trick from Lemire: // (x - '0') <= 9 <=> (x + 32720) <= 32729 @@ -259,8 +263,8 @@ template struct parsed_number_string_t { #ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN bool negative{false}; #endif - bool invalid{false}; // be optimistic - bool too_many_digits{false}; // be optimistic + bool invalid{false}; // be optimistic + bool too_many_digits{false}; // be optimistic parse_error error{parse_error::no_error}; // be optimistic }; diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 8d64a1e..4b59652 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -205,22 +205,6 @@ FASTFLOAT_CONSTEXPR20 To bit_cast(const From &from) { #define FASTFLOAT_HAS_SIMD 1 #endif -// Don't silent this. This is an important warning! -//#if defined(__GNUC__) -// disable -Wcast-align=strict (GCC only) -//#define FASTFLOAT_SIMD_DISABLE_WARNINGS \ -// _Pragma("GCC diagnostic push") \ -// _Pragma("GCC diagnostic ignored \"-Wcast-align\"") -//#else -//#define FASTFLOAT_SIMD_DISABLE_WARNINGS -//#endif - -//#if defined(__GNUC__) -//#define FASTFLOAT_SIMD_RESTORE_WARNINGS _Pragma("GCC diagnostic pop") -//#else -//#define FASTFLOAT_SIMD_RESTORE_WARNINGS -//#endif - #ifdef FASTFLOAT_VISUAL_STUDIO #define fastfloat_really_inline __forceinline #else @@ -501,8 +485,9 @@ full_multiplication(uint64_t a, uint64_t b) noexcept { return answer; } -// Value of the mantissa. -typedef uint_fast64_t am_mant_t; // an unsigned int avoids signed overflows (which are bad) +// Value of the mantissa. An unsigned int avoids signed overflows (which are +// bad) +typedef uint_fast64_t am_mant_t; // Size of bits in the mantissa and path and rounding shifts typedef int_fast8_t am_bits_t;