From 70f8dc7a4f4be217fea5439e474fc75e567c23c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Sat, 10 Feb 2024 22:37:52 +0100 Subject: miscellaneous: BOOL (int) to real bool --- indra/llappearance/llviewervisualparam.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/llappearance/llviewervisualparam.cpp') diff --git a/indra/llappearance/llviewervisualparam.cpp b/indra/llappearance/llviewervisualparam.cpp index fb0d12f0af..07786e3c0c 100644 --- a/indra/llappearance/llviewervisualparam.cpp +++ b/indra/llappearance/llviewervisualparam.cpp @@ -62,7 +62,7 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) llassert( node->hasName( "param" ) ); if (!LLVisualParamInfo::parseXml(node)) - return FALSE; + return false; // VIEWER SPECIFIC PARAMS @@ -107,7 +107,7 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) params_loaded++; - return TRUE; + return true; } /*virtual*/ void LLViewerVisualParamInfo::toStream(std::ostream &out) @@ -150,11 +150,11 @@ BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info) { llassert(mInfo == NULL); if (info->mID < 0) - return FALSE; + return false; mInfo = info; mID = info->mID; setWeight(getDefaultWeight()); - return TRUE; + return true; } /* @@ -166,14 +166,14 @@ BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info) //----------------------------------------------------------------------------- // parseData() //----------------------------------------------------------------------------- -BOOL LLViewerVisualParam::parseData(LLXmlTreeNode *node) +bool LLViewerVisualParam::parseData(LLXmlTreeNode *node) { LLViewerVisualParamInfo* info = new LLViewerVisualParamInfo; info->parseXml(node); if (!setInfo(info)) - return FALSE; + return false; - return TRUE; + return true; } */ -- cgit v1.2.3 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/llappearance/llviewervisualparam.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llappearance/llviewervisualparam.cpp') diff --git a/indra/llappearance/llviewervisualparam.cpp b/indra/llappearance/llviewervisualparam.cpp index 07786e3c0c..43fb8fab5e 100644 --- a/indra/llappearance/llviewervisualparam.cpp +++ b/indra/llappearance/llviewervisualparam.cpp @@ -57,7 +57,7 @@ LLViewerVisualParamInfo::~LLViewerVisualParamInfo() //----------------------------------------------------------------------------- // parseXml() //----------------------------------------------------------------------------- -BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) +bool LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) { llassert( node->hasName( "param" ) ); -- cgit v1.2.3 From 9e854b697a06abed2a0917fb6120445f176764f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Fri, 16 Feb 2024 19:29:51 +0100 Subject: misc: BOOL to bool --- indra/llappearance/llviewervisualparam.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llappearance/llviewervisualparam.cpp') diff --git a/indra/llappearance/llviewervisualparam.cpp b/indra/llappearance/llviewervisualparam.cpp index 43fb8fab5e..30a244be93 100644 --- a/indra/llappearance/llviewervisualparam.cpp +++ b/indra/llappearance/llviewervisualparam.cpp @@ -39,12 +39,12 @@ LLViewerVisualParamInfo::LLViewerVisualParamInfo() : mWearableType( LLWearableType::WT_INVALID ), - mCrossWearable(FALSE), + mCrossWearable(false), mCamDist( 0.5f ), mCamAngle( 0.f ), mCamElevation( 0.f ), mEditGroupDisplayOrder( 0 ), - mShowSimple(FALSE), + mShowSimple(false), mSimpleMin(0.f), mSimpleMax(100.f) { @@ -82,7 +82,7 @@ bool LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) static LLStdStringHandle cross_wearable_string = LLXmlTree::addAttributeString("cross_wearable"); if (!node->getFastAttributeBOOL(cross_wearable_string, mCrossWearable)) { - mCrossWearable = FALSE; + mCrossWearable = false; } // Optional camera offsets from the current joint center. Used for generating "hints" (thumbnails). @@ -146,7 +146,7 @@ LLViewerVisualParam::~LLViewerVisualParam() // setInfo() //----------------------------------------------------------------------------- -BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info) +bool LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info) { llassert(mInfo == NULL); if (info->mID < 0) -- cgit v1.2.3 From e2e37cced861b98de8c1a7c9c0d3a50d2d90e433 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 22 May 2024 21:25:21 +0200 Subject: Fix line endlings --- indra/llappearance/llviewervisualparam.cpp | 358 ++++++++++++++--------------- 1 file changed, 179 insertions(+), 179 deletions(-) (limited to 'indra/llappearance/llviewervisualparam.cpp') diff --git a/indra/llappearance/llviewervisualparam.cpp b/indra/llappearance/llviewervisualparam.cpp index 1b4916cce9..00d6383ad0 100644 --- a/indra/llappearance/llviewervisualparam.cpp +++ b/indra/llappearance/llviewervisualparam.cpp @@ -1,179 +1,179 @@ -/** - * @file llviewervisualparam.cpp - * @brief Implementation of LLViewerVisualParam class - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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$ - */ - -//----------------------------------------------------------------------------- -// Header Files -//----------------------------------------------------------------------------- -#include "linden_common.h" - -#include "llviewervisualparam.h" -#include "llxmltree.h" -#include "llwearable.h" - -//----------------------------------------------------------------------------- -// LLViewerVisualParamInfo() -//----------------------------------------------------------------------------- -LLViewerVisualParamInfo::LLViewerVisualParamInfo() - : - mWearableType( LLWearableType::WT_INVALID ), - mCrossWearable(false), - mCamDist( 0.5f ), - mCamAngle( 0.f ), - mCamElevation( 0.f ), - mEditGroupDisplayOrder( 0 ), - mShowSimple(false), - mSimpleMin(0.f), - mSimpleMax(100.f) -{ -} - -LLViewerVisualParamInfo::~LLViewerVisualParamInfo() -{ -} - -//----------------------------------------------------------------------------- -// parseXml() -//----------------------------------------------------------------------------- -bool LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) -{ - llassert( node->hasName( "param" ) ); - - if (!LLVisualParamInfo::parseXml(node)) - return false; - - // VIEWER SPECIFIC PARAMS - - std::string wearable; - static LLStdStringHandle wearable_string = LLXmlTree::addAttributeString("wearable"); - if( node->getFastAttributeString( wearable_string, wearable) ) - { - mWearableType = LLWearableType::getInstance()->typeNameToType( wearable ); - } - - static LLStdStringHandle edit_group_string = LLXmlTree::addAttributeString("edit_group"); - if (!node->getFastAttributeString( edit_group_string, mEditGroup)) - { - mEditGroup = ""; - } - - static LLStdStringHandle cross_wearable_string = LLXmlTree::addAttributeString("cross_wearable"); - if (!node->getFastAttributeBOOL(cross_wearable_string, mCrossWearable)) - { - mCrossWearable = false; - } - - // Optional camera offsets from the current joint center. Used for generating "hints" (thumbnails). - static LLStdStringHandle camera_distance_string = LLXmlTree::addAttributeString("camera_distance"); - node->getFastAttributeF32( camera_distance_string, mCamDist ); - static LLStdStringHandle camera_angle_string = LLXmlTree::addAttributeString("camera_angle"); - node->getFastAttributeF32( camera_angle_string, mCamAngle ); // in degrees - static LLStdStringHandle camera_elevation_string = LLXmlTree::addAttributeString("camera_elevation"); - node->getFastAttributeF32( camera_elevation_string, mCamElevation ); - - mCamAngle += 180; - - static S32 params_loaded = 0; - - // By default, parameters are displayed in the order in which they appear in the xml file. - // "edit_group_order" overriddes. - static LLStdStringHandle edit_group_order_string = LLXmlTree::addAttributeString("edit_group_order"); - if( !node->getFastAttributeF32( edit_group_order_string, mEditGroupDisplayOrder ) ) - { - mEditGroupDisplayOrder = (F32)params_loaded; - } - - params_loaded++; - - return true; -} - -/*virtual*/ void LLViewerVisualParamInfo::toStream(std::ostream &out) -{ - LLVisualParamInfo::toStream(out); - - out << mWearableType << "\t"; - out << mEditGroup << "\t"; - out << mEditGroupDisplayOrder << "\t"; -} - -//----------------------------------------------------------------------------- -// LLViewerVisualParam() -//----------------------------------------------------------------------------- -LLViewerVisualParam::LLViewerVisualParam() - : LLVisualParam() -{ -} - -//----------------------------------------------------------------------------- -// LLViewerVisualParam() -//----------------------------------------------------------------------------- -LLViewerVisualParam::LLViewerVisualParam(const LLViewerVisualParam& pOther) - : LLVisualParam(pOther) -{ -} - -//----------------------------------------------------------------------------- -// ~LLViewerVisualParam() -//----------------------------------------------------------------------------- -LLViewerVisualParam::~LLViewerVisualParam() -{ -} - -//----------------------------------------------------------------------------- -// setInfo() -//----------------------------------------------------------------------------- - -bool LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info) -{ - llassert(mInfo == NULL); - if (info->mID < 0) - return false; - mInfo = info; - mID = info->mID; - setWeight(getDefaultWeight()); - return true; -} - -/* -//============================================================================= -// These virtual functions should always be overridden, -// but are included here for use as templates -//============================================================================= - -//----------------------------------------------------------------------------- -// parseData() -//----------------------------------------------------------------------------- -bool LLViewerVisualParam::parseData(LLXmlTreeNode *node) -{ - LLViewerVisualParamInfo* info = new LLViewerVisualParamInfo; - - info->parseXml(node); - if (!setInfo(info)) - return false; - - return true; -} -*/ +/** + * @file llviewervisualparam.cpp + * @brief Implementation of LLViewerVisualParam class + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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$ + */ + +//----------------------------------------------------------------------------- +// Header Files +//----------------------------------------------------------------------------- +#include "linden_common.h" + +#include "llviewervisualparam.h" +#include "llxmltree.h" +#include "llwearable.h" + +//----------------------------------------------------------------------------- +// LLViewerVisualParamInfo() +//----------------------------------------------------------------------------- +LLViewerVisualParamInfo::LLViewerVisualParamInfo() + : + mWearableType( LLWearableType::WT_INVALID ), + mCrossWearable(false), + mCamDist( 0.5f ), + mCamAngle( 0.f ), + mCamElevation( 0.f ), + mEditGroupDisplayOrder( 0 ), + mShowSimple(false), + mSimpleMin(0.f), + mSimpleMax(100.f) +{ +} + +LLViewerVisualParamInfo::~LLViewerVisualParamInfo() +{ +} + +//----------------------------------------------------------------------------- +// parseXml() +//----------------------------------------------------------------------------- +bool LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) +{ + llassert( node->hasName( "param" ) ); + + if (!LLVisualParamInfo::parseXml(node)) + return false; + + // VIEWER SPECIFIC PARAMS + + std::string wearable; + static LLStdStringHandle wearable_string = LLXmlTree::addAttributeString("wearable"); + if( node->getFastAttributeString( wearable_string, wearable) ) + { + mWearableType = LLWearableType::getInstance()->typeNameToType( wearable ); + } + + static LLStdStringHandle edit_group_string = LLXmlTree::addAttributeString("edit_group"); + if (!node->getFastAttributeString( edit_group_string, mEditGroup)) + { + mEditGroup = ""; + } + + static LLStdStringHandle cross_wearable_string = LLXmlTree::addAttributeString("cross_wearable"); + if (!node->getFastAttributeBOOL(cross_wearable_string, mCrossWearable)) + { + mCrossWearable = false; + } + + // Optional camera offsets from the current joint center. Used for generating "hints" (thumbnails). + static LLStdStringHandle camera_distance_string = LLXmlTree::addAttributeString("camera_distance"); + node->getFastAttributeF32( camera_distance_string, mCamDist ); + static LLStdStringHandle camera_angle_string = LLXmlTree::addAttributeString("camera_angle"); + node->getFastAttributeF32( camera_angle_string, mCamAngle ); // in degrees + static LLStdStringHandle camera_elevation_string = LLXmlTree::addAttributeString("camera_elevation"); + node->getFastAttributeF32( camera_elevation_string, mCamElevation ); + + mCamAngle += 180; + + static S32 params_loaded = 0; + + // By default, parameters are displayed in the order in which they appear in the xml file. + // "edit_group_order" overriddes. + static LLStdStringHandle edit_group_order_string = LLXmlTree::addAttributeString("edit_group_order"); + if( !node->getFastAttributeF32( edit_group_order_string, mEditGroupDisplayOrder ) ) + { + mEditGroupDisplayOrder = (F32)params_loaded; + } + + params_loaded++; + + return true; +} + +/*virtual*/ void LLViewerVisualParamInfo::toStream(std::ostream &out) +{ + LLVisualParamInfo::toStream(out); + + out << mWearableType << "\t"; + out << mEditGroup << "\t"; + out << mEditGroupDisplayOrder << "\t"; +} + +//----------------------------------------------------------------------------- +// LLViewerVisualParam() +//----------------------------------------------------------------------------- +LLViewerVisualParam::LLViewerVisualParam() + : LLVisualParam() +{ +} + +//----------------------------------------------------------------------------- +// LLViewerVisualParam() +//----------------------------------------------------------------------------- +LLViewerVisualParam::LLViewerVisualParam(const LLViewerVisualParam& pOther) + : LLVisualParam(pOther) +{ +} + +//----------------------------------------------------------------------------- +// ~LLViewerVisualParam() +//----------------------------------------------------------------------------- +LLViewerVisualParam::~LLViewerVisualParam() +{ +} + +//----------------------------------------------------------------------------- +// setInfo() +//----------------------------------------------------------------------------- + +bool LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info) +{ + llassert(mInfo == NULL); + if (info->mID < 0) + return false; + mInfo = info; + mID = info->mID; + setWeight(getDefaultWeight()); + return true; +} + +/* +//============================================================================= +// These virtual functions should always be overridden, +// but are included here for use as templates +//============================================================================= + +//----------------------------------------------------------------------------- +// parseData() +//----------------------------------------------------------------------------- +bool LLViewerVisualParam::parseData(LLXmlTreeNode *node) +{ + LLViewerVisualParamInfo* info = new LLViewerVisualParamInfo; + + info->parseXml(node); + if (!setInfo(info)) + return false; + + return true; +} +*/ -- cgit v1.2.3