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/llpanelvolume.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 595609b4de..e881d059d5 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -90,7 +90,7 @@ const F32 DEFAULT_GRAVITY_MULTIPLIER = 1.f; const F32 DEFAULT_DENSITY = 1000.f; // "Features" Tab -BOOL LLPanelVolume::postBuild() +bool LLPanelVolume::postBuild() { // Flexible Objects Parameters { @@ -213,7 +213,7 @@ BOOL LLPanelVolume::postBuild() // Start with everyone disabled clearCtrls(); - return TRUE; + return true; } LLPanelVolume::LLPanelVolume() -- 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/llpanelvolume.cpp | 104 ++++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index e881d059d5..5a3ef63edf 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -220,7 +220,7 @@ LLPanelVolume::LLPanelVolume() : LLPanel(), mComboMaterialItemCount(0) { - setMouseOpaque(FALSE); + setMouseOpaque(false); mCommitCallbackRegistrar.add("PanelVolume.menuDoToSelected", boost::bind(&LLPanelVolume::menuDoToSelected, this, _2)); mEnableCallbackRegistrar.add("PanelVolume.menuEnable", boost::bind(&LLPanelVolume::menuEnableItem, this, _2)); @@ -285,10 +285,10 @@ void LLPanelVolume::getState( ) LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); // BUG? Check for all objects being editable? - BOOL editable = root_objectp->permModify() && !root_objectp->isPermanentEnforced(); - BOOL single_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) + bool editable = root_objectp->permModify() && !root_objectp->isPermanentEnforced(); + bool single_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) && LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1; - BOOL single_root_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) && + bool single_root_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) && LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1; // Select Single Message @@ -306,26 +306,26 @@ void LLPanelVolume::getState( ) } // Light properties - BOOL is_light = volobjp && volobjp->getIsLight(); + bool is_light = volobjp && volobjp->getIsLight(); getChild("Light Checkbox Ctrl")->setValue(is_light); getChildView("Light Checkbox Ctrl")->setEnabled(editable && single_volume && volobjp); if (is_light && editable && single_volume) { - //mLabelColor ->setEnabled( TRUE ); + //mLabelColor ->setEnabled( true ); LLColorSwatchCtrl* LightColorSwatch = getChild("colorswatch"); if(LightColorSwatch) { - LightColorSwatch->setEnabled( TRUE ); - LightColorSwatch->setValid( TRUE ); + LightColorSwatch->setEnabled( true ); + LightColorSwatch->setValid( true ); LightColorSwatch->set(volobjp->getLightSRGBBaseColor()); } LLTextureCtrl* LightTextureCtrl = getChild("light texture control"); if (LightTextureCtrl) { - LightTextureCtrl->setEnabled(TRUE); - LightTextureCtrl->setValid(TRUE); + LightTextureCtrl->setEnabled(true); + LightTextureCtrl->setValid(true); LightTextureCtrl->setImageAssetID(volobjp->getLightTextureID()); } @@ -357,14 +357,14 @@ void LLPanelVolume::getState( ) LLColorSwatchCtrl* LightColorSwatch = getChild("colorswatch"); if(LightColorSwatch) { - LightColorSwatch->setEnabled( FALSE ); - LightColorSwatch->setValid( FALSE ); + LightColorSwatch->setEnabled( false ); + LightColorSwatch->setValid( false ); } LLTextureCtrl* LightTextureCtrl = getChild("light texture control"); if (LightTextureCtrl) { - LightTextureCtrl->setEnabled(FALSE); - LightTextureCtrl->setValid(FALSE); + LightTextureCtrl->setEnabled(false); + LightTextureCtrl->setValid(false); if (objectp->isAttachment()) { @@ -386,7 +386,7 @@ void LLPanelVolume::getState( ) } // Reflection Probe - BOOL is_probe = volobjp && volobjp->isReflectionProbe(); + bool is_probe = volobjp && volobjp->isReflectionProbe(); getChild("Reflection Probe")->setValue(is_probe); getChildView("Reflection Probe")->setEnabled(editable && single_volume && volobjp && !volobjp->isMesh()); @@ -423,9 +423,9 @@ void LLPanelVolume::getState( ) } // Animated Mesh - BOOL is_animated_mesh = single_root_volume && root_volobjp && root_volobjp->isAnimatedObject(); + bool is_animated_mesh = single_root_volume && root_volobjp && root_volobjp->isAnimatedObject(); getChild("Animated Mesh Checkbox Ctrl")->setValue(is_animated_mesh); - BOOL enabled_animated_object_box = FALSE; + bool enabled_animated_object_box = false; if (root_volobjp && root_volobjp == volobjp) { enabled_animated_object_box = single_root_volume && root_volobjp && root_volobjp->canBeAnimatedObject() && editable; @@ -473,7 +473,7 @@ void LLPanelVolume::getState( ) } // Flexible properties - BOOL is_flexible = volobjp && volobjp->isFlexible(); + bool is_flexible = volobjp && volobjp->isFlexible(); getChild("Flexible1D Checkbox Ctrl")->setValue(is_flexible); if (is_flexible || (volobjp && volobjp->canBeFlexible())) { @@ -551,7 +551,7 @@ void LLPanelVolume::getState( ) std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright"); if (editable && single_volume && material_same) { - mComboMaterial->setEnabled( TRUE ); + mComboMaterial->setEnabled( true ); if (material_code == LL_MCODE_LIGHT) { if (mComboMaterial->getItemCount() == mComboMaterialItemCount) @@ -572,7 +572,7 @@ void LLPanelVolume::getState( ) } else { - mComboMaterial->setEnabled( FALSE ); + mComboMaterial->setEnabled( false ); } // Physics properties @@ -593,7 +593,7 @@ void LLPanelVolume::getState( ) mComboPhysicsShapeType->removeall(); mComboPhysicsShapeType->add(getString("None"), LLSD(1)); - BOOL isMesh = FALSE; + bool isMesh = false; LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); if (sculpt_params) { @@ -634,7 +634,7 @@ void LLPanelVolume::getState( ) bool LLPanelVolume::precommitValidate( const LLSD& data ) { // TODO: Richard will fill this in later. - return TRUE; // FALSE means that validation failed and new value should not be commited. + return true; // false means that validation failed and new value should not be commited. } @@ -690,14 +690,14 @@ void LLPanelVolume::clearCtrls() LLColorSwatchCtrl* LightColorSwatch = getChild("colorswatch"); if(LightColorSwatch) { - LightColorSwatch->setEnabled( FALSE ); - LightColorSwatch->setValid( FALSE ); + LightColorSwatch->setEnabled( false ); + LightColorSwatch->setValid( false ); } LLTextureCtrl* LightTextureCtrl = getChild("light texture control"); if(LightTextureCtrl) { - LightTextureCtrl->setEnabled( FALSE ); - LightTextureCtrl->setValid( FALSE ); + LightTextureCtrl->setEnabled( false ); + LightTextureCtrl->setValid( false ); } getChildView("Light Intensity")->setEnabled(false); @@ -720,12 +720,12 @@ void LLPanelVolume::clearCtrls() getChildView("FlexForceY")->setEnabled(false); getChildView("FlexForceZ")->setEnabled(false); - mSpinPhysicsGravity->setEnabled(FALSE); - mSpinPhysicsFriction->setEnabled(FALSE); - mSpinPhysicsDensity->setEnabled(FALSE); - mSpinPhysicsRestitution->setEnabled(FALSE); + mSpinPhysicsGravity->setEnabled(false); + mSpinPhysicsFriction->setEnabled(false); + mSpinPhysicsDensity->setEnabled(false); + mSpinPhysicsRestitution->setEnabled(false); - mComboMaterial->setEnabled( FALSE ); + mComboMaterial->setEnabled( false ); } // @@ -741,7 +741,7 @@ void LLPanelVolume::sendIsLight() } LLVOVolume *volobjp = (LLVOVolume *)objectp; - BOOL value = getChild("Light Checkbox Ctrl")->getValue(); + bool value = getChild("Light Checkbox Ctrl")->getValue(); volobjp->setIsLight(value); LL_INFOS() << "update light sent" << LL_ENDL; } @@ -763,8 +763,8 @@ void LLPanelVolume::sendIsReflectionProbe() } LLVOVolume* volobjp = (LLVOVolume*)objectp; - BOOL value = getChild("Reflection Probe")->getValue(); - BOOL old_value = volobjp->isReflectionProbe(); + bool value = getChild("Reflection Probe")->getValue(); + bool old_value = volobjp->isReflectionProbe(); if (value && value != old_value) { // defer to notification util as to whether or not we *really* make this object a reflection probe @@ -783,7 +783,7 @@ void LLPanelVolume::sendIsReflectionProbe() if (in_linkeset) { // In linkset with a phantom flag - objectp->setFlags(FLAGS_PHANTOM, FALSE); + objectp->setFlags(FLAGS_PHANTOM, false); } } volobjp->setIsReflectionProbe(value); @@ -836,8 +836,8 @@ void LLPanelVolume::sendIsFlexible() } LLVOVolume *volobjp = (LLVOVolume *)objectp; - BOOL is_flexible = getChild("Flexible1D Checkbox Ctrl")->getValue(); - //BOOL is_flexible = mCheckFlexible1D->get(); + bool is_flexible = getChild("Flexible1D Checkbox Ctrl")->getValue(); + //bool is_flexible = mCheckFlexible1D->get(); if (is_flexible) { @@ -1055,10 +1055,10 @@ void LLPanelVolume::onPasteFeatures() bool is_root = objectp->isRoot(); // Not sure if phantom should go under physics, but doesn't fit elsewhere - BOOL is_phantom = clipboard["is_phantom"].asBoolean() && is_root; + bool is_phantom = clipboard["is_phantom"].asBoolean() && is_root; LLSelectMgr::getInstance()->selectionUpdatePhantom(is_phantom); - BOOL is_physical = clipboard["is_physical"].asBoolean() && is_root; + bool is_physical = clipboard["is_physical"].asBoolean() && is_root; LLSelectMgr::getInstance()->selectionUpdatePhysics(is_physical); if (clipboard.has("physics")) @@ -1073,7 +1073,7 @@ void LLPanelVolume::onPasteFeatures() objectp->setPhysicsFriction(clipboard["physics"]["friction"].asReal()); objectp->setPhysicsDensity(clipboard["physics"]["density"].asReal()); objectp->setPhysicsRestitution(clipboard["physics"]["restitution"].asReal()); - objectp->updateFlags(TRUE); + objectp->updateFlags(true); } // Flexible @@ -1081,7 +1081,7 @@ void LLPanelVolume::onPasteFeatures() if (is_flexible && volobjp->canBeFlexible()) { LLVOVolume *volobjp = (LLVOVolume *)objectp; - BOOL update_shape = FALSE; + bool update_shape = false; // do before setParameterEntry or it will think that it is already flexi update_shape = volobjp->setIsFlexible(is_flexible); @@ -1200,7 +1200,7 @@ void LLPanelVolume::onPasteLight() { if (clipboard.has("light")) { - volobjp->setIsLight(TRUE); + volobjp->setIsLight(true); volobjp->setLightIntensity((F32)clipboard["light"]["intensity"].asReal()); volobjp->setLightRadius((F32)clipboard["light"]["radius"].asReal()); volobjp->setLightFalloff((F32)clipboard["light"]["falloff"].asReal()); @@ -1211,7 +1211,7 @@ void LLPanelVolume::onPasteLight() } else { - volobjp->setIsLight(FALSE); + volobjp->setIsLight(false); } if (clipboard.has("spot")) @@ -1226,7 +1226,7 @@ void LLPanelVolume::onPasteLight() if (clipboard.has("reflection_probe")) { - volobjp->setIsReflectionProbe(TRUE); + volobjp->setIsReflectionProbe(true); volobjp->setReflectionProbeIsBox(clipboard["reflection_probe"]["is_box"].asBoolean()); volobjp->setReflectionProbeAmbiance((F32)clipboard["reflection_probe"]["ambiance"].asReal()); volobjp->setReflectionProbeNearClip((F32)clipboard["reflection_probe"]["near_clip"].asReal()); @@ -1241,7 +1241,7 @@ void LLPanelVolume::onPasteLight() if (in_linkeset) { // In linkset with a phantom flag - objectp->setFlags(FLAGS_PHANTOM, FALSE); + objectp->setFlags(FLAGS_PHANTOM, false); } } @@ -1377,9 +1377,9 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata ) else if (volobjp->isLightSpotlight()) { //no longer a spot light setLightTextureID(id, item_id, volobjp); - //self->getChildView("Light FOV")->setEnabled(FALSE); - //self->getChildView("Light Focus")->setEnabled(FALSE); - //self->getChildView("Light Ambiance")->setEnabled(FALSE); + //self->getChildView("Light FOV")->setEnabled(false); + //self->getChildView("Light Focus")->setEnabled(false); + //self->getChildView("Light Ambiance")->setEnabled(false); } } @@ -1422,7 +1422,7 @@ void LLPanelVolume::onCommitProbe(LLUICtrl* ctrl, void* userdata) path = LL_PCODE_PATH_CIRCLE; F32 scale = volobjp->getScale().mV[0]; - volobjp->setScale(LLVector3(scale, scale, scale), FALSE); + volobjp->setScale(LLVector3(scale, scale, scale), false); LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_ROTATION | UPD_POSITION | UPD_SCALE); } else @@ -1456,7 +1456,7 @@ void LLPanelVolume::setLightTextureID(const LLUUID &asset_id, const LLUUID &item if (item && volobjp->isAttachment()) { const LLPermissions& perm = item->getPermissions(); - BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; + bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false; if (!unrestricted) { // Attachments are in world and in inventory simultaneously, @@ -1526,7 +1526,7 @@ void LLPanelVolume::onCommitAnimatedMeshCheckbox(LLUICtrl *, void*) return; } LLVOVolume *volobjp = (LLVOVolume *)objectp; - BOOL animated_mesh = getChild("Animated Mesh Checkbox Ctrl")->getValue(); + bool animated_mesh = getChild("Animated Mesh Checkbox Ctrl")->getValue(); U32 flags = volobjp->getExtendedMeshFlags(); U32 new_flags = flags; if (animated_mesh) @@ -1585,6 +1585,6 @@ void LLPanelVolume::handleResponseChangeToFlexible(const LLSD &pNotification, co } else { - getChild("Flexible1D Checkbox Ctrl")->setValue(FALSE); + getChild("Flexible1D Checkbox Ctrl")->setValue(false); } } -- cgit v1.2.3