From 14167171aff17b9bc4b5531fffd3f729e12f8a59 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 4 Mar 2023 11:09:41 +0100 Subject: src: make anim_scale easier to construct --- serialize/anim.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'serialize') diff --git a/serialize/anim.cpp b/serialize/anim.cpp index 42f39328..7be6323b 100644 --- a/serialize/anim.cpp +++ b/serialize/anim.cpp @@ -129,11 +129,11 @@ void adl_serializer::from_json(const json& j, floormat::an { auto factor = (float)j[1]; fm_soft_assert(factor > 0 && factor <= 1); - val = { { .r = {factor} }, anim_scale_type::ratio }; + val = {factor}; } else if (bool is_width = type == "width"_s; is_width || type == "height"_s) { - val = { { .f = {is_width, (unsigned)j[1]} }, anim_scale_type::fixed }; + val = {(unsigned)j[1], is_width}; fm_soft_assert(val.f.width_or_height > 0); } else -- cgit v1.2.3