Skip to content

Commit 01befb3

Browse files
committed
[共通] fix #1192
1 parent e786b24 commit 01befb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Siv3D/src/Siv3D/JSON/SivJSON.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -539,14 +539,14 @@ namespace s3d
539539

540540
JSON& JSON::operator =(const JSON& other)
541541
{
542-
m_detail = std::make_shared<detail::JSONDetail>(*other.m_detail);
542+
m_detail->get() = other.m_detail->get();
543543
m_isValid = other.m_isValid;
544544
return *this;
545545
}
546546

547547
JSON& JSON::operator =(JSON&& other) noexcept
548548
{
549-
*m_detail = std::exchange(*other.m_detail, detail::JSONDetail{});
549+
m_detail->get() = std::move(other.m_detail->get());
550550
m_isValid = std::exchange(other.m_isValid, true);
551551
return *this;
552552
}

0 commit comments

Comments
 (0)