summaryrefslogtreecommitdiff
path: root/indra/llui/llcommandmanager.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-10-05 16:39:32 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-10-05 16:39:32 -0700
commitd8489166645f2e3ea7edd252997f9f48aa0871c3 (patch)
treee2f5c52f0c397b0dfb1d0e3cb47ca59d609292dc /indra/llui/llcommandmanager.cpp
parent17c699e4281ffff58e24c5db960a5c33018f1747 (diff)
parenta88bb3231b2685eb640710d7617d26b7f3a2c0d2 (diff)
Merge with latest
Diffstat (limited to 'indra/llui/llcommandmanager.cpp')
-rw-r--r--indra/llui/llcommandmanager.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp
index 922f243806..2bd50af7af 100644
--- a/indra/llui/llcommandmanager.cpp
+++ b/indra/llui/llcommandmanager.cpp
@@ -124,9 +124,25 @@ LLCommand * LLCommandManager::getCommand(const LLCommandId& commandId)
return command_match;
}
+LLCommand * LLCommandManager::getCommand(const LLUUID& commandUUID)
+{
+ LLCommand * command_match = NULL;
+
+ CommandUUIDMap::const_iterator found = mCommandUUIDs.find(commandUUID);
+
+ if (found != mCommandUUIDs.end())
+ {
+ command_match = mCommands[found->second];
+ }
+
+ return command_match;
+}
+
void LLCommandManager::addCommand(LLCommand * command)
{
- mCommandIndices[command->id()] = mCommands.size();
+ LLCommandId command_id = command->id();
+ mCommandIndices[command_id] = mCommands.size();
+ mCommandUUIDs[command_id.uuid()] = mCommands.size();
mCommands.push_back(command);
lldebugs << "Successfully added command: " << command->id().name() << llendl;