rename getChildOfType member method to getChildByType, to avoid collisions

This commit is contained in:
dankmeme01 2024-10-13 13:19:07 +02:00
parent 0089d13f7a
commit c8aa2e30db
2 changed files with 2 additions and 2 deletions

View file

@ -1126,7 +1126,7 @@ public:
GEODE_DLL size_t getEventListenerCount(); GEODE_DLL size_t getEventListenerCount();
template <class T = CCNode> template <class T = CCNode>
T* getChildOfType(int index) { T* getChildByType(int index) {
size_t indexCounter = 0; size_t indexCounter = 0;
if (this->getChildrenCount() == 0) return nullptr; if (this->getChildrenCount() == 0) return nullptr;
// start from end for negative index // start from end for negative index

View file

@ -622,7 +622,7 @@ namespace geode::cocos {
*/ */
template <class Type = cocos2d::CCNode> template <class Type = cocos2d::CCNode>
static Type* getChildOfType(cocos2d::CCNode* node, int index) { static Type* getChildOfType(cocos2d::CCNode* node, int index) {
return node->getChildOfType<Type>(index); return node->getChildByType<Type>(index);
} }
/** /**