diff --git a/core/Node/Button.cpp b/core/Node/Button.cpp index 83c64966..c0774320 100644 --- a/core/Node/Button.cpp +++ b/core/Node/Button.cpp @@ -1,7 +1,7 @@ #include "..\e2dnode.h" #include "..\e2dmanager.h" -#define SAFE_SETTER(pointer, func, ...) if (pointer) { pointer->##func(__VA_ARGS__); } +#define SAFE_SET(pointer, func, ...) if (pointer) { pointer->##func(__VA_ARGS__); } e2d::Button::Button() @@ -235,10 +235,10 @@ void e2d::Button::_setState(BTN_STATE state) void e2d::Button::_updateVisiable() { - SAFE_SETTER(m_pNormal, setVisiable, false); - SAFE_SETTER(m_pMouseover, setVisiable, false); - SAFE_SETTER(m_pSelected, setVisiable, false); - SAFE_SETTER(m_pDisabled, setVisiable, false); + SAFE_SET(m_pNormal, setVisiable, false); + SAFE_SET(m_pMouseover, setVisiable, false); + SAFE_SET(m_pSelected, setVisiable, false); + SAFE_SET(m_pDisabled, setVisiable, false); if (m_bEnable) { diff --git a/core/Node/Node.cpp b/core/Node/Node.cpp index ddd99210..14ddf0f7 100644 --- a/core/Node/Node.cpp +++ b/core/Node/Node.cpp @@ -948,11 +948,6 @@ bool e2d::Node::isPointIn(Point point) const return true; } - // 判断点是否在子节点内 - FOR_LOOP(child, m_vChildren) - if (child->isPointIn(point)) - return true; - return false; } @@ -1009,17 +1004,6 @@ bool e2d::Node::isIntersectWith(const Node * pNode) const } } - // 判断和其子节点是否相交 - FOR_LOOP(pNodeChild, pNode->m_vChildren) - if (this->isIntersectWith(pNodeChild)) - return true; - - // 判断子节点和其是否相交 - FOR_LOOP(child, m_vChildren) - if (child->isIntersectWith(pNode)) - return true; - - // 都不相交,返回 false return false; }