From 8db126188df82282c193f894c5e5ba390869c836 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 3 Oct 2024 17:32:05 +0200 Subject: [PATCH] Fixed static analyser warning. Amend b3c8747 --- imgui_widgets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 1e24b4ebc..8f16f6ec0 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -2650,7 +2650,7 @@ bool ImGui::DragScalar(const char* label, ImGuiDataType data_type, void* p_data, const int clamp_range_dir = (p_min != NULL && p_max != NULL) ? DataTypeCompare(data_type, p_min, p_max) : 0; // -1 when *p_min < *p_max, == 0 when *p_min == *p_max if (p_min == NULL || p_max == NULL || clamp_range_dir < 0) clamp_enabled = true; - else if ((p_min != NULL && p_max != NULL) && clamp_range_dir == 0) + else if (clamp_range_dir == 0) clamp_enabled = DataTypeIsZero(data_type, p_min) ? ((flags & ImGuiSliderFlags_ClampZeroRange) != 0) : true; } return TempInputScalar(frame_bb, id, label, data_type, p_data, format, clamp_enabled ? p_min : NULL, clamp_enabled ? p_max : NULL);