Skip to content

Commit a8c78f4

Browse files
committed
unfck lint.
1 parent 2aba168 commit a8c78f4

File tree

2 files changed

+13
-24
lines changed

2 files changed

+13
-24
lines changed

include/fast_float/ascii_number.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ fastfloat_really_inline uint64_t simd_read8_to_u64(__m128i const &data) {
8484
}
8585

8686
fastfloat_really_inline uint64_t simd_read8_to_u64(char16_t const *chars) {
87-
return simd_read8_to_u64(
88-
_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.
87+
return simd_read8_to_u64(_mm_loadu_si128(reinterpret_cast<__m128i const *>(
88+
chars))); // TODO: V1032 https://pvs-studio.com/en/docs/warnings/v1032/
89+
// The pointer 'chars' is cast to a more strictly aligned
90+
// pointer type.
8991
}
9092

9193
#elif defined(FASTFLOAT_NEON)
@@ -155,8 +157,10 @@ simd_parse_if_eight_digits_unrolled(char16_t const *chars,
155157
}
156158
#ifdef FASTFLOAT_SSE2
157159
// Load 8 UTF-16 characters (16 bytes)
158-
__m128i const data =
159-
_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.
160+
__m128i const data = _mm_loadu_si128(reinterpret_cast<__m128i const *>(
161+
chars)); // TODO: V1032 https://pvs-studio.com/en/docs/warnings/v1032/ The
162+
// pointer 'chars' is cast to a more strictly aligned pointer
163+
// type.
160164

161165
// Branchless "are all digits?" trick from Lemire:
162166
// (x - '0') <= 9 <=> (x + 32720) <= 32729
@@ -259,8 +263,8 @@ template <typename UC> struct parsed_number_string_t {
259263
#ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
260264
bool negative{false};
261265
#endif
262-
bool invalid{false}; // be optimistic
263-
bool too_many_digits{false}; // be optimistic
266+
bool invalid{false}; // be optimistic
267+
bool too_many_digits{false}; // be optimistic
264268
parse_error error{parse_error::no_error}; // be optimistic
265269
};
266270

include/fast_float/float_common.h

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -205,22 +205,6 @@ FASTFLOAT_CONSTEXPR20 To bit_cast(const From &from) {
205205
#define FASTFLOAT_HAS_SIMD 1
206206
#endif
207207

208-
// Don't silent this. This is an important warning!
209-
//#if defined(__GNUC__)
210-
// disable -Wcast-align=strict (GCC only)
211-
//#define FASTFLOAT_SIMD_DISABLE_WARNINGS \
212-
// _Pragma("GCC diagnostic push") \
213-
// _Pragma("GCC diagnostic ignored \"-Wcast-align\"")
214-
//#else
215-
//#define FASTFLOAT_SIMD_DISABLE_WARNINGS
216-
//#endif
217-
218-
//#if defined(__GNUC__)
219-
//#define FASTFLOAT_SIMD_RESTORE_WARNINGS _Pragma("GCC diagnostic pop")
220-
//#else
221-
//#define FASTFLOAT_SIMD_RESTORE_WARNINGS
222-
//#endif
223-
224208
#ifdef FASTFLOAT_VISUAL_STUDIO
225209
#define fastfloat_really_inline __forceinline
226210
#else
@@ -501,8 +485,9 @@ full_multiplication(uint64_t a, uint64_t b) noexcept {
501485
return answer;
502486
}
503487

504-
// Value of the mantissa.
505-
typedef uint_fast64_t am_mant_t; // an unsigned int avoids signed overflows (which are bad)
488+
// Value of the mantissa. An unsigned int avoids signed overflows (which are
489+
// bad)
490+
typedef uint_fast64_t am_mant_t;
506491
// Size of bits in the mantissa and path and rounding shifts
507492
typedef int_fast8_t am_bits_t;
508493

0 commit comments

Comments
 (0)