From cf4e0164c4235b56560e563c11ee80515ca44000 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 24 Oct 2026 18:34:29 +0200 Subject: [PATCH] Shorten from_json_inplace_array so astyle aligns its parameters The opening parenthesis of the previous name sat in column 41, beyond astyle's default --max-continuation-indent of 40, so the continuation lines fell back to a plain double indent. Signed-off-by: Niels Lohmann --- include/nlohmann/detail/conversions/from_json.hpp | 10 +++++----- single_include/nlohmann/json.hpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/nlohmann/detail/conversions/from_json.hpp b/include/nlohmann/detail/conversions/from_json.hpp index e7bae4572..297906250 100644 --- a/include/nlohmann/detail/conversions/from_json.hpp +++ b/include/nlohmann/detail/conversions/from_json.hpp @@ -376,8 +376,8 @@ struct is_trivial_element // the element type may not be default constructible: construct every element // in place (a pack expansion that is unrolled N times) template < typename BasicJsonType, typename T, std::size_t N > -std::array from_json_inplace_array(const BasicJsonType& j, identity_tag> tag, - std::false_type /*is_trivial_element*/) +std::array from_json_make_array(const BasicJsonType& j, identity_tag> tag, + std::false_type /*is_trivial_element*/) { return from_json_inplace_array_impl(j, tag, make_index_sequence {}); } @@ -385,8 +385,8 @@ std::array from_json_inplace_array(const BasicJsonType& j, identity_tag -std::array from_json_inplace_array(const BasicJsonType& j, identity_tag> /*unused*/, - std::true_type /*is_trivial_element*/) +std::array from_json_make_array(const BasicJsonType& j, identity_tag> /*unused*/, + std::true_type /*is_trivial_element*/) { std::array arr; // NOLINT(cppcoreguidelines-pro-type-member-init,hicpp-member-init): every element is assigned or an exception is thrown from_json_std_array(j, arr); @@ -402,7 +402,7 @@ auto from_json(const BasicJsonType& j, identity_tag> tag) throw_type_must_be("array", j); } - return from_json_inplace_array(j, tag, is_trivial_element {}); + return from_json_make_array(j, tag, is_trivial_element {}); } template diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 5d8bc350a..34d07bf53 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -6400,8 +6400,8 @@ struct is_trivial_element // the element type may not be default constructible: construct every element // in place (a pack expansion that is unrolled N times) template < typename BasicJsonType, typename T, std::size_t N > -std::array from_json_inplace_array(const BasicJsonType& j, identity_tag> tag, - std::false_type /*is_trivial_element*/) +std::array from_json_make_array(const BasicJsonType& j, identity_tag> tag, + std::false_type /*is_trivial_element*/) { return from_json_inplace_array_impl(j, tag, make_index_sequence {}); } @@ -6409,8 +6409,8 @@ std::array from_json_inplace_array(const BasicJsonType& j, identity_tag -std::array from_json_inplace_array(const BasicJsonType& j, identity_tag> /*unused*/, - std::true_type /*is_trivial_element*/) +std::array from_json_make_array(const BasicJsonType& j, identity_tag> /*unused*/, + std::true_type /*is_trivial_element*/) { std::array arr; // NOLINT(cppcoreguidelines-pro-type-member-init,hicpp-member-init): every element is assigned or an exception is thrown from_json_std_array(j, arr); @@ -6426,7 +6426,7 @@ auto from_json(const BasicJsonType& j, identity_tag> tag) throw_type_must_be("array", j); } - return from_json_inplace_array(j, tag, is_trivial_element {}); + return from_json_make_array(j, tag, is_trivial_element {}); } template