From f9b39663c9cc6f5d43763497c1936d369586c39f Mon Sep 17 00:00:00 2001 From: Graham Pentheny Date: Thu, 21 Aug 2025 21:22:44 -0400 Subject: [PATCH] Fixed some compiler warnings that were being treated as errors --- RecastDemo/Include/Tool_OffMeshConnection.h | 2 +- RecastDemo/Source/TestCase.cpp | 2 +- RecastDemo/Source/main.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RecastDemo/Include/Tool_OffMeshConnection.h b/RecastDemo/Include/Tool_OffMeshConnection.h index 84e8fa33..d5baabe5 100644 --- a/RecastDemo/Include/Tool_OffMeshConnection.h +++ b/RecastDemo/Include/Tool_OffMeshConnection.h @@ -31,7 +31,7 @@ class OffMeshConnectionTool : public SampleTool public: OffMeshConnectionTool() = default; - ~OffMeshConnectionTool() + ~OffMeshConnectionTool() override { if (sample) { diff --git a/RecastDemo/Source/TestCase.cpp b/RecastDemo/Source/TestCase.cpp index e48cd149..a7ceab81 100644 --- a/RecastDemo/Source/TestCase.cpp +++ b/RecastDemo/Source/TestCase.cpp @@ -377,7 +377,7 @@ void TestCase::handleRender() glColor4ub(0, 0, 0, 64); } - int numStraight = test.straight.size() / 3; + int numStraight = static_cast(test.straight.size()) / 3; for (int i = 0; i < numStraight - 1; ++i) { glVertex3f(test.straight[i * 3 + 0], test.straight[i * 3 + 1] + 0.3f, test.straight[i * 3 + 2]); diff --git a/RecastDemo/Source/main.cpp b/RecastDemo/Source/main.cpp index bd64c5e3..cc0fa339 100644 --- a/RecastDemo/Source/main.cpp +++ b/RecastDemo/Source/main.cpp @@ -187,10 +187,10 @@ struct AppData void UpdateUIScale() { ImGuiIO& io = ImGui::GetIO(); - io.DisplaySize = ImVec2(width, height); + io.DisplaySize = ImVec2(static_cast(width), static_cast(height)); io.DisplayFramebufferScale = ImVec2( - static_cast(drawableWidth) / width, - static_cast(drawableHeight) / height); + static_cast(drawableWidth) / static_cast(width), + static_cast(drawableHeight) / static_cast(height)); } };