Skip to content

Commit adb847e

Browse files
committed
Compilation fix for Ubuntu 24.04, updated docs.
1 parent 1d3332e commit adb847e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

include/fast_float/ascii_number.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ fastfloat_really_inline uint64_t simd_read8_to_u64(__m128i const &data) {
8484

8585
fastfloat_really_inline uint64_t simd_read8_to_u64(char16_t const *chars) {
8686
FASTFLOAT_SIMD_DISABLE_WARNINGS
87+
// unaligned SIMD instruction -> all fine.
8788
return simd_read8_to_u64(
8889
_mm_loadu_si128(reinterpret_cast<__m128i const *>(chars)));
8990
FASTFLOAT_SIMD_RESTORE_WARNINGS
@@ -172,6 +173,7 @@ simd_parse_if_eight_digits_unrolled(char16_t const *chars,
172173
#ifdef FASTFLOAT_SSE2
173174
FASTFLOAT_SIMD_DISABLE_WARNINGS
174175
// Load 8 UTF-16 characters (16 bytes)
176+
// unaligned SIMD instruction -> all fine.
175177
__m128i const data =
176178
_mm_loadu_si128(reinterpret_cast<__m128i const *>(chars));
177179
FASTFLOAT_SIMD_RESTORE_WARNINGS

include/fast_float/parse_number.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ template <> struct from_chars_caller<std::float32_t> {
162162
// if std::float32_t is defined, and we are in C++23 mode; macro set for
163163
// float32; set value to float due to equivalence between float and
164164
// float32_t
165-
float val;
165+
float val = 0;
166166
auto ret = from_chars_advanced(first, last, val, options);
167167
value = val;
168168
return ret;
@@ -179,7 +179,7 @@ template <> struct from_chars_caller<std::float64_t> {
179179
// if std::float64_t is defined, and we are in C++23 mode; macro set for
180180
// float64; set value as double due to equivalence between double and
181181
// float64_t
182-
double val;
182+
double val = 0;
183183
auto ret = from_chars_advanced(first, last, val, options);
184184
value = val;
185185
return ret;

0 commit comments

Comments
 (0)