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/llpaneleditsky.cpp | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'indra/newview/llpaneleditsky.cpp') diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index 839f25761a..5f5dda12c7 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -139,7 +139,7 @@ LLPanelSettingsSkyAtmosTab::LLPanelSettingsSkyAtmosTab() : } -BOOL LLPanelSettingsSkyAtmosTab::postBuild() +bool LLPanelSettingsSkyAtmosTab::postBuild() { getChild(FIELD_SKY_AMBIENT_LIGHT)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAmbientLightChanged(); }); getChild(FIELD_SKY_BLUE_HORIZON)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onBlueHorizonChanged(); }); @@ -156,11 +156,11 @@ BOOL LLPanelSettingsSkyAtmosTab::postBuild() getChild(FIELD_REFLECTION_PROBE_AMBIANCE)->setCommitCallback([this](LLUICtrl*, const LLSD&) { onReflectionProbeAmbianceChanged(); }); refresh(); - return TRUE; + return true; } //virtual -void LLPanelSettingsSkyAtmosTab::setEnabled(BOOL enabled) +void LLPanelSettingsSkyAtmosTab::setEnabled(bool enabled) { LLPanelSettingsSky::setEnabled(enabled); @@ -184,8 +184,8 @@ void LLPanelSettingsSkyAtmosTab::refresh() { if (!mSkySettings) { - setAllChildrenEnabled(FALSE); - setEnabled(FALSE); + setAllChildrenEnabled(false); + setEnabled(false); return; } @@ -357,7 +357,7 @@ LLPanelSettingsSkyCloudTab::LLPanelSettingsSkyCloudTab() : { } -BOOL LLPanelSettingsSkyCloudTab::postBuild() +bool LLPanelSettingsSkyCloudTab::postBuild() { getChild(FIELD_SKY_CLOUD_COLOR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudColorChanged(); }); getChild(FIELD_SKY_CLOUD_COVERAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudCoverageChanged(); }); @@ -378,11 +378,11 @@ BOOL LLPanelSettingsSkyCloudTab::postBuild() refresh(); - return TRUE; + return true; } //virtual -void LLPanelSettingsSkyCloudTab::setEnabled(BOOL enabled) +void LLPanelSettingsSkyCloudTab::setEnabled(bool enabled) { LLPanelSettingsSky::setEnabled(enabled); @@ -405,8 +405,8 @@ void LLPanelSettingsSkyCloudTab::refresh() { if (!mSkySettings) { - setAllChildrenEnabled(FALSE); - setEnabled(FALSE); + setAllChildrenEnabled(false); + setEnabled(false); return; } @@ -510,7 +510,7 @@ LLPanelSettingsSkySunMoonTab::LLPanelSettingsSkySunMoonTab() : } -BOOL LLPanelSettingsSkySunMoonTab::postBuild() +bool LLPanelSettingsSkySunMoonTab::postBuild() { getChild(FIELD_SKY_SUN_MOON_COLOR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunMoonColorChanged(); }); getChild(FIELD_SKY_GLOW_FOCUS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onGlowChanged(); }); @@ -536,11 +536,11 @@ BOOL LLPanelSettingsSkySunMoonTab::postBuild() refresh(); - return TRUE; + return true; } //virtual -void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled) +void LLPanelSettingsSkySunMoonTab::setEnabled(bool enabled) { LLPanelSettingsSky::setEnabled(enabled); @@ -553,8 +553,8 @@ void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled) getChild(FIELD_SKY_SUN_SCALE)->setEnabled(enabled); getChild(FIELD_SKY_MOON_SCALE)->setEnabled(enabled); getChild(FIELD_SKY_MOON_BRIGHTNESS)->setEnabled(enabled); - getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(TRUE); - getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(TRUE); + getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(true); + getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(true); } } @@ -562,18 +562,18 @@ void LLPanelSettingsSkySunMoonTab::refresh() { if (!mSkySettings || !getCanChangeSettings()) { - getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(FALSE); - getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(FALSE); - getChildView(FIELD_SKY_SUN_BEACON)->setEnabled(TRUE); - getChildView(FIELD_SKY_MOON_BEACON)->setEnabled(TRUE); + getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(false); + getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(false); + getChildView(FIELD_SKY_SUN_BEACON)->setEnabled(true); + getChildView(FIELD_SKY_MOON_BEACON)->setEnabled(true); if (!mSkySettings) return; } else { - setEnabled(TRUE); - setAllChildrenEnabled(TRUE); + setEnabled(true); + setAllChildrenEnabled(true); } getChild(FIELD_SKY_SUN_MOON_COLOR)->set(mSkySettings->getSunlightColor() / SLIDER_SCALE_SUN_AMBIENT); @@ -780,7 +780,7 @@ LLPanelSettingsSkyDensityTab::LLPanelSettingsSkyDensityTab() { } -BOOL LLPanelSettingsSkyDensityTab::postBuild() +bool LLPanelSettingsSkyDensityTab::postBuild() { getChild(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onRayleighExponentialChanged(); }); getChild(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onRayleighExponentialScaleChanged(); }); @@ -803,10 +803,10 @@ BOOL LLPanelSettingsSkyDensityTab::postBuild() getChild(FIELD_SKY_DENSITY_ABSORPTION_MAX_ALTITUDE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAbsorptionMaxAltitudeChanged(); }); refresh(); - return TRUE; + return true; } -void LLPanelSettingsSkyDensityTab::setEnabled(BOOL enabled) +void LLPanelSettingsSkyDensityTab::setEnabled(bool enabled) { LLPanelSettingsSky::setEnabled(enabled); @@ -838,8 +838,8 @@ void LLPanelSettingsSkyDensityTab::refresh() { if (!mSkySettings) { - setAllChildrenEnabled(FALSE); - setEnabled(FALSE); + setAllChildrenEnabled(false); + setEnabled(false); return; } -- 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/llpaneleditsky.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpaneleditsky.cpp') diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index 5f5dda12c7..d387bbce43 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -367,7 +367,7 @@ bool LLPanelSettingsSkyCloudTab::postBuild() getChild(FIELD_SKY_CLOUD_SCROLL_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudScrollChanged(); }); getChild(FIELD_SKY_CLOUD_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudMapChanged(); }); getChild(FIELD_SKY_CLOUD_MAP)->setDefaultImageAssetID(LLSettingsSky::GetDefaultCloudNoiseTextureId()); - getChild(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE); + getChild(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(true); getChild(FIELD_SKY_CLOUD_DENSITY_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); }); getChild(FIELD_SKY_CLOUD_DENSITY_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); }); @@ -523,14 +523,14 @@ bool LLPanelSettingsSkySunMoonTab::postBuild() getChild(FIELD_SKY_SUN_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunScaleChanged(); }); getChild(FIELD_SKY_SUN_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetBlankSunTextureId()); getChild(FIELD_SKY_SUN_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetBlankSunTextureId()); - getChild(FIELD_SKY_SUN_IMAGE)->setAllowNoTexture(TRUE); + getChild(FIELD_SKY_SUN_IMAGE)->setAllowNoTexture(true); getChild(FIELD_SKY_MOON_ROTATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonRotationChanged(); }); getChild(FIELD_SKY_MOON_AZIMUTH)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonAzimElevChanged(); }); getChild(FIELD_SKY_MOON_ELEVATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonAzimElevChanged(); }); getChild(FIELD_SKY_MOON_IMAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonImageChanged(); }); getChild(FIELD_SKY_MOON_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetDefaultMoonTextureId()); getChild(FIELD_SKY_MOON_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetDefaultMoonTextureId()); - getChild(FIELD_SKY_MOON_IMAGE)->setAllowNoTexture(TRUE); + getChild(FIELD_SKY_MOON_IMAGE)->setAllowNoTexture(true); getChild(FIELD_SKY_MOON_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonScaleChanged(); }); getChild(FIELD_SKY_MOON_BRIGHTNESS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonBrightnessChanged(); }); -- cgit v1.2.3 From c95b4bf3ea2b681d6d05468b07e60fedb71fa2cf Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Mon, 10 Jun 2024 20:42:42 +0300 Subject: Post-merge - trim trailing whitespace --- indra/newview/llpaneleditsky.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview/llpaneleditsky.cpp') diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index d387bbce43..5255b3763c 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -39,7 +39,7 @@ #include "llviewercontrol.h" namespace -{ +{ // Atmosphere Tab const std::string FIELD_SKY_AMBIENT_LIGHT("ambient_light"); const std::string FIELD_SKY_BLUE_HORIZON("blue_horizon"); @@ -484,10 +484,10 @@ void LLPanelSettingsSkyCloudTab::onCloudMapChanged() void LLPanelSettingsSkyCloudTab::onCloudDensityChanged() { if (!mSkySettings) return; - LLColor3 density(getChild(FIELD_SKY_CLOUD_DENSITY_X)->getValue().asReal(), - getChild(FIELD_SKY_CLOUD_DENSITY_Y)->getValue().asReal(), + LLColor3 density(getChild(FIELD_SKY_CLOUD_DENSITY_X)->getValue().asReal(), + getChild(FIELD_SKY_CLOUD_DENSITY_Y)->getValue().asReal(), getChild(FIELD_SKY_CLOUD_DENSITY_D)->getValue().asReal()); - + mSkySettings->setCloudPosDensity1(density); setIsDirty(); } @@ -566,7 +566,7 @@ void LLPanelSettingsSkySunMoonTab::refresh() getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(false); getChildView(FIELD_SKY_SUN_BEACON)->setEnabled(true); getChildView(FIELD_SKY_MOON_BEACON)->setEnabled(true); - + if (!mSkySettings) return; } @@ -579,7 +579,7 @@ void LLPanelSettingsSkySunMoonTab::refresh() getChild(FIELD_SKY_SUN_MOON_COLOR)->set(mSkySettings->getSunlightColor() / SLIDER_SCALE_SUN_AMBIENT); LLColor3 glow(mSkySettings->getGlow()); - + // takes 40 - 0.2 range -> 0 - 1.99 UI range getChild(FIELD_SKY_GLOW_SIZE)->setValue(2.0 - (glow.mV[0] / SLIDER_SCALE_GLOW_R)); getChild(FIELD_SKY_GLOW_FOCUS)->setValue(glow.mV[2] / SLIDER_SCALE_GLOW_B); @@ -629,7 +629,7 @@ void LLPanelSettingsSkySunMoonTab::onGlowChanged() LLColor3 glow(getChild(FIELD_SKY_GLOW_SIZE)->getValue().asReal(), 0.0f, getChild(FIELD_SKY_GLOW_FOCUS)->getValue().asReal()); // takes 0 - 1.99 UI range -> 40 -> 0.2 range - glow.mV[0] = (2.0f - glow.mV[0]) * SLIDER_SCALE_GLOW_R; + glow.mV[0] = (2.0f - glow.mV[0]) * SLIDER_SCALE_GLOW_R; glow.mV[2] *= SLIDER_SCALE_GLOW_B; mSkySettings->setGlow(glow); @@ -775,9 +775,9 @@ void LLPanelSettingsSkySunMoonTab::onMoonBrightnessChanged() mSkySettings->update(); setIsDirty(); } - + LLPanelSettingsSkyDensityTab::LLPanelSettingsSkyDensityTab() -{ +{ } bool LLPanelSettingsSkyDensityTab::postBuild() -- cgit v1.2.3