From df2073a5692c991e4fc43c926334983997d272af Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 21 Oct 2022 21:11:33 +0200 Subject: lots of refactoring types crap --- main/imgui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main/imgui.cpp') diff --git a/main/imgui.cpp b/main/imgui.cpp index 2911d849..ea64cd85 100644 --- a/main/imgui.cpp +++ b/main/imgui.cpp @@ -113,7 +113,7 @@ void app::draw_editor_pane(tile_type& type, float main_menu_height) ImGui::SameLine(window_width - ImGui::CalcTextSize(buf).x - style.FramePadding.x - 4); ImGui::Text("%s", buf); }; - const auto N = (std::uint8_t)v->num_tiles(); + const auto N = v->num_tiles(); if (const auto flags = ImGuiTreeNodeFlags_(ImGuiTreeNodeFlags_SpanFullWidth | ImGuiTreeNodeFlags_Framed); auto b = tree_node(k.data(), flags)) { @@ -125,7 +125,7 @@ void app::draw_editor_pane(tile_type& type, float main_menu_height) }; const bool perm_selected = ed ? ed->is_permutation_selected(v) : false; constexpr std::size_t per_row = 5; - for (std::uint8_t i = 0; i < N; i++) + for (std::size_t i = 0; i < N; i++) { const bool selected = ed ? ed->is_tile_selected(v, i) : false; @@ -139,7 +139,7 @@ void app::draw_editor_pane(tile_type& type, float main_menu_height) perm_selected ? push_style_color(ImGuiCol_ButtonHovered, color_perm_selected) : raii_wrapper{}, }; - snprintf(buf, sizeof(buf), "##item_%hhu", i); + snprintf(buf, sizeof(buf), "##item_%zu", i); const auto uv = v->texcoords_for_id(i); ImGui::ImageButton(buf, (void*)&v->texture(), {TILE_SIZE[0]/2, TILE_SIZE[1]/2}, { uv[3][0], uv[3][1] }, { uv[0][0], uv[0][1] }); -- cgit v1.2.3