From 33c5a965f55f80057f197257d1d1cdb06523e963 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 16 Feb 2023 02:53:25 +0100 Subject: [PATCH] Fixes for requirement to define IMGUI_DEFINE_MATH_OPERATORS before imgui.h (or at least at imconfig) (#449) --- implot.cpp | 1 + implot_internal.h | 4 ---- implot_items.cpp | 3 ++- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/implot.cpp b/implot.cpp index 8713a75..a326c8e 100644 --- a/implot.cpp +++ b/implot.cpp @@ -122,6 +122,7 @@ You can read releases logs https://github.com/epezent/implot/releases for more d */ +#define IMGUI_DEFINE_MATH_OPERATORS #include "implot.h" #include "implot_internal.h" diff --git a/implot_internal.h b/implot_internal.h index b2685ff..d7952a5 100644 --- a/implot_internal.h +++ b/implot_internal.h @@ -31,10 +31,6 @@ #pragma once -#ifndef IMGUI_DEFINE_MATH_OPERATORS -#define IMGUI_DEFINE_MATH_OPERATORS -#endif - #include #include "imgui_internal.h" diff --git a/implot_items.cpp b/implot_items.cpp index 72811ee..1d555d8 100644 --- a/implot_items.cpp +++ b/implot_items.cpp @@ -22,6 +22,7 @@ // ImPlot v0.14 +#define IMGUI_DEFINE_MATH_OPERATORS #include "implot.h" #include "implot_internal.h" @@ -81,7 +82,7 @@ static IMPLOT_INLINE float ImInvSqrt(float x) { return 1.0f / sqrtf(x); } // unsigned long long ImU64; // 64-bit unsigned integer // (note: this list does *not* include `long`, `unsigned long` and `long double`) // -// You can customize the supported types by defining IMPLOT_CUSTOM_NUMERIC_TYPES at compile time to define your own type list. +// You can customize the supported types by defining IMPLOT_CUSTOM_NUMERIC_TYPES at compile time to define your own type list. // As an example, you could use the compile time define given by the line below in order to support only float and double. // -DIMPLOT_CUSTOM_NUMERIC_TYPES="(float)(double)" // In order to support all known C++ types, use: