Skip to content

Commit 3b7dc1e

Browse files
committed
cleanup, unfortunately, the patch isn't correct. fastfloat_strncasecmp3 fastfloat_strncasecmp5 and fastfloat_strncasecmp needs to be revised by the author.
1 parent 58bfb03 commit 3b7dc1e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

include/fast_float/float_common.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,10 @@ inline FASTFLOAT_CONSTEXPR14 bool
328328
fastfloat_strncasecmp3(UC const *actual_mixedcase,
329329
UC const *expected_lowercase) {
330330
if (cpp20_and_in_constexpr()) {
331-
for (uint_fast8_t i = 0; i < 3; i++) {
331+
for (uint_fast8_t i = 0; i != 3; ++i) {
332332
if ((actual_mixedcase[i] | 32) != expected_lowercase[i]) {
333333
return false;
334334
}
335-
return true;
336335
}
337336
} else {
338337
uint64_t val1, val2;
@@ -373,7 +372,7 @@ inline FASTFLOAT_CONSTEXPR14 bool
373372
fastfloat_strncasecmp5(UC const *actual_mixedcase,
374373
UC const *expected_lowercase) {
375374
if (cpp20_and_in_constexpr()) {
376-
for (uint_fast8_t i = 0; i < 5; i++) {
375+
for (uint_fast8_t i = 0; i != 5; ++i) {
377376
if ((actual_mixedcase[i] | 32) != expected_lowercase[i]) {
378377
return false;
379378
}
@@ -428,7 +427,7 @@ inline FASTFLOAT_CONSTEXPR14 bool
428427
fastfloat_strncasecmp(UC const *actual_mixedcase, UC const *expected_lowercase,
429428
uint_fast8_t const length) noexcept {
430429
if (cpp20_and_in_constexpr()) {
431-
for (uint_fast8_t i = 0; i < length; i++) {
430+
for (uint_fast8_t i = 0; i != length; ++i) {
432431
if ((actual_mixedcase[i] | 32) != expected_lowercase[i]) {
433432
return false;
434433
}

0 commit comments

Comments
 (0)