diff options
author | Merov Linden <merov@lindenlab.com> | 2011-10-05 11:18:17 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2011-10-05 11:18:17 -0700 |
commit | 3b3a13707309eb4b7d6ed5d309081c99e5f28eca (patch) | |
tree | 3103294452ad16bcd18b79c78db00b5e5a2dea8b /indra/llui/llcommandmanager.cpp | |
parent | daae211fe3e2d1da3623951b1166473c53ce5808 (diff) |
EXP-1286 : DaD is functional though has bugs... Working on it...
Diffstat (limited to 'indra/llui/llcommandmanager.cpp')
-rw-r--r-- | indra/llui/llcommandmanager.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index b1147134c2..a8127ab3e3 100644 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -112,9 +112,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; |