diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index cf992c935..8ccccbf92 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3194,7 +3194,7 @@ void LLMenuGL::insert(S32 position, LLView* ctrl, bool arrange /*= true*/) std::advance(position_iter, position); insert(position_iter, item, arrange); } -void LLMenuGL::insert(item_list_t::iterator position_iter, LLMenuItemGL* item, bool arrange /*= true*/) +void LLMenuGL::insert(item_list_t::const_iterator position_iter, LLMenuItemGL* item, bool arrange /*= true*/) { mItems.insert(position_iter, item); LLUICtrl::addChild(item); diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 9db94eacd..c3d0616a6 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -530,10 +530,10 @@ public: // add new item at position void insert(S32 begin, LLView* ctrl, bool arrange = true); - void insert(std::list::iterator position_iter, LLMenuItemGL* item, bool arrange = true); + typedef std::list item_list_t; + void insert(item_list_t::const_iterator position_iter, LLMenuItemGL* item, bool arrange = true); // find an item's position - typedef std::list item_list_t; item_list_t::const_iterator find(LLMenuItemGL* item) const { return std::find(mItems.begin(), mItems.end(), item); } // end of items, for use with other members that return an iterator diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f758902a3..dbce76044 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -10009,7 +10009,7 @@ void parse_simulator_features() LLMenuGL* menu = dynamic_cast(marker->getParent()); if (!menu) continue; - std::list::iterator it = menu->find(marker); + auto it = menu->find(marker); for (LLSD::map_iterator j = i->second.beginMap(); j != i->second.endMap(); ++j) {