diff --git a/cocos/2d/CCParticleBatchNode.cpp b/cocos/2d/CCParticleBatchNode.cpp index d6e86dc2b4..e046833d79 100644 --- a/cocos/2d/CCParticleBatchNode.cpp +++ b/cocos/2d/CCParticleBatchNode.cpp @@ -143,16 +143,6 @@ void ParticleBatchNode::visit() } // override addChild: -void ParticleBatchNode::addChild(Node * child) -{ - Node::addChild(child); -} - -void ParticleBatchNode::addChild(Node * child, int zOrder) -{ - Node::addChild(child, zOrder); -} - void ParticleBatchNode::addChild(Node * aChild, int zOrder, int tag) { CCASSERT( aChild != nullptr, "Argument must be non-nullptr"); diff --git a/cocos/2d/CCParticleBatchNode.h b/cocos/2d/CCParticleBatchNode.h index e8b75a3b70..189bfc7da9 100644 --- a/cocos/2d/CCParticleBatchNode.h +++ b/cocos/2d/CCParticleBatchNode.h @@ -105,8 +105,8 @@ public: // Overrides void visit(); - virtual void addChild(Node * child) override; - virtual void addChild(Node * child, int zOrder) override; + + using Node::addChild; virtual void addChild(Node * child, int zOrder, int tag) override; virtual void removeChild(Node* child, bool cleanup) override; virtual void reorderChild(Node * child, int zOrder) override; diff --git a/cocos/2d/CCScene.cpp b/cocos/2d/CCScene.cpp index 37b653aad9..b31a499af6 100644 --- a/cocos/2d/CCScene.cpp +++ b/cocos/2d/CCScene.cpp @@ -121,16 +121,6 @@ bool Scene::initWithPhysics() return ret; } -void Scene::addChild(Node* child) -{ - Node::addChild(child); -} - -void Scene::addChild(Node* child, int zOrder) -{ - Node::addChild(child, zOrder); -} - void Scene::addChild(Node* child, int zOrder, int tag) { Node::addChild(child, zOrder, tag); diff --git a/cocos/2d/CCScene.h b/cocos/2d/CCScene.h index 12c0fa1dea..b52d38e969 100644 --- a/cocos/2d/CCScene.h +++ b/cocos/2d/CCScene.h @@ -64,8 +64,7 @@ public: inline PhysicsWorld* getPhysicsWorld() { return _physicsWorld; } - virtual void addChild(Node* child) override; - virtual void addChild(Node* child, int zOrder) override; + using Node::addChild; virtual void addChild(Node* child, int zOrder, int tag) override; virtual void update(float delta) override; virtual std::string getDescription() const override; diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index 6c940d3de3..5bbe9624c6 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -749,16 +749,6 @@ void Sprite::updateQuadVertices() // Node overrides -void Sprite::addChild(Node *child) -{ - Node::addChild(child); -} - -void Sprite::addChild(Node *child, int zOrder) -{ - Node::addChild(child, zOrder); -} - void Sprite::addChild(Node *child, int zOrder, int tag) { CCASSERT(child != nullptr, "Argument must be non-nullptr"); diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index 28313662a4..86df10a055 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -413,10 +413,7 @@ public: virtual void removeChild(Node* child, bool cleanup) override; virtual void removeAllChildrenWithCleanup(bool cleanup) override; virtual void reorderChild(Node *child, int zOrder) override; - // Should also override addChild(Node*) and addChild(Node*, int), or binding generator will only - // bind addChild(Node*, int, int); - virtual void addChild(Node* child) override; - virtual void addChild(Node* child, int zOrder) override; + using Node::addChild; virtual void addChild(Node *child, int zOrder, int tag) override; virtual void sortAllChildren() override; virtual void setScale(float scale) override; diff --git a/cocos/2d/CCSpriteBatchNode.h b/cocos/2d/CCSpriteBatchNode.h index 73508fe762..29eb7fadb3 100644 --- a/cocos/2d/CCSpriteBatchNode.h +++ b/cocos/2d/CCSpriteBatchNode.h @@ -154,8 +154,8 @@ public: virtual const BlendFunc& getBlendFunc() const override; virtual void visit() override; - virtual void addChild(Node* child) override{ Node::addChild(child);} - virtual void addChild(Node * child, int zOrder) override { Node::addChild(child, zOrder);} + + using Node::addChild; virtual void addChild(Node * child, int zOrder, int tag) override; virtual void reorderChild(Node *child, int zOrder) override; diff --git a/cocos/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id b/cocos/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id index 9a92d58fff..fb16fc8a01 100644 --- a/cocos/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id +++ b/cocos/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id @@ -1 +1 @@ -4f58619fbbaa2bb184766db408386d247df236ce \ No newline at end of file +80b25c13bca3a2d8adfc68a899c732103f68e0f5 \ No newline at end of file diff --git a/extensions/GUI/CCScrollView/CCScrollView.cpp b/extensions/GUI/CCScrollView/CCScrollView.cpp index 4a8ab31c81..7ae70819af 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.cpp +++ b/extensions/GUI/CCScrollView/CCScrollView.cpp @@ -485,16 +485,6 @@ void ScrollView::addChild(Node * child, int zOrder, int tag) } } -void ScrollView::addChild(Node * child, int zOrder) -{ - this->addChild(child, zOrder, child->getTag()); -} - -void ScrollView::addChild(Node * child) -{ - this->addChild(child, child->getZOrder(), child->getTag()); -} - /** * clip this view so that outside of the visible bounds can be hidden. */ diff --git a/extensions/GUI/CCScrollView/CCScrollView.h b/extensions/GUI/CCScrollView/CCScrollView.h index fb448c314c..bef479e49b 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.h +++ b/extensions/GUI/CCScrollView/CCScrollView.h @@ -224,9 +224,9 @@ public: * @lua NA */ virtual void visit() override; + + using Node::addChild; virtual void addChild(Node * child, int zOrder, int tag) override; - virtual void addChild(Node * child, int zOrder) override; - virtual void addChild(Node * child) override; protected: /** diff --git a/tools/bindings-generator b/tools/bindings-generator index ad53201245..5f412d0b3a 160000 --- a/tools/bindings-generator +++ b/tools/bindings-generator @@ -1 +1 @@ -Subproject commit ad532012457e2eaff15d73d9ba28a638fa748d2d +Subproject commit 5f412d0b3a4eadba3d2abd750de87d1b0e219e0a