From 4ee413a9e7d50441094856d8af411ddea09ab831 Mon Sep 17 00:00:00 2001 From: Calin Culianu Date: Sun, 5 Jun 2022 15:41:04 -0500 Subject: [PATCH] Fixed a compiler warning for simdjson.h The warning -Wbitwise-instead-of-logical was firing due to suspicious use of bools. Fixed. --- src/Json/simdjson/simdjson.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Json/simdjson/simdjson.h b/src/Json/simdjson/simdjson.h index 5568896e..5b974952 100644 --- a/src/Json/simdjson/simdjson.h +++ b/src/Json/simdjson/simdjson.h @@ -8268,10 +8268,10 @@ simdjson_really_inline void mini_formatter::string(std::string_view unescaped) { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; for(;i + 8 <= unescaped.length(); i += 8) { // Poor's man vectorization. This could get much faster if we used SIMD. - if(needs_escaping[uint8_t(unescaped[i])] | needs_escaping[uint8_t(unescaped[i+1])] - | needs_escaping[uint8_t(unescaped[i+2])] | needs_escaping[uint8_t(unescaped[i+3])] - | needs_escaping[uint8_t(unescaped[i+4])] | needs_escaping[uint8_t(unescaped[i+5])] - | needs_escaping[uint8_t(unescaped[i+6])] | needs_escaping[uint8_t(unescaped[i+7])] + if(needs_escaping[uint8_t(unescaped[i])] || needs_escaping[uint8_t(unescaped[i+1])] + || needs_escaping[uint8_t(unescaped[i+2])] || needs_escaping[uint8_t(unescaped[i+3])] + || needs_escaping[uint8_t(unescaped[i+4])] || needs_escaping[uint8_t(unescaped[i+5])] + || needs_escaping[uint8_t(unescaped[i+6])] || needs_escaping[uint8_t(unescaped[i+7])] ) { break; } } for(;i < unescaped.length(); i++) {