unfck lint.

This commit is contained in:
IRainman 2025-12-25 15:15:25 +03:00
parent 2aba1685b0
commit a8c78f4403
2 changed files with 13 additions and 24 deletions

View File

@ -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 <typename UC> 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
};

View File

@ -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;