From 8352d43a0c318380053a88e313e62f733d7290d5 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Fri, 11 Aug 2017 22:52:33 +0200 Subject: [PATCH] Fix broken ImGuiColorEditFlags_NoAlpha flag check * Fixes warning: imgui.cpp:9295:98: warning: enum constant in boolean context [-Wint-in-bool-context] --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index f4048d20b..89fdc06e8 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -9292,7 +9292,7 @@ static void ColorPickerOptionsPopup(ImGuiColorEditFlags flags, float* ref_col) g.ColorEditOptions = (g.ColorEditOptions & ~ImGuiColorEditFlags__PickerMask) | (picker_flags & ImGuiColorEditFlags__PickerMask); ImGui::SetCursorScreenPos(backup_pos); ImVec4 dummy_ref_col; - memcpy(&dummy_ref_col.x, ref_col, sizeof(float) * (ImGuiColorEditFlags_NoAlpha ? 3 : 4)); + memcpy(&dummy_ref_col.x, ref_col, sizeof(float) * (picker_flags & ImGuiColorEditFlags_NoAlpha ? 3 : 4)); ImGui::ColorPicker4("##dummypicker", &dummy_ref_col.x, picker_flags); ImGui::PopID(); }