These compilers are really pedantic.
This commit is contained in:
parent
e7004cef76
commit
1c4593c648
|
@ -168,7 +168,8 @@ void brute_force_tests() {
|
|||
}
|
||||
for (size_t flip = 0; flip < 1000; ++flip) {
|
||||
// we are going to hack the string as long as it is UTF-8
|
||||
UTF8[rand() % UTF8.size()] ^= uint8_t(1 << (rand() % 8)); // we flip exactly one bit
|
||||
const int bitflip{1 << (rand() % 8)};
|
||||
UTF8[rand() % UTF8.size()] = uint8_t(bitflip); // we flip exactly one bit
|
||||
bool is_ok =
|
||||
simdjson::validate_utf8((const char *)UTF8.data(), UTF8.size());
|
||||
bool is_ok_basic =
|
||||
|
|
Loading…
Reference in New Issue