Fixed vs2015 warnings.

This commit is contained in:
Branimir Karadžić 2015-10-02 17:53:30 -07:00
parent f9c059d408
commit e91ab4c2c3

View file

@ -216,7 +216,7 @@ void ImGui::ShowTestWindow(bool* opened)
{ {
ImFont* font = atlas->Fonts[i]; ImFont* font = atlas->Fonts[i];
ImGui::BulletText("Font %d: \'%s\', %.2f px, %d glyphs", i, font->ConfigData ? font->ConfigData[0].Name : "", font->FontSize, font->Glyphs.Size); ImGui::BulletText("Font %d: \'%s\', %.2f px, %d glyphs", i, font->ConfigData ? font->ConfigData[0].Name : "", font->FontSize, font->Glyphs.Size);
ImGui::TreePush((void*)i); ImGui::TreePush((void*)intptr_t(i));
if (i > 0) { ImGui::SameLine(); if (ImGui::SmallButton("Set as default")) { atlas->Fonts[i] = atlas->Fonts[0]; atlas->Fonts[0] = font; } } if (i > 0) { ImGui::SameLine(); if (ImGui::SmallButton("Set as default")) { atlas->Fonts[i] = atlas->Fonts[0]; atlas->Fonts[0] = font; } }
ImGui::PushFont(font); ImGui::PushFont(font);
ImGui::Text("The quick brown fox jumps over the lazy dog"); ImGui::Text("The quick brown fox jumps over the lazy dog");
@ -254,7 +254,7 @@ void ImGui::ShowTestWindow(bool* opened)
{ {
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)
{ {
if (ImGui::TreeNode((void*)i, "Child %d", i)) if (ImGui::TreeNode((void*)intptr_t(i), "Child %d", i))
{ {
ImGui::Text("blah blah"); ImGui::Text("blah blah");
ImGui::SameLine(); ImGui::SameLine();
@ -941,7 +941,7 @@ void ImGui::ShowTestWindow(bool* opened)
if (i > 0) ImGui::SameLine(); if (i > 0) ImGui::SameLine();
ImGui::BeginGroup(); ImGui::BeginGroup();
ImGui::Text("%s", i == 0 ? "Top" : i == 1 ? "25%" : i == 2 ? "Center" : i == 3 ? "75%" : "Bottom"); ImGui::Text("%s", i == 0 ? "Top" : i == 1 ? "25%" : i == 2 ? "Center" : i == 3 ? "75%" : "Bottom");
ImGui::BeginChild(ImGui::GetID((void*)i), ImVec2(ImGui::GetWindowWidth() * 0.17f, 200.0f), true); ImGui::BeginChild(ImGui::GetID((void*)intptr_t(i)), ImVec2(ImGui::GetWindowWidth() * 0.17f, 200.0f), true);
if (scroll_to) if (scroll_to)
ImGui::SetScrollFromPosY(ImGui::GetCursorStartPos().y + scroll_to_px, i * 0.25f); ImGui::SetScrollFromPosY(ImGui::GetCursorStartPos().y + scroll_to_px, i * 0.25f);
for (int line = 0; line < 100; line++) for (int line = 0; line < 100; line++)