From 064385fc628e01ce33676f782e54a40178d48568 Mon Sep 17 00:00:00 2001 From: Rokas Kupstys Date: Tue, 17 Jul 2018 15:58:31 +0300 Subject: [PATCH] Define ImVec2 math operators only when IMGUI_DEFINE_MATH_OPERATORS is undefined. --- server/TracyImGui.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/TracyImGui.hpp b/server/TracyImGui.hpp index 02554192..2d486185 100644 --- a/server/TracyImGui.hpp +++ b/server/TracyImGui.hpp @@ -4,7 +4,9 @@ #include "../imgui/imgui.h" #include "../imgui/imgui_internal.h" +#if !IMGUI_DEFINE_MATH_OPERATORS static inline ImVec2 operator+( const ImVec2& l, const ImVec2& r ) { return ImVec2( l.x + r.x, l.y + r.y ); } static inline ImVec2 operator-( const ImVec2& l, const ImVec2& r ) { return ImVec2( l.x - r.x, l.y - r.y ); } +#endif #endif