mirror of
https://github.com/nlohmann/json.git
synced 2026-06-06 12:49:43 +00:00
@@ -128,7 +128,7 @@ class serializer
|
||||
const auto new_indent = current_indent + indent_step;
|
||||
if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))
|
||||
{
|
||||
indent_string.resize(std::max(indent_string.size() * 2, static_cast<std::size_t>(new_indent)), indent_char);
|
||||
indent_string.resize((std::max)(indent_string.size() * 2, static_cast<std::size_t>(new_indent)), indent_char);
|
||||
JSON_ASSERT(indent_string.size() >= new_indent);
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ class serializer
|
||||
const auto new_indent = current_indent + indent_step;
|
||||
if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))
|
||||
{
|
||||
indent_string.resize(std::max(indent_string.size() * 2, static_cast<std::size_t>(new_indent)), indent_char);
|
||||
indent_string.resize((std::max)(indent_string.size() * 2, static_cast<std::size_t>(new_indent)), indent_char);
|
||||
JSON_ASSERT(indent_string.size() >= new_indent);
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ class serializer
|
||||
const auto new_indent = current_indent + indent_step;
|
||||
if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))
|
||||
{
|
||||
indent_string.resize(std::max(indent_string.size() * 2, static_cast<std::size_t>(new_indent)), indent_char);
|
||||
indent_string.resize((std::max)(indent_string.size() * 2, static_cast<std::size_t>(new_indent)), indent_char);
|
||||
JSON_ASSERT(indent_string.size() >= new_indent);
|
||||
}
|
||||
|
||||
|
||||
@@ -19302,7 +19302,7 @@ class serializer
|
||||
const auto new_indent = current_indent + indent_step;
|
||||
if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))
|
||||
{
|
||||
indent_string.resize(std::max(indent_string.size() * 2, static_cast<std::size_t>(new_indent)), indent_char);
|
||||
indent_string.resize((std::max)(indent_string.size() * 2, static_cast<std::size_t>(new_indent)), indent_char);
|
||||
JSON_ASSERT(indent_string.size() >= new_indent);
|
||||
}
|
||||
|
||||
@@ -19376,7 +19376,7 @@ class serializer
|
||||
const auto new_indent = current_indent + indent_step;
|
||||
if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))
|
||||
{
|
||||
indent_string.resize(std::max(indent_string.size() * 2, static_cast<std::size_t>(new_indent)), indent_char);
|
||||
indent_string.resize((std::max)(indent_string.size() * 2, static_cast<std::size_t>(new_indent)), indent_char);
|
||||
JSON_ASSERT(indent_string.size() >= new_indent);
|
||||
}
|
||||
|
||||
@@ -19438,7 +19438,7 @@ class serializer
|
||||
const auto new_indent = current_indent + indent_step;
|
||||
if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))
|
||||
{
|
||||
indent_string.resize(std::max(indent_string.size() * 2, static_cast<std::size_t>(new_indent)), indent_char);
|
||||
indent_string.resize((std::max)(indent_string.size() * 2, static_cast<std::size_t>(new_indent)), indent_char);
|
||||
JSON_ASSERT(indent_string.size() >= new_indent);
|
||||
}
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ TEST_CASE("object inspection")
|
||||
{
|
||||
SECTION("array")
|
||||
{
|
||||
const auto j_array = "[[[[[[]]]]]]"_json;
|
||||
const auto j_array = json::parse("[[[[[[]]]]]]");
|
||||
// check right size after indentation triggering a resize
|
||||
CHECK(j_array.dump(1024).size() == 25622);
|
||||
// check if right indentation symbol is used
|
||||
@@ -260,7 +260,7 @@ TEST_CASE("object inspection")
|
||||
|
||||
SECTION("object")
|
||||
{
|
||||
const auto j_object = R"({"":{"":{"":{"":{"":{}}}}}})"_json;
|
||||
const auto j_object = json::parse(R"({"":{"":{"":{"":{"":{}}}}}})");
|
||||
// check right size after indentation triggering a resize
|
||||
CHECK(j_object.dump(1024).size() == 25642);
|
||||
// check if right indentation symbol is used
|
||||
|
||||
Reference in New Issue
Block a user