Skip to content

Commit

Permalink
Fix compile with latest ImGui (#181)
Browse files Browse the repository at this point in the history
IMGUI_DEFINE_MATH_OPERATORS now needs to be defined before #include <imgui.h>
  • Loading branch information
Auburn authored Feb 19, 2024
1 parent d88f991 commit 6939950
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions imnodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@
// [SECTION] render helpers
// [SECTION] API implementation

#include "imnodes.h"
#include "imnodes_internal.h"

#define IMGUI_DEFINE_MATH_OPERATORS
#include <imgui_internal.h>

// Check minimum ImGui version
#define MINIMUM_COMPATIBLE_IMGUI_VERSION 17400
#if IMGUI_VERSION_NUM < MINIMUM_COMPATIBLE_IMGUI_VERSION
Expand Down
6 changes: 3 additions & 3 deletions imnodes_internal.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once

#include "imnodes.h"

#include <imgui.h>
#define IMGUI_DEFINE_MATH_OPERATORS
#include <imgui.h>
#include <imgui_internal.h>

#include "imnodes.h"

#include <limits.h>

// the structure of this file:
Expand Down

0 comments on commit 6939950

Please sign in to comment.