epezent / implot

Immediate Mode Plotting
MIT License
4.71k stars 521 forks source link

Reintroduce header guards for `IMGUI_DEFINE_MATH_OPERATORS` to fix compiler warnings #546

Open micb25 opened 9 months ago

micb25 commented 9 months ago

The commit 33c5a965f55f80057f197257d1d1cdb06523e963 removed the definition for IMGUI_DEFINE_MATH_OPERATORS including a header guard from implot_internal.h and moved it into the unit files implot.cpp and implot_items.cpp but without a corresponding check whether IMGUI_DEFINE_MATH_OPERATORS was already defined.

When IMGUI_DEFINE_MATH_OPERATORS is set externally, e.g. via target compile definitions, this now leads to compiler warnings. The PR fixes these compiler warnings by reintroducing header guards for IMGUI_DEFINE_MATH_OPERATORS.