summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-02-27 07:29:42 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-02-27 12:37:20 +0100
commitf60c3734e38408b97e10e29a6c1d8780770d5b79 (patch)
tree20f778f31725b8960d13a04388757b2f53fa0164 /editor
parent48b8e559cd72c95a5f72de625a608e85026e3785 (diff)
compat/prelude: add operator""_uz() for size_t
Diffstat (limited to 'editor')
-rw-r--r--editor/imgui-tiles.cpp2
-rw-r--r--editor/inspect.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/editor/imgui-tiles.cpp b/editor/imgui-tiles.cpp
index 9d84027f..57cdecba 100644
--- a/editor/imgui-tiles.cpp
+++ b/editor/imgui-tiles.cpp
@@ -49,7 +49,7 @@ void app::draw_editor_tile_pane_atlas(tile_editor& ed, StringView name, const st
};
const bool perm_selected = ed.is_permutation_selected(atlas);
constexpr std::size_t per_row = 8;
- for (std::size_t i = 0; i < N; i++)
+ for (auto i = 0_uz; i < N; i++)
{
const bool selected = ed.is_tile_selected(atlas, i);
if (i > 0 && i % per_row == 0)
diff --git a/editor/inspect.cpp b/editor/inspect.cpp
index 82514cc9..0c45251b 100644
--- a/editor/inspect.cpp
+++ b/editor/inspect.cpp
@@ -155,7 +155,7 @@ bool do_inspect_field(void* datum, const erased_accessor& accessor, field_repr r
ret = ImGui::SliderScalarN(label, igdt, &value, T::Size, &min, &max);
break;
}
- for (std::size_t i = 0; i < T::Size; i++)
+ for (auto i = 0_uz; i < T::Size; i++)
value[i] = std::clamp(value[i], min[i], max[i]);
}