Skip to content

Commit 3677d24

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

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-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: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15239,9 +15239,7 @@ class json_pointer
1523915239
// iterate array and use index as reference string
1524015240
for (std::size_t i = 0; i < value.m_data.m_value.array->size(); ++i)
1524115241
{
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()),
15242+
flatten(detail::concat<string_t>(reference_string, '/', std::to_string(i)),
1524515243
value.m_data.m_value.array->operator[](i), result);
1524615244
}
1524715245
}
@@ -15260,9 +15258,7 @@ class json_pointer
1526015258
// iterate object and use keys as reference string
1526115259
for (const auto& element : *value.m_data.m_value.object)
1526215260
{
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);
15261+
flatten(detail::concat<string_t>(reference_string, '/', detail::escape(element.first)), element.second, result);
1526615262
}
1526715263
}
1526815264
break;

0 commit comments

Comments
 (0)