mirror of https://github.com/axmolengine/axmol.git
Merge pull request #6721 from zifter/FixNodeConst
[ci skip]Getter always must be a const method.
This commit is contained in:
commit
5a309fbc6e
|
@ -181,7 +181,7 @@ const BlendFunc &LabelBMFont::getBlendFunc() const
|
|||
return _label->getBlendFunc();
|
||||
}
|
||||
|
||||
Node* LabelBMFont::getChildByTag(int tag)
|
||||
Node* LabelBMFont::getChildByTag(int tag) const
|
||||
{
|
||||
return _label->getLetter(tag);
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ public:
|
|||
virtual const BlendFunc &getBlendFunc() const override;
|
||||
|
||||
virtual Sprite * getLetter(int ID);
|
||||
virtual Node * getChildByTag(int tag) override;
|
||||
virtual Node * getChildByTag(int tag) const override;
|
||||
|
||||
virtual void setColor(const Color3B& color) override;
|
||||
|
||||
|
|
|
@ -718,7 +718,7 @@ void Node::childrenAlloc(void)
|
|||
_children.reserve(4);
|
||||
}
|
||||
|
||||
Node* Node::getChildByTag(int tag)
|
||||
Node* Node::getChildByTag(int tag) const
|
||||
{
|
||||
CCASSERT( tag != Node::INVALID_TAG, "Invalid tag");
|
||||
|
||||
|
|
|
@ -643,7 +643,7 @@ public:
|
|||
*
|
||||
* @return a Node object whose tag equals to the input parameter
|
||||
*/
|
||||
virtual Node * getChildByTag(int tag);
|
||||
virtual Node * getChildByTag(int tag) const;
|
||||
/**
|
||||
* Returns the array of the node's children
|
||||
*
|
||||
|
|
|
@ -196,7 +196,7 @@ protected:
|
|||
virtual Vector<Node*>& getChildren() override{return ScrollView::getChildren();};
|
||||
virtual const Vector<Node*>& getChildren() const override{return ScrollView::getChildren();};
|
||||
virtual ssize_t getChildrenCount() const override {return ScrollView::getChildrenCount();};
|
||||
virtual Node * getChildByTag(int tag) override {return ScrollView::getChildByTag(tag);};
|
||||
virtual Node * getChildByTag(int tag) const override {return ScrollView::getChildByTag(tag);};
|
||||
virtual Widget* getChildByName(const std::string& name) override {return ScrollView::getChildByName(name);};
|
||||
void updateInnerContainerSize();
|
||||
void remedyLayoutParameter(Widget* item);
|
||||
|
|
|
@ -183,7 +183,7 @@ protected:
|
|||
virtual Vector<Node*>& getChildren() override{return Widget::getChildren();};
|
||||
virtual const Vector<Node*>& getChildren() const override{return Widget::getChildren();};
|
||||
virtual ssize_t getChildrenCount() const override {return Widget::getChildrenCount();};
|
||||
virtual Node * getChildByTag(int tag) override {return Widget::getChildByTag(tag);};
|
||||
virtual Node * getChildByTag(int tag) const override {return Widget::getChildByTag(tag);};
|
||||
virtual Widget* getChildByName(const std::string& name) override {return Widget::getChildByName(name);};
|
||||
|
||||
Layout* createPage();
|
||||
|
|
|
@ -301,7 +301,7 @@ ssize_t ScrollView::getChildrenCount() const
|
|||
return _innerContainer->getChildrenCount();
|
||||
}
|
||||
|
||||
Node* ScrollView::getChildByTag(int tag)
|
||||
Node* ScrollView::getChildByTag(int tag) const
|
||||
{
|
||||
return _innerContainer->getChildByTag(tag);
|
||||
}
|
||||
|
|
|
@ -296,7 +296,7 @@ public:
|
|||
|
||||
virtual ssize_t getChildrenCount() const override;
|
||||
|
||||
virtual Node * getChildByTag(int tag) override;
|
||||
virtual Node * getChildByTag(int tag) const override;
|
||||
|
||||
virtual Widget* getChildByName(const std::string& name) override;
|
||||
|
||||
|
|
Loading…
Reference in New Issue