Tiny refactor, harmless

This commit is contained in:
Liru Færs
2019-12-22 18:35:59 -05:00
parent a87b7603d1
commit 78f354925c

View File

@@ -375,7 +375,6 @@ LLSD create_group_element(const LLGroupData *group_datap, const LLUUID &active_g
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask)
{
S32 count = gAgent.mGroups.size();
LLUUID id;
LLCtrlListInterface *group_list = ctrl->getListInterface();
if (!group_list) return;
@@ -386,11 +385,13 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 pow
group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
for(S32 i = 0; i < count; ++i)
for(const auto& group : gAgent.mGroups)
{
LLSD element = create_group_element(&gAgent.mGroups[i], highlight_id, powers_mask);
if(element.size())
LLSD element = create_group_element(&group, highlight_id, powers_mask);
if (element.size())
{
group_list->addElement(element, ADD_SORTED);
}
}
// add "none" to list at top