Skip to content

Commit

Permalink
🐛 Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yosh-matsuda committed Feb 26, 2023
1 parent e8db98f commit 3a6f127
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/cpp_yyjson.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2471,7 +2471,7 @@ namespace yyjson
auto object_append(Key&& key, T&& json_value, Ts... ts) noexcept
{
auto prev = static_cast<yyjson_mut_val*>(base::val_->uni.ptr);
const auto add_key = create_primitive(std::forward<Key>(key), ts...);
const auto add_key = base::doc_.create_primitive(std::forward<Key>(key), ts...);

if constexpr (!std::is_assignable_v<decltype(json_value.get_has_parent()), bool>)
{
Expand Down Expand Up @@ -2524,7 +2524,7 @@ namespace yyjson
auto object_append(Key&& key, T&& json_value, Ts... ts) noexcept
{
auto prev = static_cast<yyjson_mut_val*>(base::val_->uni.ptr);
const auto add_key = create_primitive(std::forward<Key>(key), ts...);
const auto add_key = base::doc_.create_primitive(std::forward<Key>(key), ts...);
auto val_copy = base::doc_.copy_value(json_value);
[[maybe_unused]] auto success = yyjson_mut_obj_add(base::val_, add_key, val_copy);
assert(success);
Expand Down

0 comments on commit 3a6f127

Please sign in to comment.