mirror of https://github.com/axmolengine/axmol.git
Merge pull request #2554 from dumganhar/iss2149-const
fixed #2149: Adding const qualification to some CCNode's getters
This commit is contained in:
commit
f7e4dc04a7
|
@ -326,7 +326,7 @@ CCArray* CCNode::getChildren()
|
|||
return m_pChildren;
|
||||
}
|
||||
|
||||
unsigned int CCNode::getChildrenCount(void)
|
||||
unsigned int CCNode::getChildrenCount(void) const
|
||||
{
|
||||
return m_pChildren ? m_pChildren->count() : 0;
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ void CCNode::setAnchorPoint(const CCPoint& point)
|
|||
}
|
||||
|
||||
/// contentSize getter
|
||||
const CCSize& CCNode::getContentSize()
|
||||
const CCSize& CCNode::getContentSize() const
|
||||
{
|
||||
return m_obContentSize;
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ void CCNode::ignoreAnchorPointForPosition(bool newValue)
|
|||
}
|
||||
|
||||
/// tag getter
|
||||
int CCNode::getTag()
|
||||
int CCNode::getTag() const
|
||||
{
|
||||
return m_nTag;
|
||||
}
|
||||
|
|
|
@ -412,7 +412,7 @@ public:
|
|||
*
|
||||
* @return The untransformed size of the node.
|
||||
*/
|
||||
virtual const CCSize& getContentSize();
|
||||
virtual const CCSize& getContentSize() const;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -608,7 +608,7 @@ public:
|
|||
*
|
||||
* @return The amount of children.
|
||||
*/
|
||||
unsigned int getChildrenCount(void);
|
||||
unsigned int getChildrenCount(void) const;
|
||||
|
||||
/**
|
||||
* Sets the parent node
|
||||
|
@ -757,7 +757,7 @@ public:
|
|||
*
|
||||
* @return A interger that identifies the node.
|
||||
*/
|
||||
virtual int getTag();
|
||||
virtual int getTag() const;
|
||||
/**
|
||||
* Changes the tag that is used to identify the node easily.
|
||||
*
|
||||
|
|
|
@ -436,7 +436,7 @@ void CCScrollView::performedAnimatedScroll(float dt)
|
|||
}
|
||||
|
||||
|
||||
const CCSize& CCScrollView::getContentSize()
|
||||
const CCSize& CCScrollView::getContentSize() const
|
||||
{
|
||||
return m_pContainer->getContentSize();
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ public:
|
|||
virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent);
|
||||
|
||||
virtual void setContentSize(const CCSize & size);
|
||||
virtual const CCSize& getContentSize();
|
||||
virtual const CCSize& getContentSize() const;
|
||||
|
||||
void updateInset();
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue