Fix Clang 9.0 zealous warnings
diff --git a/imgui_demo.cpp b/imgui_demo.cpp
index 0d800cd..13a0e8c 100644
--- a/imgui_demo.cpp
+++ b/imgui_demo.cpp
@@ -629,7 +629,7 @@
{
ImGui::Text("blah blah");
ImGui::SameLine();
- if (ImGui::SmallButton("button")) {};
+ if (ImGui::SmallButton("button")) {}
ImGui::TreePop();
}
}
diff --git a/imgui_draw.cpp b/imgui_draw.cpp
index b34358d..69d1894 100644
--- a/imgui_draw.cpp
+++ b/imgui_draw.cpp
@@ -617,8 +617,8 @@
// On AddPolyline() and AddConvexPolyFilled() we intentionally avoid using ImVec2 and superflous function calls to optimize debug/non-inlined builds.
// Those macros expects l-values.
-#define IM_NORMALIZE2F_OVER_ZERO(VX,VY) { float d2 = VX*VX + VY*VY; if (d2 > 0.0f) { float inv_len = 1.0f / ImSqrt(d2); VX *= inv_len; VY *= inv_len; } }
-#define IM_FIXNORMAL2F(VX,VY) { float d2 = VX*VX + VY*VY; if (d2 < 0.5f) d2 = 0.5f; float inv_lensq = 1.0f / d2; VX *= inv_lensq; VY *= inv_lensq; }
+#define IM_NORMALIZE2F_OVER_ZERO(VX,VY) do { float d2 = VX*VX + VY*VY; if (d2 > 0.0f) { float inv_len = 1.0f / ImSqrt(d2); VX *= inv_len; VY *= inv_len; } } while (0)
+#define IM_FIXNORMAL2F(VX,VY) do { float d2 = VX*VX + VY*VY; if (d2 < 0.5f) d2 = 0.5f; float inv_lensq = 1.0f / d2; VX *= inv_lensq; VY *= inv_lensq; } while (0)
// TODO: Thickness anti-aliased lines cap are missing their AA fringe.
// We avoid using the ImVec2 math operators here to reduce cost to a minimum for debug/non-inlined builds.
@@ -680,7 +680,7 @@
// Average normals
float dm_x = (temp_normals[i1].x + temp_normals[i2].x) * 0.5f;
float dm_y = (temp_normals[i1].y + temp_normals[i2].y) * 0.5f;
- IM_FIXNORMAL2F(dm_x, dm_y)
+ IM_FIXNORMAL2F(dm_x, dm_y);
dm_x *= AA_SIZE;
dm_y *= AA_SIZE;
diff --git a/imstb_truetype.h b/imstb_truetype.h
index 193338a..7ccc13e 100644
--- a/imstb_truetype.h
+++ b/imstb_truetype.h
@@ -2538,11 +2538,11 @@
// There are no other cases.
STBTT_assert(0);
break;
- };
+ } // [DEAR IMGUI] removed ;
}
}
break;
- };
+ } // [DEAR IMGUI] removed ;
default:
// TODO: Implement other stuff.