add constness to UIListView

This commit is contained in:
andyque 2014-05-27 10:40:20 +08:00
parent b17de0cdcb
commit 0518e494b1
2 changed files with 4 additions and 4 deletions

View File

@ -353,7 +353,7 @@ void ListView::removeAllItems()
removeAllChildren(); removeAllChildren();
} }
Widget* ListView::getItem(ssize_t index) Widget* ListView::getItem(ssize_t index)const
{ {
if (index < 0 || index >= _items.size()) if (index < 0 || index >= _items.size())
{ {
@ -396,7 +396,7 @@ void ListView::setItemsMargin(float margin)
_refreshViewDirty = true; _refreshViewDirty = true;
} }
float ListView::getItemsMargin() float ListView::getItemsMargin()const
{ {
return _itemsMargin; return _itemsMargin;
} }

View File

@ -130,7 +130,7 @@ public:
* *
* @return the item widget. * @return the item widget.
*/ */
Widget* getItem(ssize_t index); Widget* getItem(ssize_t index)const;
/** /**
* Returns the item container. * Returns the item container.
@ -159,7 +159,7 @@ public:
*/ */
void setItemsMargin(float margin); void setItemsMargin(float margin);
float getItemsMargin(); float getItemsMargin()const;
virtual void sortAllChildren() override; virtual void sortAllChildren() override;
virtual void addChild(Node * child) override; virtual void addChild(Node * child) override;