From 4419bb870986c6900fc096338622d27b999cd771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Sun, 11 Feb 2024 01:23:28 +0100 Subject: more misc: BOOL (int) to real bool --- indra/newview/lltoast.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 223aaad811..0d71287fc5 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -44,13 +44,13 @@ LLToastLifeTimer::LLToastLifeTimer(LLToast* toast, F32 period) } /*virtual*/ -BOOL LLToastLifeTimer::tick() +bool LLToastLifeTimer::tick() { if (mEventTimer.hasExpired()) { mToast->expire(); } - return FALSE; + return false; } void LLToastLifeTimer::stop() -- cgit v1.2.3 From c285f59ce2a05703e3a1232fcaf3ee3aea714b3f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 18 Feb 2024 12:52:19 +0100 Subject: Replace BOOL with bool in llwindow and dependent classes --- indra/newview/lltoast.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 0d71287fc5..bd39f5e057 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -583,7 +583,7 @@ void LLNotificationsUI::LLToast::startTimer() //-------------------------------------------------------------------------- -BOOL LLToast::handleMouseDown(S32 x, S32 y, MASK mask) +bool LLToast::handleMouseDown(S32 x, S32 y, MASK mask) { if(mHideBtn && mHideBtn->getEnabled()) { -- cgit v1.2.3 From a5261a5fa8fad810ecb5c260d92c3e771822bf58 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 20 Feb 2024 23:46:23 +0100 Subject: Convert BOOL to bool in llui --- indra/newview/lltoast.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index bd39f5e057..269d30746f 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -151,7 +151,7 @@ LLToast::LLToast(const LLToast::Params& p) } } -void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLToast::reshape(S32 width, S32 height, bool called_from_parent) { // We shouldn't use reshape from LLModalDialog since it changes toasts position. // Toasts position should be controlled only by toast screen channel, see LLScreenChannelBase. @@ -160,14 +160,14 @@ void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent) } //-------------------------------------------------------------------------- -BOOL LLToast::postBuild() +bool LLToast::postBuild() { if(!mCanFade) { mTimer->stop(); } - return TRUE; + return true; } //-------------------------------------------------------------------------- @@ -218,7 +218,7 @@ void LLToast::hide() } /*virtual*/ -void LLToast::setFocus(BOOL b) +void LLToast::setFocus(bool b) { if (b && !hasFocus() @@ -226,9 +226,9 @@ void LLToast::setFocus(BOOL b) && mWrapperPanel && !mWrapperPanel->getChildList()->empty()) { - LLModalDialog::setFocus(TRUE); + LLModalDialog::setFocus(true); // mostly for buttons - mPanel->setFocus(TRUE); + mPanel->setFocus(true); } else { @@ -391,7 +391,7 @@ void LLToast::draw() } //-------------------------------------------------------------------------- -void LLToast::setVisible(BOOL show) +void LLToast::setVisible(bool show) { if(mIsHidden) { -- cgit v1.2.3 From 60d3dd98a44230c21803c1606552ee098ed9fa7c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 21 Feb 2024 21:05:14 +0100 Subject: Convert remaining BOOL to bool --- indra/newview/lltoast.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 269d30746f..f6fadf276c 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -68,7 +68,7 @@ void LLToastLifeTimer::restart() mEventTimer.reset(); } -BOOL LLToastLifeTimer::getStarted() +bool LLToastLifeTimer::getStarted() { return mEventTimer.getStarted(); } @@ -121,11 +121,11 @@ LLToast::LLToast(const LLToast::Params& p) buildFromFile("panel_toast.xml"); - setCanDrag(FALSE); + setCanDrag(false); mWrapperPanel = getChild("wrapper_panel"); - setBackgroundOpaque(TRUE); // *TODO: obsolete + setBackgroundOpaque(true); // *TODO: obsolete updateTransparency(); if(p.panel()) @@ -209,7 +209,7 @@ void LLToast::hide() { if (!mIsHidden) { - setVisible(FALSE); + setVisible(false); setFading(false); mTimer->stop(); mIsHidden = true; @@ -495,7 +495,7 @@ void LLToast::updateHoveredState() sendChildToFront(mHideBtn); if(mHideBtn && mHideBtn->getEnabled()) { - mHideBtn->setVisible(TRUE); + mHideBtn->setVisible(true); } mToastMouseEnterSignal(this, getValue()); @@ -518,7 +518,7 @@ void LLToast::updateHoveredState() mHideBtnPressed = false; return; } - mHideBtn->setVisible(FALSE); + mHideBtn->setVisible(false); } mToastMouseLeaveSignal(this, getValue()); @@ -526,7 +526,7 @@ void LLToast::updateHoveredState() } } -void LLToast::setBackgroundOpaque(BOOL b) +void LLToast::setBackgroundOpaque(bool b) { if(mWrapperPanel && !isBackgroundVisible()) { -- cgit v1.2.3 From a865d423974ea06dffa47798c81e98e7570b02ec Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 5 Mar 2024 17:03:11 +0100 Subject: viewer#819 Avoid reading the same XML file multiple times --- indra/newview/lltoast.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index f6fadf276c..5cf2e89c63 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -119,7 +119,7 @@ LLToast::LLToast(const LLToast::Params& p) { mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs)); - buildFromFile("panel_toast.xml"); + buildFromFile("panel_toast.xml", true); setCanDrag(false); -- cgit v1.2.3