From 752603bc70bc0fc24846f27b816f04c9fc356453 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 15 Feb 2023 19:50:03 +0100 Subject: [PATCH] Fixed imgui_single_file.h for IMGUI_DEFINE_MATH_OPERATORS change. (#6164, #6137, #5966, #2832) Amend a1b8457 --- misc/single_file/imgui_single_file.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/misc/single_file/imgui_single_file.h b/misc/single_file/imgui_single_file.h index e9ba24779..7ca31e0fe 100644 --- a/misc/single_file/imgui_single_file.h +++ b/misc/single_file/imgui_single_file.h @@ -7,6 +7,11 @@ // #define IMGUI_IMPLEMENTATION // Before you include this file in *one* C++ file to create the implementation. // Using this in your project will leak the contents of imgui_internal.h and ImVec2 operators in this compilation unit. + +#ifdef IMGUI_IMPLEMENTATION +#define IMGUI_DEFINE_MATH_OPERATORS +#endif + #include "../../imgui.h" #ifdef IMGUI_ENABLE_FREETYPE #include "../../misc/freetype/imgui_freetype.h"