summaryrefslogtreecommitdiff
path: root/indra/llui/llcommandmanager.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-10-05 22:46:30 -0700
committerMerov Linden <merov@lindenlab.com>2011-10-05 22:46:30 -0700
commitfc5030fcfe9d3ffcbb2ad1ae0b1dacd1699a54ce (patch)
treea1a6f0aabfdbee631c8c802aef1656551a3fa32a /indra/llui/llcommandmanager.cpp
parent55d2e0020b62f64133151c70adc3acc084685e3e (diff)
EXP-1286 : Clean-up the mess I added to llcommandmanager. All CommandId now have a trusted UUID which is the base for indexing and comparison.
Diffstat (limited to 'indra/llui/llcommandmanager.cpp')
-rw-r--r--indra/llui/llcommandmanager.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp
index 2bd50af7af..9ce7533e1b 100644
--- a/indra/llui/llcommandmanager.cpp
+++ b/indra/llui/llcommandmanager.cpp
@@ -114,7 +114,7 @@ LLCommand * LLCommandManager::getCommand(const LLCommandId& commandId)
{
LLCommand * command_match = NULL;
- CommandIndexMap::const_iterator found = mCommandIndices.find(commandId);
+ CommandIndexMap::const_iterator found = mCommandIndices.find(commandId.uuid());
if (found != mCommandIndices.end())
{
@@ -124,25 +124,10 @@ 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)
{
LLCommandId command_id = command->id();
- mCommandIndices[command_id] = mCommands.size();
- mCommandUUIDs[command_id.uuid()] = mCommands.size();
+ mCommandIndices[command_id.uuid()] = mCommands.size();
mCommands.push_back(command);
lldebugs << "Successfully added command: " << command->id().name() << llendl;