From 09ab236cfebbd403e0137042c6b40b7b62eb9a36 Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Mon, 28 Feb 2022 18:12:54 -0500 Subject: [PATCH] fix clang tidy error --- include/nlohmann/detail/output/binary_writer.hpp | 4 ++-- single_include/nlohmann/json.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/nlohmann/detail/output/binary_writer.hpp b/include/nlohmann/detail/output/binary_writer.hpp index b3ef9d2a7..ab067d27b 100644 --- a/include/nlohmann/detail/output/binary_writer.hpp +++ b/include/nlohmann/detail/output/binary_writer.hpp @@ -1609,11 +1609,11 @@ class binary_writer }; string_t key = "_ArrayType_"; - if (bjdtype.find(std::string(value.at(key))) == bjdtype.end()) + if (bjdtype.find(static_cast(value.at(key))) == bjdtype.end()) { return 1; } - CharType dtype = bjdtype[std::string(value.at(key))]; + CharType dtype = bjdtype[static_cast(value.at(key))]; key = "_ArraySize_"; std::size_t len = (value.at(key).empty() ? 0 : 1); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 3ac66c3a2..73495b8d3 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -15501,11 +15501,11 @@ class binary_writer }; string_t key = "_ArrayType_"; - if (bjdtype.find(std::string(value.at(key))) == bjdtype.end()) + if (bjdtype.find(static_cast(value.at(key))) == bjdtype.end()) { return 1; } - CharType dtype = bjdtype[std::string(value.at(key))]; + CharType dtype = bjdtype[static_cast(value.at(key))]; key = "_ArraySize_"; std::size_t len = (value.at(key).empty() ? 0 : 1);