1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-25 08:10:30 +01:00

Fix broken ImGuiColorEditFlags_NoAlpha flag check

* Fixes warning:
  imgui.cpp:9295:98: warning: enum constant in boolean context [-Wint-in-bool-context]
This commit is contained in:
LuK1337 2017-08-11 22:52:33 +02:00
parent 908b025c3c
commit 8352d43a0c

View File

@ -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();
}