summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpathfindingcharacters.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-05-01 14:22:58 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-05-01 14:22:58 -0700
commit852377c676bc3a8183073e41357499f06f40fb1b (patch)
tree53e8b48d65522b74876432819bc4791796d9ab34 /indra/newview/llfloaterpathfindingcharacters.cpp
parent3c18573ed0278b420e06b1c2ce5fc19232332aba (diff)
Switching the functionality of the linksets and character request handling to no longer return values directly, but rather to report status only through the callbacks.
Diffstat (limited to 'indra/newview/llfloaterpathfindingcharacters.cpp')
-rw-r--r--indra/newview/llfloaterpathfindingcharacters.cpp34
1 files changed, 10 insertions, 24 deletions
diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp
index ee97063352..d0706b0bc0 100644
--- a/indra/newview/llfloaterpathfindingcharacters.cpp
+++ b/indra/newview/llfloaterpathfindingcharacters.cpp
@@ -216,27 +216,7 @@ void LLFloaterPathfindingCharacters::setMessagingState(EMessagingState pMessagin
void LLFloaterPathfindingCharacters::requestGetCharacters()
{
- switch (LLPathfindingManager::getInstance()->requestGetCharacters(++mMessagingRequestId, boost::bind(&LLFloaterPathfindingCharacters::handleNewCharacters, this, _1, _2, _3)))
- {
- case LLPathfindingManager::kRequestStarted :
- setMessagingState(kMessagingGetRequestSent);
- break;
- case LLPathfindingManager::kRequestCompleted :
- clearCharacters();
- setMessagingState(kMessagingComplete);
- break;
- case LLPathfindingManager::kRequestNotEnabled :
- clearCharacters();
- setMessagingState(kMessagingNotEnabled);
- break;
- case LLPathfindingManager::kRequestError :
- setMessagingState(kMessagingGetError);
- break;
- default :
- setMessagingState(kMessagingGetError);
- llassert(0);
- break;
- }
+ LLPathfindingManager::getInstance()->requestGetCharacters(++mMessagingRequestId, boost::bind(&LLFloaterPathfindingCharacters::handleNewCharacters, this, _1, _2, _3));
}
void LLFloaterPathfindingCharacters::handleNewCharacters(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pCharacterRequestStatus, LLPathfindingCharacterListPtr pCharacterListPtr)
@@ -244,14 +224,20 @@ void LLFloaterPathfindingCharacters::handleNewCharacters(LLPathfindingManager::r
llassert(pRequestId <= mMessagingRequestId);
if (pRequestId == mMessagingRequestId)
{
- mCharacterListPtr = pCharacterListPtr;
- updateScrollList();
-
switch (pCharacterRequestStatus)
{
+ case LLPathfindingManager::kRequestStarted :
+ setMessagingState(kMessagingGetRequestSent);
+ break;
case LLPathfindingManager::kRequestCompleted :
+ mCharacterListPtr = pCharacterListPtr;
+ updateScrollList();
setMessagingState(kMessagingComplete);
break;
+ case LLPathfindingManager::kRequestNotEnabled :
+ clearCharacters();
+ setMessagingState(kMessagingNotEnabled);
+ break;
case LLPathfindingManager::kRequestError :
setMessagingState(kMessagingGetError);
break;