Skip to content

Commit 172de5a

Browse files
committed
fix ci failure check
Signed-off-by: Harinath Nampally <[email protected]>
1 parent b68bd16 commit 172de5a

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

include/nlohmann/detail/json_pointer.hpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,7 @@ class json_pointer
750750
// iterate array and use index as reference string
751751
for (std::size_t i = 0; i < value.m_data.m_value.array->size(); ++i)
752752
{
753-
// Convert std::string to string_t before passing to flatten
754-
auto concat_result = detail::concat(reference_string, '/', std::to_string(i));
755-
flatten(string_t(concat_result.c_str()),
753+
flatten(detail::concat<string_t>(reference_string, '/', std::to_string(i)),
756754
value.m_data.m_value.array->operator[](i), result);
757755
}
758756
}
@@ -771,9 +769,7 @@ class json_pointer
771769
// iterate object and use keys as reference string
772770
for (const auto& element : *value.m_data.m_value.object)
773771
{
774-
// Convert std::string to string_t before passing to flatten
775-
auto concat_result = detail::concat(reference_string, '/', detail::escape(element.first));
776-
flatten(string_t(concat_result.c_str()), element.second, result);
772+
flatten(detail::concat<string_t>(reference_string, '/', detail::escape(element.first)), element.second, result);
777773
}
778774
}
779775
break;

single_include/nlohmann/json.hpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14515,6 +14515,7 @@ NLOHMANN_JSON_NAMESPACE_END
1451514515

1451614516
// #include <nlohmann/detail/value_t.hpp>
1451714517

14518+
#include <string_view>
1451814519

1451914520
NLOHMANN_JSON_NAMESPACE_BEGIN
1452014521

@@ -15239,9 +15240,7 @@ class json_pointer
1523915240
// iterate array and use index as reference string
1524015241
for (std::size_t i = 0; i < value.m_data.m_value.array->size(); ++i)
1524115242
{
15242-
// Convert std::string to string_t before passing to flatten
15243-
auto concat_result = detail::concat(reference_string, '/', std::to_string(i));
15244-
flatten(string_t(concat_result.c_str()),
15243+
flatten(detail::concat<string_t>(reference_string, '/', std::to_string(i)),
1524515244
value.m_data.m_value.array->operator[](i), result);
1524615245
}
1524715246
}
@@ -15260,9 +15259,7 @@ class json_pointer
1526015259
// iterate object and use keys as reference string
1526115260
for (const auto& element : *value.m_data.m_value.object)
1526215261
{
15263-
// Convert std::string to string_t before passing to flatten
15264-
auto concat_result = detail::concat(reference_string, '/', detail::escape(element.first));
15265-
flatten(string_t(concat_result.c_str()), element.second, result);
15262+
flatten(detail::concat<string_t>(reference_string, '/', detail::escape(element.first)), element.second, result);
1526615263
}
1526715264
}
1526815265
break;

0 commit comments

Comments
 (0)