From 9a01d29bb3b28263bcd3230237f4acbc0094d1d7 Mon Sep 17 00:00:00 2001 From: ozlb Date: Tue, 28 Apr 2020 21:58:37 +0200 Subject: [PATCH] BOX-SELECTION HasFlag() missing 'warning: left operand of comma operator has no effect [-Wunused-value] if (plot.Selecting && (plot.Flags, ImPlotFlags_Selection)) {' ~~~~~^~~~~ --- implot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/implot.cpp b/implot.cpp index f074b3d..838fbbb 100644 --- a/implot.cpp +++ b/implot.cpp @@ -727,7 +727,7 @@ bool BeginPlot(const char* title, const char* x_label, const char* y_label, cons // confirm selection if ((plot.Selecting || plot.Querying) && IO.MouseReleased[1]) { - if (plot.Selecting && (plot.Flags, ImPlotFlags_Selection)) { + if (plot.Selecting && HasFlag(plot.Flags, ImPlotFlags_Selection)) { gp.UpdateTransforms(); ImVec2 select_size = plot.SelectStart - IO.MousePos; if (ImFabs(select_size.x) > 2 && ImFabs(select_size.y) > 2) { @@ -1872,4 +1872,4 @@ void PlotLabel(const char* text, float x, float y, bool vertical, const ImVec2& PopClipRect(); } -} // namespace ImGui \ No newline at end of file +} // namespace ImGui