diff --git a/single_include/nlohmann/json_view.hpp b/single_include/nlohmann/json_view.hpp index 9422f75da..8e215c3b9 100644 --- a/single_include/nlohmann/json_view.hpp +++ b/single_include/nlohmann/json_view.hpp @@ -2541,7 +2541,7 @@ template SizeType to_index(IntegerType idx) noexcept { const IntegerType zero = 0; - const auto result = static_cast(idx); + const auto result = static_cast(idx); // NOLINT(bugprone-signed-char-misuse,cert-str34-c): negative values are mapped below return (idx < zero || static_cast(result) != idx) ? (std::numeric_limits::max)() : result; } @@ -4374,7 +4374,7 @@ class basic_json_view // the end is unknown: assume a few bytes per node, the output buffer // grows should the value be larger const auto nodes = static_cast(document_data::after(m_node) - m_node); - return (std::min)(m_doc->size - m_node->off, static_cast(1024) + nodes * 16); + return (std::min)(m_doc->size - m_node->off, static_cast(1024) + (nodes * 16)); } /// the value of the first member with this key, or a discarded view @@ -4834,7 +4834,7 @@ using ordered_json_view = basic_json_view; NLOHMANN_JSON_NAMESPACE_END // tuple protocol for the items of basic_json_view::items() (structured bindings) -namespace std // NOLINT(cert-dcl58-cpp) +namespace std // NOLINT(cert-dcl58-cpp,bugprone-std-namespace-modification) { #if defined(__clang__) @@ -4843,11 +4843,11 @@ namespace std // NOLINT(cert-dcl58-cpp) #pragma clang diagnostic ignored "-Wmismatched-tags" #endif template -class tuple_size<::nlohmann::detail::view::view_item> // NOLINT(cert-dcl58-cpp) +class tuple_size<::nlohmann::detail::view::view_item> // NOLINT(cert-dcl58-cpp,bugprone-std-namespace-modification) : public std::integral_constant {}; template -class tuple_element> // NOLINT(cert-dcl58-cpp) +class tuple_element> // NOLINT(cert-dcl58-cpp,bugprone-std-namespace-modification) { public: using type = decltype(std::declval<::nlohmann::detail::view::view_item>().template get());