Skip to content

Commit

Permalink
fix ci failure check
Browse files Browse the repository at this point in the history
Signed-off-by: Harinath Nampally <[email protected]>
  • Loading branch information
hnampally committed Jan 22, 2025
1 parent b68bd16 commit 172de5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
8 changes: 2 additions & 6 deletions include/nlohmann/detail/json_pointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,7 @@ class json_pointer
// iterate array and use index as reference string
for (std::size_t i = 0; i < value.m_data.m_value.array->size(); ++i)
{
// Convert std::string to string_t before passing to flatten
auto concat_result = detail::concat(reference_string, '/', std::to_string(i));
flatten(string_t(concat_result.c_str()),
flatten(detail::concat<string_t>(reference_string, '/', std::to_string(i)),
value.m_data.m_value.array->operator[](i), result);
}
}
Expand All @@ -771,9 +769,7 @@ class json_pointer
// iterate object and use keys as reference string
for (const auto& element : *value.m_data.m_value.object)
{
// Convert std::string to string_t before passing to flatten
auto concat_result = detail::concat(reference_string, '/', detail::escape(element.first));
flatten(string_t(concat_result.c_str()), element.second, result);
flatten(detail::concat<string_t>(reference_string, '/', detail::escape(element.first)), element.second, result);
}
}
break;
Expand Down
9 changes: 3 additions & 6 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14515,6 +14515,7 @@ NLOHMANN_JSON_NAMESPACE_END

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

#include <string_view>

NLOHMANN_JSON_NAMESPACE_BEGIN

Expand Down Expand Up @@ -15239,9 +15240,7 @@ class json_pointer
// iterate array and use index as reference string
for (std::size_t i = 0; i < value.m_data.m_value.array->size(); ++i)
{
// Convert std::string to string_t before passing to flatten
auto concat_result = detail::concat(reference_string, '/', std::to_string(i));
flatten(string_t(concat_result.c_str()),
flatten(detail::concat<string_t>(reference_string, '/', std::to_string(i)),
value.m_data.m_value.array->operator[](i), result);
}
}
Expand All @@ -15260,9 +15259,7 @@ class json_pointer
// iterate object and use keys as reference string
for (const auto& element : *value.m_data.m_value.object)
{
// Convert std::string to string_t before passing to flatten
auto concat_result = detail::concat(reference_string, '/', detail::escape(element.first));
flatten(string_t(concat_result.c_str()), element.second, result);
flatten(detail::concat<string_t>(reference_string, '/', detail::escape(element.first)), element.second, result);
}
}
break;
Expand Down

0 comments on commit 172de5a

Please sign in to comment.