From 74c8b028d42a8c5b080bb861e427f38cedd4ad7c Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 15 Dec 2023 18:26:14 +0100 Subject: SL-20743 Use LLMutex in LLImageBase for internal data thread-safety --- indra/llappearance/llpolymorph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llappearance/llpolymorph.cpp') diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index 965b999bd4..223b2b7f1c 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -659,7 +659,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) //----------------------------------------------------------------------------- // applyMask() //----------------------------------------------------------------------------- -void LLPolyMorphTarget::applyMask(U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert) +void LLPolyMorphTarget::applyMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert) { LLVector4a *clothing_weights = getInfo()->mIsClothingMorph ? mMesh->getWritableClothingWeights() : NULL; @@ -780,7 +780,7 @@ LLPolyVertexMask::~LLPolyVertexMask() //----------------------------------------------------------------------------- // generateMask() //----------------------------------------------------------------------------- -void LLPolyVertexMask::generateMask(U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4a *clothing_weights) +void LLPolyVertexMask::generateMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4a *clothing_weights) { // RN debug output that uses Image Debugger (http://www.cs.unc.edu/~baxter/projects/imdebug/) // BOOL debugImg = FALSE; -- cgit v1.2.3 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/llpolymorph.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'indra/llappearance/llpolymorph.cpp') diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index 223b2b7f1c..c2f0289432 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -114,7 +114,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) if (numRead != 1) { LL_WARNS() << "Can't read number of morph target vertices" << LL_ENDL; - return FALSE; + return false; } //------------------------------------------------------------------------- @@ -151,14 +151,14 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) if (numRead != 1) { LL_WARNS() << "Can't read morph target vertex number" << LL_ENDL; - return FALSE; + return false; } if (mVertexIndices[v] > 10000) { // Bad install? These are usually .llm files from 'character' fodler LL_WARNS() << "Bad morph index " << v << ": " << mVertexIndices[v] << LL_ENDL; - return FALSE; + return false; } @@ -167,7 +167,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) if (numRead != 3) { LL_WARNS() << "Can't read morph target vertex coordinates" << LL_ENDL; - return FALSE; + return false; } F32 magnitude = mCoords[v].getLength3().getF32(); @@ -187,7 +187,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) if (numRead != 3) { LL_WARNS() << "Can't read morph target normal" << LL_ENDL; - return FALSE; + return false; } numRead = fread(&mBinormals[v], sizeof(F32), 3, fp); @@ -195,7 +195,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) if (numRead != 3) { LL_WARNS() << "Can't read morph target binormal" << LL_ENDL; - return FALSE; + return false; } @@ -204,7 +204,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) if (numRead != 2) { LL_WARNS() << "Can't read morph target uv" << LL_ENDL; - return FALSE; + return false; } mNumIndices++; @@ -213,7 +213,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) mAvgDistortion.mul(1.f/(F32)mNumIndices); mAvgDistortion.normalize3fast(); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -265,14 +265,14 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) llassert( node->hasName( "param" ) && node->getChildByName( "param_morph" ) ); if (!LLViewerVisualParamInfo::parseXml(node)) - return FALSE; + return false; // Get mixed-case name static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if( !node->getFastAttributeString( name_string, mMorphName ) ) { LL_WARNS() << "Avatar file: is missing name attribute" << LL_ENDL; - return FALSE; // Continue, ignoring this tag + return false; // Continue, ignoring this tag } static LLStdStringHandle clothing_morph_string = LLXmlTree::addAttributeString("clothing_morph"); @@ -284,7 +284,7 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) { LL_WARNS() << "Failed to getChildByName(\"param_morph\")" << LL_ENDL; - return FALSE; + return false; } for (LLXmlTreeNode* child_node = paramNode->getFirstChild(); @@ -310,7 +310,7 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) } } - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -357,7 +357,7 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) { llassert(mInfo == NULL); if (info->mID < 0) - return FALSE; + return false; mInfo = info; mID = info->mID; setWeight(getDefaultWeight()); @@ -394,9 +394,9 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) if (!mMorphData) { LL_WARNS() << "No morph target named " << morph_param_name << " found in mesh." << LL_ENDL; - return FALSE; // Continue, ignoring this tag + return false; // Continue, ignoring this tag } - return TRUE; + return true; } /*virtual*/ LLViewerVisualParam* LLPolyMorphTarget::cloneParam(LLWearable* wearable) const @@ -416,9 +416,9 @@ BOOL LLPolyMorphTarget::parseData(LLXmlTreeNode* node) if (!setInfo(info)) { delete info; - return FALSE; + return false; } - return TRUE; + return true; } #endif -- 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/llpolymorph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llappearance/llpolymorph.cpp') diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index c2f0289432..697beb239e 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -260,7 +260,7 @@ LLPolyMorphTargetInfo::LLPolyMorphTargetInfo() { } -BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) +bool LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) { llassert( node->hasName( "param" ) && node->getChildByName( "param_morph" ) ); -- cgit v1.2.3 From 1839def9dc6064a865f6cd05d1509358a53ac9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Sun, 11 Feb 2024 16:50:22 +0100 Subject: even more misc: BOOL (int) to real bool --- indra/llappearance/llpolymorph.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llappearance/llpolymorph.cpp') diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index 697beb239e..73811a550c 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -104,7 +104,7 @@ LLPolyMorphData::~LLPolyMorphData() //----------------------------------------------------------------------------- // loadBinary() //----------------------------------------------------------------------------- -BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) +bool LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) { S32 numVertices; S32 numRead; @@ -353,7 +353,7 @@ LLPolyMorphTarget::~LLPolyMorphTarget() //----------------------------------------------------------------------------- // setInfo() //----------------------------------------------------------------------------- -BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) +bool LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) { llassert(mInfo == NULL); if (info->mID < 0) @@ -408,7 +408,7 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) //----------------------------------------------------------------------------- // parseData() //----------------------------------------------------------------------------- -BOOL LLPolyMorphTarget::parseData(LLXmlTreeNode* node) +bool LLPolyMorphTarget::parseData(LLXmlTreeNode* node) { LLPolyMorphTargetInfo* info = new LLPolyMorphTargetInfo; -- 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/llpolymorph.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/llappearance/llpolymorph.cpp') diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index 73811a550c..4b94ed48b1 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -256,7 +256,7 @@ void LLPolyMorphData::freeData() // LLPolyMorphTargetInfo() //----------------------------------------------------------------------------- LLPolyMorphTargetInfo::LLPolyMorphTargetInfo() - : mIsClothingMorph(FALSE) + : mIsClothingMorph(false) { } @@ -659,7 +659,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) //----------------------------------------------------------------------------- // applyMask() //----------------------------------------------------------------------------- -void LLPolyMorphTarget::applyMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert) +void LLPolyMorphTarget::applyMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, bool invert) { LLVector4a *clothing_weights = getInfo()->mIsClothingMorph ? mMesh->getWritableClothingWeights() : NULL; @@ -749,7 +749,7 @@ void LLPolyMorphTarget::applyVolumeChanges(F32 delta_weight) LLPolyVertexMask::LLPolyVertexMask(LLPolyMorphData* morph_data) : mWeights(new F32[morph_data->mNumIndices]), mMorphData(morph_data), - mWeightsGenerated(FALSE) + mWeightsGenerated(false) { llassert(mMorphData != NULL); llassert(mMorphData->mNumIndices > 0); @@ -780,10 +780,10 @@ LLPolyVertexMask::~LLPolyVertexMask() //----------------------------------------------------------------------------- // generateMask() //----------------------------------------------------------------------------- -void LLPolyVertexMask::generateMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4a *clothing_weights) +void LLPolyVertexMask::generateMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, bool invert, LLVector4a *clothing_weights) { // RN debug output that uses Image Debugger (http://www.cs.unc.edu/~baxter/projects/imdebug/) -// BOOL debugImg = FALSE; +// bool debugImg = false; // if (debugImg) // { // if (invert) @@ -827,7 +827,7 @@ void LLPolyVertexMask::generateMask(const U8 *maskTextureData, S32 width, S32 he clothing_weights[vertIndex].getF32ptr()[VW] = mWeights[index]; } } - mWeightsGenerated = TRUE; + mWeightsGenerated = true; } //----------------------------------------------------------------------------- -- cgit v1.2.3