diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-08-06 20:38:06 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-08-06 20:38:06 +0300 |
commit | eb82c78b071d71a0fd2d7be1c573997e41bab51e (patch) | |
tree | 39666d91f78367961d1e9dccb63fcb096f6198c2 /indra/llui | |
parent | 0bf3b61457e7c77e91fb03d91b4caf0d702f99fa (diff) |
code clean up
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llcommandmanager.cpp | 8 | ||||
-rw-r--r-- | indra/llui/llfloaterreg.cpp | 7 |
2 files changed, 3 insertions, 12 deletions
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index 0c27e519dd..6c3e676c9b 100644 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -32,6 +32,7 @@ #include "llcommandmanager.h" #include "lldir.h" #include "llerror.h" +#include "llsdutil.h" #include "llxuiparser.h" @@ -192,10 +193,5 @@ bool LLCommandManager::load() LLSD LLCommandManager::getCommandNames() { - LLSD cmd_names; - for (auto &it : mCommands) - { - cmd_names.append(it->name()); - } - return cmd_names; + return llsd::toArray(mCommands, [](const auto &cmd) { return cmd->name(); }); } diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index a9ed678973..8f9268ffcb 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -610,10 +610,5 @@ U32 LLFloaterReg::getVisibleFloaterInstanceCount() LLSD LLFloaterReg::getFloaterNames() { - LLSD names; - for (auto &it : sGroupMap) - { - names.append(it.first); - } - return names; + return llsd::toArray(sGroupMap, [](const auto &pair) { return pair.first; }); } |