From b162094c7609fa37f2eef6be3fed0e26830bc506 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 15 Sep 2012 23:05:16 +0300 Subject: Improve a bit widgets speed. --- src/gui/widgets/shopitems.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets/shopitems.h') diff --git a/src/gui/widgets/shopitems.h b/src/gui/widgets/shopitems.h index ff1b0ca7a..038c10093 100644 --- a/src/gui/widgets/shopitems.h +++ b/src/gui/widgets/shopitems.h @@ -77,9 +77,11 @@ class ShopItems : public gcn::ListModel /** * Returns the number of items in the shop. */ - int getNumberOfElements(); + int getNumberOfElements() + { return static_cast(mShopItems.size()); } - bool empty() const; + bool empty() const + { return mShopItems.empty(); } /** * Returns the name of item number i in the shop. -- cgit v1.2.3-60-g2f50