Skip to content

Commit c78424c

Browse files
committed
fix gcc warnings
1 parent 6f99d47 commit c78424c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

ui/ui_dbg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ static void _ui_dbg_stopwatch_draw(ui_dbg_t* win) {
13661366
if (win->stopwatch.frame_ticks > 0) {
13671367
frames = (double)cycle_count / (double)win->stopwatch.frame_ticks;
13681368
}
1369-
ImGui::Text("%llu ticks", cycle_count);
1369+
ImGui::Text("%lu ticks", cycle_count);
13701370
if (ImGui::IsItemHovered()) {
13711371
ImGui::SetTooltip("milliseconds: %.3f\nraster lines: %.3f\nframes: %.3f\n", ms, raster_lines, frames);
13721372
}

ui/ui_memedit.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,14 +683,14 @@ struct MemoryEditor
683683
// Utilities for Data Preview
684684
const char* DataTypeGetDesc(ImGuiDataType data_type) const
685685
{
686-
const char* descs[] = { "Int8", "Uint8", "Int16", "Uint16", "Int32", "Uint32", "Int64", "Uint64", "Float", "Double" };
686+
const char* descs[ImGuiDataType_COUNT] = { "Int8", "Uint8", "Int16", "Uint16", "Int32", "Uint32", "Int64", "Uint64", "Float", "Double" };
687687
IM_ASSERT(data_type >= 0 && data_type < ImGuiDataType_COUNT);
688688
return descs[data_type];
689689
}
690690

691691
size_t DataTypeGetSize(ImGuiDataType data_type) const
692692
{
693-
const size_t sizes[] = { 1, 1, 2, 2, 4, 4, 8, 8, sizeof(float), sizeof(double) };
693+
const size_t sizes[ImGuiDataType_COUNT] = { 1, 1, 2, 2, 4, 4, 8, 8, sizeof(float), sizeof(double) };
694694
IM_ASSERT(data_type >= 0 && data_type < ImGuiDataType_COUNT);
695695
return sizes[data_type];
696696
}

0 commit comments

Comments
 (0)