From e94314dc954843c1f41412546a4c9ec3189a0257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 28 Dec 2019 01:02:31 -0500 Subject: [PATCH] LLMenuGL::getItemCount should be const and return size_type Also put it in the header. --- indra/llui/llmenugl.cpp | 5 ----- indra/llui/llmenugl.h | 4 +++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 469948837..cf992c935 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3333,11 +3333,6 @@ void LLMenuGL::setTornOff(BOOL torn_off) mTornOff = torn_off; } -U32 LLMenuGL::getItemCount() -{ - return mItems.size(); -} - LLMenuItemGL* LLMenuGL::getItem(S32 number) { if (number >= 0 && number < (S32)mItems.size()) diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 00a05ec45..218ffa922 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -536,8 +536,10 @@ public: typedef std::list item_list_t; item_list_t::iterator find(LLMenuItemGL* item) { return std::find(mItems.begin(), mItems.end(), item); } + // number of menu items + item_list_t::size_type LLMenuGL::getItemCount() const { return mItems.size(); } + void setItemLastSelected(LLMenuItemGL* item); // must be in menu - U32 getItemCount(); // number of menu items LLMenuItemGL* getItem(S32 number); // 0 = first item LLMenuItemGL* getHighlightedItem();