From a3c4218345121056a7f48bf9487913d585807230 Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Mon, 14 Mar 2022 11:49:11 -0400 Subject: [PATCH] fix ci clang gcc error --- include/nlohmann/detail/output/binary_writer.hpp | 3 ++- single_include/nlohmann/json.hpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/nlohmann/detail/output/binary_writer.hpp b/include/nlohmann/detail/output/binary_writer.hpp index 842640503..c682e72dc 100644 --- a/include/nlohmann/detail/output/binary_writer.hpp +++ b/include/nlohmann/detail/output/binary_writer.hpp @@ -9,6 +9,7 @@ #include // numeric_limits #include // string #include // move +#include // vector #include #include @@ -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(first_prefix)) != std::string::npos)) { prefix_required = false; oa->write_character(to_char_type('$')); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 5b8d054c6..974653623 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -13765,6 +13765,7 @@ class json_ref #include // numeric_limits #include // string #include // move +#include // vector // #include @@ -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(first_prefix)) != std::string::npos)) { prefix_required = false; oa->write_character(to_char_type('$'));