Siv3D / OpenSiv3D

C++20 framework for creative coding 🎮🎨🎹 / Cross-platform support (Windows, macOS, Linux, and the Web)
https://siv3d.github.io/
MIT License
1k stars 138 forks source link

一部の JSON::operator =(...) が古い内容を消去していなかったバグを修正 #1166

Closed Reputeless closed 7 months ago

Reputeless commented 9 months ago
# include <Siv3D.hpp> // Siv3D v0.6.13

void Main()
{
    {
        JSON json;
        json[U"cc"] = 123;
        Print << json;

        Print << U"================";

        JSON a, b;
        a[U"a"] = 1;
        b[U"b"] = 3;
        json = { {U"aa", a}, {U"bb", b} };

        Print << json;
    }

    while (System::Update())
    {

    }
}
# include <Siv3D.hpp> // Siv3D v0.6.13

void Main()
{
    {
        JSON json;
        json.push_back(100);
        json.push_back(200);
        Print << json;

        Print << U"================";

        json = Array{ 300, 400, 500 };
        Print << json;
    }

    while (System::Update())
    {

    }
}