Skip to content

Commit

Permalink
Fixed a compiler warning for simdjson.h
Browse files Browse the repository at this point in the history
The warning -Wbitwise-instead-of-logical was firing due to suspicious
use of bools.  Fixed.
  • Loading branch information
cculianu committed Jun 5, 2022
1 parent be9ca1d commit 4ee413a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Json/simdjson/simdjson.h
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 4ee413a

Please sign in to comment.