summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarrendernotifier.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-05-15 12:18:31 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-05-15 12:18:31 -0400
commit7ccf02515ad3f9e3bf795d651fe4b3c0d773f353 (patch)
treec4adc897c07f652e617e91fbf41c12b823acc808 /indra/newview/llavatarrendernotifier.cpp
parent1abf5f18d6afc7ae9e1b1562b92e5c1ce33b722f (diff)
parente7eced3c87310b15ac20cc3cd470d67686104a14 (diff)
Merge commit 'e7eced3' into lua-timers for whitespace fixes.
Diffstat (limited to 'indra/newview/llavatarrendernotifier.cpp')
-rw-r--r--indra/newview/llavatarrendernotifier.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/indra/newview/llavatarrendernotifier.cpp b/indra/newview/llavatarrendernotifier.cpp
index 8b09f7903d..61fc9d00f3 100644
--- a/indra/newview/llavatarrendernotifier.cpp
+++ b/indra/newview/llavatarrendernotifier.cpp
@@ -2,26 +2,26 @@
* @file llavatarrendernotifier.cpp
* @author andreykproductengine
* @date 2015-08-05
- * @brief
- *
+ * @brief
+ *
* $LicenseInfo:firstyear=2013&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2013, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -113,12 +113,12 @@ void LLAvatarRenderNotifier::displayNotification(bool show_over_limit)
{
mAgentComplexity = mLatestAgentComplexity;
mShowOverLimitAgents = show_over_limit;
- static LLCachedControl<U32> expire_delay(gSavedSettings, "ShowMyComplexityChanges", 20);
+ static LLCachedControl<U32> expire_delay(gSavedSettings, "ShowMyComplexityChanges", 20);
- LLDate expire_date(LLDate::now().secondsSinceEpoch() + expire_delay);
- LLSD args;
- args["AGENT_COMPLEXITY"] = LLSD::Integer(mLatestAgentComplexity);
- std::string notification_name;
+ LLDate expire_date(LLDate::now().secondsSinceEpoch() + expire_delay);
+ LLSD args;
+ args["AGENT_COMPLEXITY"] = LLSD::Integer(mLatestAgentComplexity);
+ std::string notification_name;
if (mShowOverLimitAgents)
{
notification_name = "AgentComplexityWithVisibility";
@@ -128,19 +128,19 @@ void LLAvatarRenderNotifier::displayNotification(bool show_over_limit)
mAgentsCount = mLatestAgentsCount;
mOverLimitAgents = mLatestOverLimitAgents;
mOverLimitPct = mLatestOverLimitPct;
- }
- else
- {
+ }
+ else
+ {
// no change in visibility, just update complexity
notification_name = "AgentComplexity";
- }
+ }
- if (mNotificationPtr != NULL && mNotificationPtr->getName() != notification_name)
- {
- // since unique tag works only for same notification,
- // old notification needs to be canceled manually
- LLNotifications::instance().cancel(mNotificationPtr);
- }
+ if (mNotificationPtr != NULL && mNotificationPtr->getName() != notification_name)
+ {
+ // since unique tag works only for same notification,
+ // old notification needs to be canceled manually
+ LLNotifications::instance().cancel(mNotificationPtr);
+ }
// log unconditionally
LL_WARNS("AvatarRenderInfo") << notification_name << " " << args << LL_ENDL;
@@ -158,21 +158,21 @@ void LLAvatarRenderNotifier::displayNotification(bool show_over_limit)
bool LLAvatarRenderNotifier::isNotificationVisible()
{
- return mNotificationPtr != NULL && mNotificationPtr->isActive();
+ return mNotificationPtr != NULL && mNotificationPtr->isActive();
}
void LLAvatarRenderNotifier::updateNotificationRegion(U32 agentcount, U32 overLimit)
{
- if (agentcount == 0)
- {
- // Data not ready
- return;
- }
+ if (agentcount == 0)
+ {
+ // Data not ready
+ return;
+ }
- // save current values for later use
- mLatestAgentsCount = agentcount > overLimit ? agentcount - 1 : agentcount; // subtract self
- mLatestOverLimitAgents = overLimit;
- mLatestOverLimitPct = mLatestAgentsCount != 0 ? ((F32)overLimit / (F32)mLatestAgentsCount) * 100.0 : 0;
+ // save current values for later use
+ mLatestAgentsCount = agentcount > overLimit ? agentcount - 1 : agentcount; // subtract self
+ mLatestOverLimitAgents = overLimit;
+ mLatestOverLimitPct = mLatestAgentsCount != 0 ? ((F32)overLimit / (F32)mLatestAgentsCount) * 100.0 : 0;
if (mAgentsCount == mLatestAgentsCount
&& mOverLimitAgents == mLatestOverLimitAgents)
@@ -313,7 +313,7 @@ void LLHUDRenderNotifier::updateNotificationHUD(hud_complexity_list_t complexity
{
return;
}
-
+
// TODO:
// Find a way to show message with list of issues, but without making it too large
// and intrusive.