From c3e6f7b1643076df35a6960f735024078ddbb353 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 19 Feb 2024 21:33:38 +0100 Subject: Convert remaining cases of BOOL to bool in llmath and llprimitive Changed the return values for LLPrimitive::packTEMessage methods from FALSE to true - these seemed to be strange and wrong, especially considering the following statement in LLVOAvatarSelf: bool success = packTEMessage(mesgsys); --- indra/newview/llviewerobject.cpp | 4 ++-- indra/newview/llviewerobject.h | 2 +- indra/newview/llvovolume.cpp | 14 +++++++------- indra/newview/llvovolume.h | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 1b7c668b7d..c56da0722b 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4663,9 +4663,9 @@ void LLViewerObject::setMediaPassedWhitelist(BOOL passed) } } -BOOL LLViewerObject::setMaterial(const U8 material) +bool LLViewerObject::setMaterial(const U8 material) { - BOOL res = LLPrimitive::setMaterial(material); + bool res = LLPrimitive::setMaterial(material); if (res) { setChanged(TEXTURE); diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 81413f3976..65328a6e6d 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -370,7 +370,7 @@ public: // void refreshMaterials(); - /*virtual*/ BOOL setMaterial(const U8 material); + /*virtual*/ bool setMaterial(const U8 material); virtual void setTEImage(const U8 te, LLViewerTexture *imagep); // Not derived from LLPrimitive virtual void changeTEImage(S32 index, LLViewerTexture* new_image) ; virtual void changeTENormalMap(S32 index, LLViewerTexture* new_image) ; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a91da62f80..2e0a2c4d54 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -917,9 +917,9 @@ BOOL LLVOVolume::isActive() const return !mStatic; } -BOOL LLVOVolume::setMaterial(const U8 material) +bool LLVOVolume::setMaterial(const U8 material) { - BOOL res = LLViewerObject::setMaterial(material); + bool res = LLViewerObject::setMaterial(material); return res; } @@ -1004,7 +1004,7 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline) return mDrawable; } -BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bool unique_volume) +bool LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bool unique_volume) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; LLVolumeParams volume_params = params_in; @@ -1012,7 +1012,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo S32 last_lod = mVolumep.notNull() ? LLVolumeLODGroup::getVolumeDetailFromScale(mVolumep->getDetail()) : -1; S32 lod = mLOD; - BOOL is404 = FALSE; + bool is404 = false; if (isSculpted()) { @@ -1024,7 +1024,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo lod = gMeshRepo.getActualMeshLOD(volume_params, lod); if (lod == -1) { - is404 = TRUE; + is404 = true; lod = 0; } } @@ -1128,14 +1128,14 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo } } - return TRUE; + return true; } else if (NO_LOD == lod) { LLSculptIDSize::instance().resetSizeSum(volume_params.getSculptID()); } - return FALSE; + return false; } void LLVOVolume::updateSculptTexture() diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index b8ccc26cad..6c5814932b 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -223,11 +223,11 @@ public: /*virtual*/ S32 setTEScaleT(const U8 te, const F32 t) override; /*virtual*/ S32 setTETexGen(const U8 te, const U8 texgen) override; /*virtual*/ S32 setTEMediaTexGen(const U8 te, const U8 media) override; - /*virtual*/ BOOL setMaterial(const U8 material) override; + /*virtual*/ bool setMaterial(const U8 material) override; void setTexture(const S32 face); S32 getIndexInTex(U32 ch) const {return mIndexInTex[ch];} - /*virtual*/ BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false) override; + /*virtual*/ bool setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false) override; void updateSculptTexture(); void setIndexInTex(U32 ch, S32 index) { mIndexInTex[ch] = index ;} void sculpt(); -- cgit v1.2.3