summaryrefslogtreecommitdiff
path: root/indra/newview/llspeakers.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-02-08 09:50:04 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-02-08 09:50:04 -0500
commit5dda2516ad599d3c295930fb3fc0c6cdbe8c2ce5 (patch)
tree06d761559a50b8df3db4dffa32c6ad28ce398c11 /indra/newview/llspeakers.cpp
parentf5b82a377256d5806ec101e8a9d90533ea1a3bf9 (diff)
parentbb977a194f42cafdcf3f1245adf3b7f49857e552 (diff)
merge
Diffstat (limited to 'indra/newview/llspeakers.cpp')
-rw-r--r--indra/newview/llspeakers.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 786fa24e65..717a8bda1e 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -175,6 +175,11 @@ BOOL LLSpeakerActionTimer::tick()
return TRUE;
}
+void LLSpeakerActionTimer::unset()
+{
+ mActionCallback = 0;
+}
+
LLSpeakersDelayActionsStorage::LLSpeakersDelayActionsStorage(LLSpeakerActionTimer::action_callback_t action_cb, F32 action_delay)
: mActionCallback(action_cb)
, mActionDelay(action_delay)
@@ -205,7 +210,7 @@ void LLSpeakersDelayActionsStorage::setActionTimer(const LLUUID& speaker_id)
}
}
-void LLSpeakersDelayActionsStorage::unsetActionTimer(const LLUUID& speaker_id, bool delete_it)
+void LLSpeakersDelayActionsStorage::unsetActionTimer(const LLUUID& speaker_id)
{
if (mActionTimersMap.size() == 0) return;
@@ -213,10 +218,7 @@ void LLSpeakersDelayActionsStorage::unsetActionTimer(const LLUUID& speaker_id, b
if (it_speaker != mActionTimersMap.end())
{
- if (delete_it)
- {
- delete it_speaker->second;
- }
+ it_speaker->second->unset();
mActionTimersMap.erase(it_speaker);
}
}
@@ -233,8 +235,7 @@ void LLSpeakersDelayActionsStorage::removeAllTimers()
bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_id)
{
- bool delete_it = false; // we're *in* this timer, return true to delete it, don't manually delete it
- unsetActionTimer(speaker_id, delete_it);
+ unsetActionTimer(speaker_id);
if (mActionCallback)
{
@@ -293,9 +294,7 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin
}
}
- bool delete_it = true;
- mSpeakerDelayRemover->unsetActionTimer(speakerp->mID, delete_it);
-
+ mSpeakerDelayRemover->unsetActionTimer(speakerp->mID);
return speakerp;
}