Skip to content

Commit db60e0d

Browse files
committed
Editor: Unary operator- for ImVec2 is defined by ImGui since r18955
1 parent 9385318 commit db60e0d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/CHANGELOG.txt

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ v0.9.2 (WIP):
1414

1515
CHANGE: Canvas: Don't use deprecated SetItemAllowOverlap (#250)
1616

17+
CHANGE: Editor: Define IMGUI_DEFINE_MATH_OPERATORS before <imgui.h> (#209), thanks @ocornut
18+
19+
CHANGE: Editor: Unary operator- for ImVec2 is defined by ImGui since r18955 (#248)
20+
1721
BUGFIX: Editor: Correctly initialize 'width' for view resize code (thx @gnif)
1822

1923
BUGFIX: Examples: Handle node deletion before links (#182)

imgui_extra_math.inl

+2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ inline ImVec2 operator*(const float lhs, const ImVec2& rhs)
3434
return ImVec2(lhs * rhs.x, lhs * rhs.y);
3535
}
3636

37+
# if IMGUI_VERSION_NUM < 18955
3738
inline static ImVec2 operator-(const ImVec2& lhs)
3839
{
3940
return ImVec2(-lhs.x, -lhs.y);
4041
}
42+
# endif
4143

4244

4345
//------------------------------------------------------------------------------

0 commit comments

Comments
 (0)