diff options
author | nat-goodspeed <nat@lindenlab.com> | 2024-09-05 08:37:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-05 08:37:16 -0400 |
commit | 7ac4c3b56e5246fceaa73e7c9c665d3c04827d6c (patch) | |
tree | e96334bd9299102ebdaf229eec9cf4c2165f8c2f /indra/newview/llspeakingindicatormanager.cpp | |
parent | 487973d3f0ee9b8583b3d977ca6a405cba5fe518 (diff) | |
parent | 6a747e1ce027700a3609f4c377179bfa29c3ce31 (diff) |
Merge pull request #2450 from secondlife/lua-merge
Merge updated 'main' branch into release/luau-scripting
Diffstat (limited to 'indra/newview/llspeakingindicatormanager.cpp')
-rw-r--r-- | indra/newview/llspeakingindicatormanager.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index f16ab3b25a..a9ef5e244d 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -109,9 +109,9 @@ private: * Changes state of indicators specified by LLUUIDs * * @param speakers_uuids - avatars' LLUUIDs whose speaking indicators should be switched - * @param switch_on - if TRUE specified indicator will be switched on, off otherwise. + * @param switch_on - if true specified indicator will be switched on, off otherwise. */ - void switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, BOOL switch_on); + void switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, bool switch_on); /** * Ensures that passed instance of Speaking Indicator does not exist among registered ones. @@ -154,7 +154,7 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i mSpeakingIndicators.insert(value_type); speaker_ids_t speakers_uuids; - BOOL is_in_same_voice = LLVoiceClient::getInstance()->isParticipant(speaker_id); + bool is_in_same_voice = LLVoiceClient::getInstance()->isParticipant(speaker_id); speakers_uuids.insert(speaker_id); switchSpeakerIndicators(speakers_uuids, is_in_same_voice); @@ -182,7 +182,7 @@ void SpeakingIndicatorManager::unregisterSpeakingIndicator(const LLUUID& speaker SpeakingIndicatorManager::SpeakingIndicatorManager() { LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&SpeakingIndicatorManager::sOnCurrentChannelChanged, this, _1)); - LLVoiceClient::getInstance()->addObserver(this); + LLVoiceClient::addObserver(this); } SpeakingIndicatorManager::~SpeakingIndicatorManager() @@ -193,15 +193,12 @@ void SpeakingIndicatorManager::cleanupSingleton() { // Don't use LLVoiceClient::getInstance() here without a check, // singleton MAY have already been destroyed. - if (LLVoiceClient::instanceExists()) - { - LLVoiceClient::getInstance()->removeObserver(this); - } + LLVoiceClient::removeObserver(this); } void SpeakingIndicatorManager::sOnCurrentChannelChanged(const LLUUID& /*session_id*/) { - switchSpeakerIndicators(mSwitchedIndicatorsOn, FALSE); + switchSpeakerIndicators(mSwitchedIndicatorsOn, false); mSwitchedIndicatorsOn.clear(); } @@ -214,15 +211,15 @@ void SpeakingIndicatorManager::onParticipantsChanged() LL_DEBUGS("SpeakingIndicator") << "Switching all OFF, count: " << mSwitchedIndicatorsOn.size() << LL_ENDL; // switch all indicators off - switchSpeakerIndicators(mSwitchedIndicatorsOn, FALSE); + switchSpeakerIndicators(mSwitchedIndicatorsOn, false); mSwitchedIndicatorsOn.clear(); LL_DEBUGS("SpeakingIndicator") << "Switching all ON, count: " << speakers_uuids.size() << LL_ENDL; // then switch current voice participants indicators on - switchSpeakerIndicators(speakers_uuids, TRUE); + switchSpeakerIndicators(speakers_uuids, true); } -void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, BOOL switch_on) +void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, bool switch_on) { LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); LLUUID session_id; |