From b0eac255caf816accaff79a967398277d58364d5 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 20 Jan 2015 01:01:25 +0100 Subject: [PATCH] Warning fixes for 64-bit architectures --- examples/directx9_example/main.cpp | 2 +- imgui.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp index ed813780e..98ab9d282 100644 --- a/examples/directx9_example/main.cpp +++ b/examples/directx9_example/main.cpp @@ -35,7 +35,7 @@ static void ImImpl_RenderDrawLists(ImDrawList** const cmd_lists, int cmd_lists_c // Copy and convert all vertices into a single contiguous buffer CUSTOMVERTEX* vtx_dst; - if (g_pVB->Lock(0, total_vtx_count, (void**)&vtx_dst, D3DLOCK_DISCARD) < 0) + if (g_pVB->Lock(0, (UINT)total_vtx_count, (void**)&vtx_dst, D3DLOCK_DISCARD) < 0) return; for (int n = 0; n < cmd_lists_count; n++) { diff --git a/imgui.cpp b/imgui.cpp index ae777454a..a68187bcf 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -6532,7 +6532,7 @@ bool ImFontAtlas::Build() // Setup ranges int glyph_count = 0; - size_t glyph_ranges_count = 0; + int glyph_ranges_count = 0; for (const ImWchar* in_range = data.GlyphRanges; in_range[0] && in_range[1]; in_range += 2) { glyph_count += (in_range[1] - in_range[0]) + 1; @@ -6541,7 +6541,7 @@ bool ImFontAtlas::Build() data.Ranges = buf_ranges + buf_ranges_n; data.RangesCount = glyph_ranges_count; buf_ranges_n += glyph_ranges_count; - for (size_t i = 0; i < glyph_ranges_count; i++) + for (int i = 0; i < glyph_ranges_count; i++) { const ImWchar* in_range = &data.GlyphRanges[i * 2]; stbtt_pack_range& range = data.Ranges[i];