summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-02-24 07:53:50 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-02-24 07:53:50 +0100
commit20bccce1e4fd7233b452d4d7161fba94b8b28500 (patch)
tree409c6813de477084f3edf974f32a6f52d3ad282f /editor
parent6905b3c68d1bcca661295f3d43fc4d75494065a9 (diff)
a
Diffstat (limited to 'editor')
-rw-r--r--editor/inspect-types.cpp2
-rw-r--r--editor/inspect.cpp2
2 files changed, 2 insertions, 2 deletions
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<scenery_ref> {
entity::type<scenery::frame_t>::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<frame_t>{0, !x.atlas ? frame_t(0) : frame_t(x.atlas->info().nframes)}; }
+ [](const scenery_ref& x) { return constraints::range<frame_t>{0, !x.atlas ? frame_t(0) : frame_t(x.atlas->info().nframes-1)}; }
},
entity::type<Vector2b>::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<T>();
constexpr auto igdt = IGDT<T>;
- T step = 1, *step_ = !std::is_floating_point_v<T> ? &step : nullptr;
+ T step(1), *step_ = !std::is_floating_point_v<T> ? &step : nullptr;
switch (repr)
{
default: fm_warn_once("invalid repr enum value '%zu'", (std::size_t)repr); break;