diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-08-11 16:55:34 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-08-11 16:55:34 -0400 |
commit | 47093f6e52741f36fcc782cb52e54baf9f6e3acf (patch) | |
tree | 86b5d6fe9cd8dfbd5a9e36dab09c71f9de099cb3 /indra/llui/llcommandmanager.cpp | |
parent | d822d0e96bb69374f49fef8a827a042474deda8d (diff) | |
parent | 310ec101dfd2c69ecc1a51d0a3a8ea12d5fdaf7a (diff) |
merge
Diffstat (limited to 'indra/llui/llcommandmanager.cpp')
-rwxr-xr-x | indra/llui/llcommandmanager.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index 74ef8dd0c3..3e159365e5 100755 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -131,6 +131,25 @@ LLCommand * LLCommandManager::getCommand(const LLCommandId& commandId) return command_match; } +LLCommand * LLCommandManager::getCommand(const std::string& name) +{ + LLCommand * command_match = NULL; + + CommandVector::const_iterator it = mCommands.begin(); + + while (it != mCommands.end()) + { + if ((*it)->name() == name) + { + command_match = *it; + break; + } + it++; + } + + return command_match; +} + void LLCommandManager::addCommand(LLCommand * command) { LLCommandId command_id = command->id(); |