From 0518e494b17d1263fc41ade6af18d476819ed6a5 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 27 May 2014 10:40:20 +0800 Subject: [PATCH] add constness to UIListView --- cocos/ui/UIListView.cpp | 4 ++-- cocos/ui/UIListView.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/ui/UIListView.cpp b/cocos/ui/UIListView.cpp index 4923c6af89..b0391bbcb1 100644 --- a/cocos/ui/UIListView.cpp +++ b/cocos/ui/UIListView.cpp @@ -353,7 +353,7 @@ void ListView::removeAllItems() removeAllChildren(); } -Widget* ListView::getItem(ssize_t index) +Widget* ListView::getItem(ssize_t index)const { if (index < 0 || index >= _items.size()) { @@ -396,7 +396,7 @@ void ListView::setItemsMargin(float margin) _refreshViewDirty = true; } -float ListView::getItemsMargin() +float ListView::getItemsMargin()const { return _itemsMargin; } diff --git a/cocos/ui/UIListView.h b/cocos/ui/UIListView.h index 563f6bfaeb..d053bca7cc 100644 --- a/cocos/ui/UIListView.h +++ b/cocos/ui/UIListView.h @@ -130,7 +130,7 @@ public: * * @return the item widget. */ - Widget* getItem(ssize_t index); + Widget* getItem(ssize_t index)const; /** * Returns the item container. @@ -159,7 +159,7 @@ public: */ void setItemsMargin(float margin); - float getItemsMargin(); + float getItemsMargin()const; virtual void sortAllChildren() override; virtual void addChild(Node * child) override;