File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -222,12 +222,15 @@ fastfloat_really_inline constexpr bool is_supported_char_type() {
222
222
// Compares two ASCII strings in a case insensitive manner.
223
223
template <typename UC>
224
224
inline FASTFLOAT_CONSTEXPR14 bool
225
- fastfloat_strncasecmp (UC const *input1 , UC const *input2, size_t length) {
226
- char running_diff{ 0 };
225
+ fastfloat_strncasecmp (UC const *actual_mixedcase , UC const *expected_lowercase,
226
+ size_t length) {
227
227
for (size_t i = 0 ; i < length; ++i) {
228
- running_diff |= (char (input1[i]) ^ char (input2[i]));
228
+ UC const actual = actual_mixedcase[i];
229
+ if ((actual < 256 ? actual | 32 : actual) != expected_lowercase[i]) {
230
+ return false ;
231
+ }
229
232
}
230
- return (running_diff == 0 ) || (running_diff == 32 ) ;
233
+ return true ;
231
234
}
232
235
233
236
#ifndef FLT_EVAL_METHOD
You can’t perform that action at this time.
0 commit comments