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

RectF の一部のコンストラクタで int32 を受け取るときの縮小変換のエラーを消す #1184

Closed Reputeless closed 7 months ago

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

constexpr RectF Test1(const Vec2& center, int32 w, int32 h)
{
    return RectF{ Arg::center = center, w, h }; // 's3d::int32' から 's3d::RectF::value_type' への縮小変換
}

constexpr RectF Test2(const Vec2& center, double w, double h)
{
    return RectF{ Arg::center = center, w, h }; // OK
}

void Main()
{
    while (System::Update())
    {

    }
}