From b9740dfc6e72d34d135fb9dafe7eed250e4e8b6e Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 1 Jul 2024 11:52:47 +0200 Subject: Fix loop scope issue and rework some strange-looking loops --- indra/llui/llaccordionctrltab.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/llui/llaccordionctrltab.cpp') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 6d58a2545c..ac66525030 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -602,15 +602,13 @@ void LLAccordionCtrlTab::setSelected(bool is_selected) LLView* LLAccordionCtrlTab::findContainerView() { - child_list_const_iter_t it = getChildList()->begin(), it_end = getChildList()->end(); - while (it != it_end) + for (auto child : *getChildList()) { - LLView* child = *(it++); if (DD_HEADER_NAME != child->getName() && child->getVisible()) return child; } - return NULL; + return nullptr; } void LLAccordionCtrlTab::selectOnFocusReceived() -- cgit v1.2.3