From 20bccce1e4fd7233b452d4d7161fba94b8b28500 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 24 Feb 2023 07:53:50 +0100 Subject: a --- editor/inspect-types.cpp | 2 +- editor/inspect.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'editor') diff --git a/editor/inspect-types.cpp b/editor/inspect-types.cpp index 2cecac07..432d9582 100644 --- a/editor/inspect-types.cpp +++ b/editor/inspect-types.cpp @@ -18,7 +18,7 @@ template<> struct entity_accessors { entity::type::field{"frame"_s, [](const scenery_ref& x) { return x.frame.frame; }, [](scenery_ref& x, frame_t value) { x.frame.frame = value; }, - [](const scenery_ref& x) { return constraints::range{0, !x.atlas ? frame_t(0) : frame_t(x.atlas->info().nframes)}; } + [](const scenery_ref& x) { return constraints::range{0, !x.atlas ? frame_t(0) : frame_t(x.atlas->info().nframes-1)}; } }, entity::type::field{"offset"_s, [](const scenery_ref& x) { return x.frame.offset; }, diff --git a/editor/inspect.cpp b/editor/inspect.cpp index bd1329e0..f0a55748 100644 --- a/editor/inspect.cpp +++ b/editor/inspect.cpp @@ -99,7 +99,7 @@ void do_inspect_field(void* datum, const erased_accessor& accessor, field_repr r { auto [min, max] = accessor.get_range(datum).convert(); constexpr auto igdt = IGDT; - T step = 1, *step_ = !std::is_floating_point_v ? &step : nullptr; + T step(1), *step_ = !std::is_floating_point_v ? &step : nullptr; switch (repr) { default: fm_warn_once("invalid repr enum value '%zu'", (std::size_t)repr); break; -- cgit v1.2.3