mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 14:16:36 +00:00
Merge pull request #403 from JasonWilkins/master
Fixed a couple of problems found by CppCat code analyzer.
This commit is contained in:
commit
0b47edcefe
@ -5592,7 +5592,7 @@ bool ImGui::CollapsingHeader(const char* label, const char* str_id, bool display
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Unframed typed for tree nodes
|
// Unframed typed for tree nodes
|
||||||
if ((held && hovered) || hovered)
|
if (hovered)
|
||||||
RenderFrame(bb.Min, bb.Max, col, false);
|
RenderFrame(bb.Min, bb.Max, col, false);
|
||||||
RenderCollapseTriangle(bb.Min + ImVec2(style.FramePadding.x, g.FontSize*0.15f), opened, 0.70f, false);
|
RenderCollapseTriangle(bb.Min + ImVec2(style.FramePadding.x, g.FontSize*0.15f), opened, 0.70f, false);
|
||||||
if (g.LogEnabled)
|
if (g.LogEnabled)
|
||||||
|
@ -117,7 +117,7 @@ static inline ImVec2& operator+=(ImVec2& lhs, const ImVec2& rhs)
|
|||||||
static inline ImVec2& operator-=(ImVec2& lhs, const ImVec2& rhs) { lhs.x -= rhs.x; lhs.y -= rhs.y; return lhs; }
|
static inline ImVec2& operator-=(ImVec2& lhs, const ImVec2& rhs) { lhs.x -= rhs.x; lhs.y -= rhs.y; return lhs; }
|
||||||
static inline ImVec2& operator*=(ImVec2& lhs, const float rhs) { lhs.x *= rhs; lhs.y *= rhs; return lhs; }
|
static inline ImVec2& operator*=(ImVec2& lhs, const float rhs) { lhs.x *= rhs; lhs.y *= rhs; return lhs; }
|
||||||
static inline ImVec2& operator/=(ImVec2& lhs, const float rhs) { lhs.x /= rhs; lhs.y /= rhs; return lhs; }
|
static inline ImVec2& operator/=(ImVec2& lhs, const float rhs) { lhs.x /= rhs; lhs.y /= rhs; return lhs; }
|
||||||
static inline ImVec4 operator-(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4(lhs.x-rhs.x, lhs.y-rhs.y, lhs.z-rhs.z, lhs.w-lhs.w); }
|
static inline ImVec4 operator-(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4(lhs.x-rhs.x, lhs.y-rhs.y, lhs.z-rhs.z, lhs.w-rhs.w); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline int ImMin(int lhs, int rhs) { return lhs < rhs ? lhs : rhs; }
|
static inline int ImMin(int lhs, int rhs) { return lhs < rhs ? lhs : rhs; }
|
||||||
|
Loading…
Reference in New Issue
Block a user