mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-02-06 01:39:51 +08:00
fix early return error in fastfloat_strncasecmp
This commit is contained in:
parent
71ab1cce81
commit
4fa83ccff4
@ -290,8 +290,8 @@ fastfloat_strncasecmp3(UC const *actual_mixedcase,
|
|||||||
if ((actual_mixedcase[i] | 32) != expected_lowercase[i]) {
|
if ((actual_mixedcase[i] | 32) != expected_lowercase[i]) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
} else {
|
} else {
|
||||||
FASTFLOAT_IF_CONSTEXPR17(sizeof(UC) == 1 || sizeof(UC) == 2) {
|
FASTFLOAT_IF_CONSTEXPR17(sizeof(UC) == 1 || sizeof(UC) == 2) {
|
||||||
::memcpy(&val1, actual_mixedcase, 3 * sizeof(UC));
|
::memcpy(&val1, actual_mixedcase, 3 * sizeof(UC));
|
||||||
@ -328,8 +328,8 @@ fastfloat_strncasecmp5(UC const *actual_mixedcase,
|
|||||||
if ((actual_mixedcase[i] | 32) != expected_lowercase[i]) {
|
if ((actual_mixedcase[i] | 32) != expected_lowercase[i]) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
} else {
|
} else {
|
||||||
FASTFLOAT_IF_CONSTEXPR17(sizeof(UC) == 1) {
|
FASTFLOAT_IF_CONSTEXPR17(sizeof(UC) == 1) {
|
||||||
mask = 0x2020202020202020;
|
mask = 0x2020202020202020;
|
||||||
@ -395,8 +395,8 @@ fastfloat_strncasecmp(UC const *actual_mixedcase, UC const *expected_lowercase,
|
|||||||
if ((actual_mixedcase[i] | 32) != expected_lowercase[i]) {
|
if ((actual_mixedcase[i] | 32) != expected_lowercase[i]) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
} else {
|
} else {
|
||||||
uint64_t val1{0}, val2{0};
|
uint64_t val1{0}, val2{0};
|
||||||
size_t sz{8 / (sizeof(UC))};
|
size_t sz{8 / (sizeof(UC))};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user