From 752313ede30d15d483aff3a38e33f31397176b8d Mon Sep 17 00:00:00 2001 From: Domantas Martinaitis <49914788+HenryJones14@users.noreply.github.com> Date: Fri, 14 Feb 2025 13:47:39 +0100 Subject: [PATCH] #define IMGUI_DEFINE_MATH_OPERATORS Define IMGUI_DEFINE_MATH_OPERATORS to get ImGui math overloads in the implementation file (.cpp). The "imgui_widget_flamegraph.h" include was moved because it itself includes "imgui.h" which needs to be included after the define. --- imgui_widget_flamegraph.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imgui_widget_flamegraph.cpp b/imgui_widget_flamegraph.cpp index 1b92e40..03fdf21 100644 --- a/imgui_widget_flamegraph.cpp +++ b/imgui_widget_flamegraph.cpp @@ -20,11 +20,13 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include +#define IMGUI_DEFINE_MATH_OPERATORS #include "imgui.h" #include "imgui_internal.h" +#include + void ImGuiWidgetFlameGraph::PlotFlame(const char* label, void (*values_getter)(float* start, float* end, ImU8* level, const char** caption, const void* data, int idx), const void* data, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size) { ImGuiWindow* window = ImGui::GetCurrentWindow();