From f60c3734e38408b97e10e29a6c1d8780770d5b79 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 27 Feb 2023 07:29:42 +0100 Subject: compat/prelude: add operator""_uz() for size_t --- editor/imgui-tiles.cpp | 2 +- editor/inspect.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'editor') 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]); } -- cgit v1.2.3