diff options
author | callum_linden <none@none> | 2015-08-04 15:47:37 -0700 |
---|---|---|
committer | callum_linden <none@none> | 2015-08-04 15:47:37 -0700 |
commit | 230bc8614765c0973fb91bca68238b9abcd12adf (patch) | |
tree | 8ccde7ba65ba2eb2d964c9e44e4a2ad6653111b2 /indra/llui/llcommandmanager.cpp | |
parent | a75a4e2a4f0b8bc65aa45368326fce0e6635c4ac (diff) | |
parent | 310ec101dfd2c69ecc1a51d0a3a8ea12d5fdaf7a (diff) |
Merge with viewer release
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(); |