fix ci clang gcc error

This commit is contained in:
Qianqian Fang 2022-03-14 11:49:11 -04:00
parent f3ec3be0b2
commit a3c4218345
2 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,7 @@
#include <limits> // numeric_limits
#include <string> // string
#include <utility> // move
#include <vector> // vector
#include <nlohmann/detail/input/binary_reader.hpp>
#include <nlohmann/detail/macro_scope.hpp>
@ -900,7 +901,7 @@ class binary_writer
return ubjson_prefix(v, use_bjdata) == first_prefix;
});
if (same_prefix && !(use_bjdata && std::string("[{SHTFNZ").find(first_prefix) != std::string::npos))
if (same_prefix && !(use_bjdata && std::string("[{SHTFNZ").find(static_cast<char>(first_prefix)) != std::string::npos))
{
prefix_required = false;
oa->write_character(to_char_type('$'));

View File

@ -13765,6 +13765,7 @@ class json_ref
#include <limits> // numeric_limits
#include <string> // string
#include <utility> // move
#include <vector> // vector
// #include <nlohmann/detail/input/binary_reader.hpp>
@ -14799,7 +14800,7 @@ class binary_writer
return ubjson_prefix(v, use_bjdata) == first_prefix;
});
if (same_prefix && !(use_bjdata && std::string("[{SHTFNZ").find(first_prefix) != std::string::npos))
if (same_prefix && !(use_bjdata && std::string("[{SHTFNZ").find(static_cast<char>(first_prefix)) != std::string::npos))
{
prefix_required = false;
oa->write_character(to_char_type('$'));