diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 9adff997b0..d0cf76cfb2 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -78,7 +78,7 @@ class LLAvatarBoneInfo
friend class LLAvatarAppearance;
friend class LLAvatarSkeletonInfo;
public:
- LLAvatarBoneInfo() : mIsJoint(FALSE) {}
+ LLAvatarBoneInfo() : mIsJoint(false) {}
~LLAvatarBoneInfo()
{
std::for_each(mChildren.begin(), mChildren.end(), DeletePointer());
@@ -178,7 +178,7 @@ LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary* LLAvatarAppearance::sAv
LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) :
LLCharacter(),
- mIsDummy(FALSE),
+ mIsDummy(false),
mTexSkinColor( NULL ),
mTexHairColor( NULL ),
mTexEyeColor( NULL ),
@@ -189,7 +189,7 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) :
mNumBones(0),
mNumCollisionVolumes(0),
mCollisionVolumes(NULL),
- mIsBuilt(FALSE),
+ mIsBuilt(false),
mInitFlags(0)
{
llassert_always(mWearableData);
@@ -236,14 +236,14 @@ void LLAvatarAppearance::initInstance()
mesh->setName(mesh_name);
mesh->setMeshID(mesh_index);
mesh->setPickName(mesh_dict->mPickName);
- mesh->setIsTransparent(FALSE);
+ mesh->setIsTransparent(false);
switch((S32)mesh_index)
{
case MESH_ID_HAIR:
- mesh->setIsTransparent(TRUE);
+ mesh->setIsTransparent(true);
break;
case MESH_ID_SKIRT:
- mesh->setIsTransparent(TRUE);
+ mesh->setIsTransparent(true);
break;
case MESH_ID_EYEBALL_LEFT:
case MESH_ID_EYEBALL_RIGHT:
@@ -347,7 +347,7 @@ void LLAvatarAppearance::initClass(const std::string& avatar_file_name_arg, cons
avatar_file_name = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,AVATAR_DEFAULT_CHAR + "_lad.xml");
}
LLXmlTree xml_tree;
- bool success = xml_tree.parseFile( avatar_file_name, FALSE );
+ bool success = xml_tree.parseFile( avatar_file_name, false );
if (!success)
{
LL_ERRS() << "Problem reading avatar configuration file:" << avatar_file_name << LL_ENDL;
@@ -593,7 +593,7 @@ bool LLAvatarAppearance::parseSkeletonFile(const std::string& filename, LLXmlTre
//-------------------------------------------------------------------------
// parse the file
//-------------------------------------------------------------------------
- bool parsesuccess = skeleton_xml_tree.parseFile( filename, FALSE );
+ bool parsesuccess = skeleton_xml_tree.parseFile( filename, false );
if (!parsesuccess)
{
@@ -818,7 +818,7 @@ void LLAvatarAppearance::buildCharacter()
//-------------------------------------------------------------------------
mRoot->removeAllChildren();
mJointMap.clear();
- mIsBuilt = FALSE;
+ mIsBuilt = false;
//-------------------------------------------------------------------------
// clear mesh data
@@ -839,7 +839,7 @@ void LLAvatarAppearance::buildCharacter()
bool status = loadAvatar();
stop_glerror();
-// gPrintMessagesThisFrame = TRUE;
+// gPrintMessagesThisFrame = true;
LL_DEBUGS() << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL;
if (!status)
@@ -909,7 +909,7 @@ void LLAvatarAppearance::buildCharacter()
// SL-315
mPelvisp->setPosition( LLVector3(0.0f, 0.0f, 0.0f) );
- mIsBuilt = TRUE;
+ mIsBuilt = true;
stop_glerror();
}
@@ -1055,7 +1055,7 @@ bool LLAvatarAppearance::loadSkeletonNode ()
// make meshes children before calling parent version of the function
for (LLAvatarJoint* joint : mMeshLOD)
{
- joint->mUpdateXform = FALSE;
+ joint->mUpdateXform = false;
joint->setMeshesToChildren();
}
@@ -1118,7 +1118,7 @@ bool LLAvatarAppearance::loadMeshNodes()
LLAvatarJointMesh* mesh = NULL;
U8 mesh_id = 0;
- bool found_mesh_id = FALSE;
+ bool found_mesh_id = false;
/* if (type == "hairMesh")
switch(lod)
@@ -1131,7 +1131,7 @@ bool LLAvatarAppearance::loadMeshNodes()
if (type.compare(mesh_dict->mName) == 0)
{
mesh_id = mesh_index;
- found_mesh_id = TRUE;
+ found_mesh_id = true;
break;
}
}
@@ -1271,12 +1271,12 @@ bool LLAvatarAppearance::loadLayersets()
LLTexLayerInterface* layer = layer_set->findLayerByName(morph->mLayer);
if (layer)
{
- layer->setHasMorph(TRUE);
+ layer->setHasMorph(true);
}
else
{
LL_WARNS() << "Could not find layer named " << morph->mLayer << " to set morph flag" << LL_ENDL;
- success = FALSE;
+ success = false;
}
}
}
@@ -1484,7 +1484,7 @@ bool LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name )
// [Legacy Bake]
//void LLAvatarAppearance::setClothesColor( ETextureIndex te, const LLColor4& new_color)
-void LLAvatarAppearance::setClothesColor( ETextureIndex te, const LLColor4& new_color, BOOL upload_bake)
+void LLAvatarAppearance::setClothesColor( ETextureIndex te, const LLColor4& new_color, bool upload_bake)
// [Legacy Bake]
{
U32 param_name[3];
@@ -1586,7 +1586,7 @@ bool LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
{
if (node->hasName("bone"))
{
- mIsJoint = TRUE;
+ mIsJoint = true;
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!node->getFastAttributeString(name_string, mName))
{
@@ -1599,7 +1599,7 @@ bool LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
}
else if (node->hasName("collision_volume"))
{
- mIsJoint = FALSE;
+ mIsJoint = false;
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!node->getFastAttributeString(name_string, mName))
{
@@ -1832,13 +1832,13 @@ bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
static LLStdStringHandle position_string = LLXmlTree::addAttributeString("position");
if (child->getFastAttributeVector3(position_string, info->mPosition))
{
- info->mHasPosition = TRUE;
+ info->mHasPosition = true;
}
static LLStdStringHandle rotation_string = LLXmlTree::addAttributeString("rotation");
if (child->getFastAttributeVector3(rotation_string, info->mRotationEuler))
{
- info->mHasRotation = TRUE;
+ info->mHasRotation = true;
}
static LLStdStringHandle group_string = LLXmlTree::addAttributeString("group");
if (child->getFastAttributeS32(group_string, info->mGroup))
@@ -1948,7 +1948,7 @@ bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
delete info;
return false;
}
- BOOL shared = false;
+ bool shared = false;
static LLStdStringHandle shared_string = LLXmlTree::addAttributeString("shared");
child->getFastAttributeBOOL(shared_string, shared);
@@ -2129,7 +2129,7 @@ bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
}
//virtual
-LLAvatarAppearance::LLMaskedMorph::LLMaskedMorph(LLVisualParam *morph_target, BOOL invert, std::string layer) :
+LLAvatarAppearance::LLMaskedMorph::LLMaskedMorph(LLVisualParam *morph_target, bool invert, std::string layer) :
mMorphTarget(morph_target),
mInvert(invert),
mLayer(layer)
diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h
index 75fd5a9c20..d9b0c57881 100644
--- a/indra/llappearance/llavatarappearance.h
+++ b/indra/llappearance/llavatarappearance.h
@@ -115,7 +115,7 @@ public:
bool isBuilt() const { return mIsBuilt; }
// [Legacy Bake]
- virtual BOOL isUsingServerBakes() const = 0;
+ virtual bool isUsingServerBakes() const = 0;
/** State
** **
@@ -259,7 +259,7 @@ public:
public:
// [Legacy Bake]
//virtual void invalidateComposite(LLTexLayerSet* layerset) = 0;
- virtual void invalidateComposite(LLTexLayerSet* layerset, BOOL upload_result) = 0;
+ virtual void invalidateComposite(LLTexLayerSet* layerset, bool upload_result) = 0;
/********************************************************************************
** **
@@ -296,7 +296,7 @@ protected:
public:
// [Legacy Bake]
//void setClothesColor(LLAvatarAppearanceDefines::ETextureIndex te, const LLColor4& new_color);
- void setClothesColor(LLAvatarAppearanceDefines::ETextureIndex te, const LLColor4& new_color, BOOL upload_bake);
+ void setClothesColor(LLAvatarAppearanceDefines::ETextureIndex te, const LLColor4& new_color, bool upload_bake);
// [Legacy Bake]
LLColor4 getClothesColor(LLAvatarAppearanceDefines::ETextureIndex te);
static bool teToColorParams(LLAvatarAppearanceDefines::ETextureIndex te, U32 *param_name);
@@ -308,7 +308,7 @@ public:
LLColor4 getGlobalColor(const std::string& color_name ) const;
// [Legacy Bake]
//virtual void onGlobalColorChanged(const LLTexGlobalColor* global_color) = 0;
- virtual void onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake) = 0;
+ virtual void onGlobalColorChanged(const LLTexGlobalColor* global_color, bool upload_bake) = 0;
// [Legacy Bake]
protected:
LLTexGlobalColor* mTexSkinColor;
@@ -404,7 +404,7 @@ protected:
struct LLAvatarMeshInfo
{
- typedef std::pair morph_info_pair_t; // LLPolyMorphTargetInfo stored here
+ typedef std::pair morph_info_pair_t; // LLPolyMorphTargetInfo stored here
typedef std::vector morph_info_list_t;
LLAvatarMeshInfo() : mLOD(0), mMinPixelArea(.1f) {}
@@ -433,8 +433,8 @@ protected:
struct LLAvatarAttachmentInfo
{
LLAvatarAttachmentInfo()
- : mGroup(-1), mAttachmentID(-1), mPieMenuSlice(-1), mVisibleFirstPerson(FALSE),
- mIsHUDAttachment(FALSE), mHasPosition(FALSE), mHasRotation(FALSE) {}
+ : mGroup(-1), mAttachmentID(-1), mPieMenuSlice(-1), mVisibleFirstPerson(false),
+ mIsHUDAttachment(false), mHasPosition(false), mHasRotation(false) {}
std::string mName;
std::string mJointName;
LLVector3 mPosition;
@@ -442,8 +442,8 @@ protected:
S32 mGroup;
S32 mAttachmentID;
S32 mPieMenuSlice;
- BOOL mVisibleFirstPerson;
- BOOL mIsHUDAttachment;
+ bool mVisibleFirstPerson;
+ bool mIsHUDAttachment;
bool mHasPosition;
bool mHasRotation;
};
@@ -463,11 +463,11 @@ protected:
struct LLAvatarMorphInfo
{
LLAvatarMorphInfo()
- : mInvert(FALSE) {}
+ : mInvert(false) {}
std::string mName;
std::string mRegion;
std::string mLayer;
- BOOL mInvert;
+ bool mInvert;
};
typedef std::vector morph_info_list_t;
@@ -478,7 +478,7 @@ protected:
class LLMaskedMorph
{
public:
- LLMaskedMorph(LLVisualParam *morph_target, BOOL invert, std::string layer);
+ LLMaskedMorph(LLVisualParam *morph_target, bool invert, std::string layer);
LLVisualParam *mMorphTarget;
bool mInvert;
diff --git a/indra/llappearance/llavatarappearancedefines.cpp b/indra/llappearance/llavatarappearancedefines.cpp
index 77ce670825..81c7cfa21c 100644
--- a/indra/llappearance/llavatarappearancedefines.cpp
+++ b/indra/llappearance/llavatarappearancedefines.cpp
@@ -39,56 +39,56 @@ using namespace LLAvatarAppearanceDefines;
LLAvatarAppearanceDictionary::Textures::Textures()
{
- addEntry(TEX_HEAD_BODYPAINT, new TextureEntry("head_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
- addEntry(TEX_UPPER_SHIRT, new TextureEntry("upper_shirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", LLWearableType::WT_SHIRT));
- addEntry(TEX_LOWER_PANTS, new TextureEntry("lower_pants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", LLWearableType::WT_PANTS));
- addEntry(TEX_EYES_IRIS, new TextureEntry("eyes_iris", TRUE, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", LLWearableType::WT_EYES));
- addEntry(TEX_HAIR, new TextureEntry("hair_grain", TRUE, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", LLWearableType::WT_HAIR));
- addEntry(TEX_UPPER_BODYPAINT, new TextureEntry("upper_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
- addEntry(TEX_LOWER_BODYPAINT, new TextureEntry("lower_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
- addEntry(TEX_LOWER_SHOES, new TextureEntry("lower_shoes", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", LLWearableType::WT_SHOES));
- addEntry(TEX_LOWER_SOCKS, new TextureEntry("lower_socks", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", LLWearableType::WT_SOCKS));
- addEntry(TEX_UPPER_JACKET, new TextureEntry("upper_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET));
- addEntry(TEX_LOWER_JACKET, new TextureEntry("lower_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET));
- addEntry(TEX_UPPER_GLOVES, new TextureEntry("upper_gloves", TRUE, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", LLWearableType::WT_GLOVES));
- addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERSHIRT));
- addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERPANTS));
- addEntry(TEX_SKIRT, new TextureEntry("skirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", LLWearableType::WT_SKIRT));
+ addEntry(TEX_HEAD_BODYPAINT, new TextureEntry("head_bodypaint", true, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
+ addEntry(TEX_UPPER_SHIRT, new TextureEntry("upper_shirt", true, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", LLWearableType::WT_SHIRT));
+ addEntry(TEX_LOWER_PANTS, new TextureEntry("lower_pants", true, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", LLWearableType::WT_PANTS));
+ addEntry(TEX_EYES_IRIS, new TextureEntry("eyes_iris", true, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", LLWearableType::WT_EYES));
+ addEntry(TEX_HAIR, new TextureEntry("hair_grain", true, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", LLWearableType::WT_HAIR));
+ addEntry(TEX_UPPER_BODYPAINT, new TextureEntry("upper_bodypaint", true, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
+ addEntry(TEX_LOWER_BODYPAINT, new TextureEntry("lower_bodypaint", true, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
+ addEntry(TEX_LOWER_SHOES, new TextureEntry("lower_shoes", true, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", LLWearableType::WT_SHOES));
+ addEntry(TEX_LOWER_SOCKS, new TextureEntry("lower_socks", true, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", LLWearableType::WT_SOCKS));
+ addEntry(TEX_UPPER_JACKET, new TextureEntry("upper_jacket", true, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET));
+ addEntry(TEX_LOWER_JACKET, new TextureEntry("lower_jacket", true, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET));
+ addEntry(TEX_UPPER_GLOVES, new TextureEntry("upper_gloves", true, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", LLWearableType::WT_GLOVES));
+ addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", true, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERSHIRT));
+ addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", true, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERPANTS));
+ addEntry(TEX_SKIRT, new TextureEntry("skirt", true, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", LLWearableType::WT_SKIRT));
- addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
- addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
- addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
- addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
- addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
+ addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
+ addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
+ addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
+ addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
+ addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
- addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
- addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
- addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
+ addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
+ addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
+ addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
- addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new TextureEntry("head_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new TextureEntry("upper_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new TextureEntry("lower_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_SKIRT_TATTOO, new TextureEntry("skirt_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_HAIR_TATTOO, new TextureEntry("hair_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_EYES_TATTOO, new TextureEntry("eyes_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_LEFT_ARM_TATTOO, new TextureEntry("leftarm_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_LEFT_LEG_TATTOO, new TextureEntry("leftleg_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_AUX1_TATTOO, new TextureEntry("aux1_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_AUX2_TATTOO, new TextureEntry("aux2_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_AUX3_TATTOO, new TextureEntry("aux3_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new TextureEntry("head_universal_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new TextureEntry("upper_universal_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new TextureEntry("lower_universal_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_SKIRT_TATTOO, new TextureEntry("skirt_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_HAIR_TATTOO, new TextureEntry("hair_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_EYES_TATTOO, new TextureEntry("eyes_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_LEFT_ARM_TATTOO, new TextureEntry("leftarm_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_LEFT_LEG_TATTOO, new TextureEntry("leftleg_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_AUX1_TATTOO, new TextureEntry("aux1_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_AUX2_TATTOO, new TextureEntry("aux2_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_AUX3_TATTOO, new TextureEntry("aux3_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", FALSE, BAKED_HEAD, "head"));
- addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", FALSE, BAKED_UPPER, "upper"));
- addEntry(TEX_LOWER_BAKED, new TextureEntry("lower-baked", FALSE, BAKED_LOWER, "lower"));
- addEntry(TEX_EYES_BAKED, new TextureEntry("eyes-baked", FALSE, BAKED_EYES, "eyes"));
- addEntry(TEX_HAIR_BAKED, new TextureEntry("hair-baked", FALSE, BAKED_HAIR, "hair"));
- addEntry(TEX_SKIRT_BAKED, new TextureEntry("skirt-baked", FALSE, BAKED_SKIRT, "skirt"));
- addEntry(TEX_LEFT_ARM_BAKED, new TextureEntry("leftarm-baked", FALSE, BAKED_LEFT_ARM, "leftarm"));
- addEntry(TEX_LEFT_LEG_BAKED, new TextureEntry("leftleg-baked", FALSE, BAKED_LEFT_LEG, "leftleg"));
- addEntry(TEX_AUX1_BAKED, new TextureEntry("aux1-baked", FALSE, BAKED_AUX1, "aux1"));
- addEntry(TEX_AUX2_BAKED, new TextureEntry("aux2-baked", FALSE, BAKED_AUX2, "aux2"));
- addEntry(TEX_AUX3_BAKED, new TextureEntry("aux3-baked", FALSE, BAKED_AUX3, "aux3"));
+ addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", false, BAKED_HEAD, "head"));
+ addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", false, BAKED_UPPER, "upper"));
+ addEntry(TEX_LOWER_BAKED, new TextureEntry("lower-baked", false, BAKED_LOWER, "lower"));
+ addEntry(TEX_EYES_BAKED, new TextureEntry("eyes-baked", false, BAKED_EYES, "eyes"));
+ addEntry(TEX_HAIR_BAKED, new TextureEntry("hair-baked", false, BAKED_HAIR, "hair"));
+ addEntry(TEX_SKIRT_BAKED, new TextureEntry("skirt-baked", false, BAKED_SKIRT, "skirt"));
+ addEntry(TEX_LEFT_ARM_BAKED, new TextureEntry("leftarm-baked", false, BAKED_LEFT_ARM, "leftarm"));
+ addEntry(TEX_LEFT_LEG_BAKED, new TextureEntry("leftleg-baked", false, BAKED_LEFT_LEG, "leftleg"));
+ addEntry(TEX_AUX1_BAKED, new TextureEntry("aux1-baked", false, BAKED_AUX1, "aux1"));
+ addEntry(TEX_AUX2_BAKED, new TextureEntry("aux2-baked", false, BAKED_AUX2, "aux2"));
+ addEntry(TEX_AUX3_BAKED, new TextureEntry("aux3-baked", false, BAKED_AUX3, "aux3"));
}
LLAvatarAppearanceDictionary::BakedTextures::BakedTextures()
diff --git a/indra/llappearance/llavatarappearancedefines.h b/indra/llappearance/llavatarappearancedefines.h
index b90c6664cc..0bba3ddfcc 100644
--- a/indra/llappearance/llavatarappearancedefines.h
+++ b/indra/llappearance/llavatarappearancedefines.h
@@ -40,7 +40,7 @@ namespace LLAvatarAppearanceDefines
extern const S32 SCRATCH_TEX_WIDTH;
extern const S32 SCRATCH_TEX_HEIGHT;
-static const U32 AVATAR_HOVER = 11001;
+static constexpr U32 AVATAR_HOVER = 11001;
//--------------------------------------------------------------------
// Enums
@@ -167,10 +167,10 @@ public:
const std::string mDefaultImageName;
const LLWearableType::EType mWearableType;
// It's either a local texture xor baked
- BOOL mIsLocalTexture;
- BOOL mIsBakedTexture;
+ bool mIsLocalTexture;
+ bool mIsBakedTexture;
// If it's a local texture, it may be used by a baked texture
- BOOL mIsUsedByBakedTexture;
+ bool mIsUsedByBakedTexture;
EBakedTextureIndex mBakedTextureIndex;
};
diff --git a/indra/llappearance/llavatarjoint.cpp b/indra/llappearance/llavatarjoint.cpp
index e7bd831b49..579381958c 100644
--- a/indra/llappearance/llavatarjoint.cpp
+++ b/indra/llappearance/llavatarjoint.cpp
@@ -40,7 +40,7 @@ const F32 DEFAULT_AVATAR_JOINT_LOD = 0.0f;
//-----------------------------------------------------------------------------
// Static Data
//-----------------------------------------------------------------------------
-BOOL LLAvatarJoint::sDisableLOD = FALSE;
+bool LLAvatarJoint::sDisableLOD = false;
//-----------------------------------------------------------------------------
// LLAvatarJoint()
@@ -66,13 +66,13 @@ LLAvatarJoint::LLAvatarJoint(const std::string &name, LLJoint *parent) :
void LLAvatarJoint::init()
{
- mValid = FALSE;
+ mValid = false;
mComponents = SC_JOINT | SC_BONE | SC_AXES;
mMinPixelArea = DEFAULT_AVATAR_JOINT_LOD;
mPickName = PN_DEFAULT;
- mVisible = TRUE;
+ mVisible = true;
mMeshID = 0;
- mIsTransparent = FALSE;
+ mIsTransparent = false;
}
@@ -88,7 +88,7 @@ LLAvatarJoint::~LLAvatarJoint()
//--------------------------------------------------------------------
// setValid()
//--------------------------------------------------------------------
-void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
+void LLAvatarJoint::setValid( bool valid, bool recursive )
{
//----------------------------------------------------------------
// set visibility for this joint
@@ -103,7 +103,7 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
for (LLJoint* child : mChildren)
{
LLAvatarJoint* joint = static_cast(child);
- joint->setValid(valid, TRUE);
+ joint->setValid(valid, true);
}
}
@@ -112,7 +112,7 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
//--------------------------------------------------------------------
// setSkeletonComponents()
//--------------------------------------------------------------------
-void LLAvatarJoint::setSkeletonComponents( U32 comp, BOOL recursive )
+void LLAvatarJoint::setSkeletonComponents( U32 comp, bool recursive )
{
mComponents = comp;
if (recursive)
@@ -125,7 +125,7 @@ void LLAvatarJoint::setSkeletonComponents( U32 comp, BOOL recursive )
}
}
-void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive)
+void LLAvatarJoint::setVisible(bool visible, bool recursive)
{
mVisible = visible;
@@ -148,7 +148,7 @@ void LLAvatarJoint::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pix
}
}
-void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update)
+void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind, bool terse_update)
{
for (LLJoint* child : mChildren)
{
@@ -180,18 +180,18 @@ bool LLAvatarJoint::updateLOD(F32 pixel_area, bool activate)
if (found_lod || jointLOD == DEFAULT_AVATAR_JOINT_LOD)
{
// we've already found a joint to enable, so enable the rest as alternatives
- lod_changed |= joint->updateLOD(pixel_area, TRUE);
+ lod_changed |= joint->updateLOD(pixel_area, true);
}
else
{
if (pixel_area >= jointLOD || sDisableLOD)
{
- lod_changed |= joint->updateLOD(pixel_area, TRUE);
+ lod_changed |= joint->updateLOD(pixel_area, true);
found_lod = true;
}
else
{
- lod_changed |= joint->updateLOD(pixel_area, FALSE);
+ lod_changed |= joint->updateLOD(pixel_area, false);
}
}
}
@@ -222,11 +222,11 @@ void LLAvatarJoint::setMeshesToChildren()
LLAvatarJointCollisionVolume::LLAvatarJointCollisionVolume()
{
- mUpdateXform = FALSE;
+ mUpdateXform = false;
}
/*virtual*/
-U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
+U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, bool first_pass, bool is_dummy )
{
LL_ERRS() << "Cannot call render() on LLAvatarJointCollisionVolume" << LL_ENDL;
return 0;
@@ -234,7 +234,7 @@ U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, BOOL first_pass, BOOL i
LLVector3 LLAvatarJointCollisionVolume::getVolumePos(LLVector3 &offset)
{
- mUpdateXform = TRUE;
+ mUpdateXform = true;
LLVector3 result = offset;
result.scaleVec(getScale());
diff --git a/indra/llappearance/llavatarjoint.h b/indra/llappearance/llavatarjoint.h
index 052852fa3d..09269bbc3f 100644
--- a/indra/llappearance/llavatarjoint.h
+++ b/indra/llappearance/llavatarjoint.h
@@ -52,14 +52,14 @@ public:
virtual ~LLAvatarJoint();
// Gets the validity of this joint
- BOOL getValid() { return mValid; }
+ bool getValid() { return mValid; }
// Sets the validity of this joint
- virtual void setValid( BOOL valid, BOOL recursive=FALSE );
+ virtual void setValid( bool valid, bool recursive=false );
// Returns true if this object is transparent.
// This is used to determine in which order to draw objects.
- virtual BOOL isTransparent() { return mIsTransparent; }
+ virtual bool isTransparent() { return mIsTransparent; }
// Returns true if this object should inherit scale modifiers from its immediate parent
virtual bool inheritScale() { return false; }
@@ -72,7 +72,7 @@ public:
};
// Selects which skeleton components to draw
- void setSkeletonComponents( U32 comp, BOOL recursive = TRUE );
+ void setSkeletonComponents( U32 comp, bool recursive = true );
// Returns which skeleton components are enables for drawing
U32 getSkeletonComponents() { return mComponents; }
@@ -90,34 +90,34 @@ public:
void setPickName(LLJointPickName name) { mPickName = name; }
LLJointPickName getPickName() { return mPickName; }
- void setVisible( BOOL visible, BOOL recursive );
+ void setVisible( bool visible, bool recursive );
// Takes meshes in mMeshParts and sets each one as a child joint
void setMeshesToChildren();
// LLViewerJoint interface
- virtual U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ) = 0;
+ virtual U32 render( F32 pixelArea, bool first_pass = true, bool is_dummy = false ) = 0;
virtual void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area);
- virtual void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE, bool terse_update = false);
+ virtual void updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind = false, bool terse_update = false);
virtual bool updateLOD(F32 pixel_area, bool activate);
virtual void updateJointGeometry();
virtual void dump();
public:
- static BOOL sDisableLOD;
+ static bool sDisableLOD;
avatar_joint_mesh_list_t mMeshParts; //LLViewerJointMesh*
void setMeshID( S32 id ) {mMeshID = id;}
protected:
void init();
- BOOL mValid;
- BOOL mIsTransparent;
+ bool mValid;
+ bool mIsTransparent;
U32 mComponents;
F32 mMinPixelArea;
LLJointPickName mPickName;
- BOOL mVisible;
+ bool mVisible;
S32 mMeshID;
};
@@ -128,7 +128,7 @@ public:
virtual ~LLAvatarJointCollisionVolume() {};
/*virtual*/ bool inheritScale() { return true; }
- /*virtual*/ U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE );
+ /*virtual*/ U32 render( F32 pixelArea, bool first_pass = true, bool is_dummy = false );
void renderCollision();
diff --git a/indra/llappearance/llavatarjointmesh.cpp b/indra/llappearance/llavatarjointmesh.cpp
index f34e23a966..9b2a1d9b4c 100644
--- a/indra/llappearance/llavatarjointmesh.cpp
+++ b/indra/llappearance/llavatarjointmesh.cpp
@@ -247,7 +247,7 @@ void LLAvatarJointMesh::setTexture( LLGLTexture *texture )
{
mLayerSet = NULL;
//texture->bindTexture(0);
- //texture->setClamp(TRUE, TRUE);
+ //texture->setClamp(true, true);
}
}
diff --git a/indra/llappearance/llavatarjointmesh.h b/indra/llappearance/llavatarjointmesh.h
index a3f6a61218..0d815643e9 100644
--- a/indra/llappearance/llavatarjointmesh.h
+++ b/indra/llappearance/llavatarjointmesh.h
@@ -69,7 +69,7 @@ protected:
LLTexLayerSet* mLayerSet; // ptr to a layer set owned by the avatar
U32 mTestImageName; // handle to a temporary texture for previewing uploads
LLPolyMesh* mMesh; // ptr to a global polymesh
- BOOL mCullBackFaces; // true by default
+ bool mCullBackFaces; // true by default
LLFace* mFace; // ptr to a face w/ AGP copy of mesh
U32 mFaceIndexCount;
@@ -122,16 +122,13 @@ public:
// Sets up joint matrix data for rendering
void setupJoint(LLAvatarJoint* current_joint);
- // Render time method to upload batches of joint matrices
- void uploadJointMatrices();
-
// Sets ID for picking
void setMeshID( S32 id ) {mMeshID = id;}
// Gets ID for picking
S32 getMeshID() { return mMeshID; }
- void setIsTransparent(BOOL is_transparent) { mIsTransparent = is_transparent; }
+ void setIsTransparent(bool is_transparent) { mIsTransparent = is_transparent; }
private:
// Allocate skin data
diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp
index 2322810293..b67dd675a3 100644
--- a/indra/llappearance/lldriverparam.cpp
+++ b/indra/llappearance/lldriverparam.cpp
@@ -198,7 +198,7 @@ bool LLDriverParam::setInfo(LLDriverParamInfo *info)
// [Legacy Bake]
//setWeight(getDefaultWeight());
- setWeight(getDefaultWeight(), FALSE );
+ setWeight(getDefaultWeight(), false );
return true;
}
@@ -211,7 +211,7 @@ bool LLDriverParam::setInfo(LLDriverParamInfo *info)
// [Legacy Bake]
//void LLDriverParam::setWeight(F32 weight)
-void LLDriverParam::setWeight(F32 weight, BOOL upload_bake)
+void LLDriverParam::setWeight(F32 weight, bool upload_bake)
// [Legacy Bake]
{
F32 min_weight = getMinWeight();
@@ -454,7 +454,7 @@ const LLViewerVisualParam* LLDriverParam::getDrivenParam(S32 index) const
//void LLDriverParam::setAnimationTarget( F32 target_value)
//{
// LLVisualParam::setAnimationTarget(target_value);
-void LLDriverParam::setAnimationTarget( F32 target_value, BOOL upload_bake )
+void LLDriverParam::setAnimationTarget( F32 target_value, bool upload_bake )
{
LLVisualParam::setAnimationTarget(target_value, upload_bake);
// [Legacy Bake]
@@ -480,21 +480,21 @@ void LLDriverParam::setAnimationTarget( F32 target_value, BOOL upload_bake )
//void LLDriverParam::stopAnimating()
//{
// LLVisualParam::stopAnimating();
-void LLDriverParam::stopAnimating(BOOL upload_bake)
+void LLDriverParam::stopAnimating(bool upload_bake)
{
LLVisualParam::stopAnimating(upload_bake);
// [Legacy Bake]
for(LLDrivenEntry& driven : mDriven)
{
- driven.mParam->setAnimating(FALSE);
+ driven.mParam->setAnimating(false);
}
}
/*virtual*/
bool LLDriverParam::linkDrivenParams(visual_param_mapper mapper, bool only_cross_params)
{
- BOOL success = true;
+ bool success = true;
for (LLDrivenEntryInfo& driven_info : getInfo()->mDrivenInfoList)
{
S32 driven_id = driven_info.mDrivenID;
diff --git a/indra/llappearance/lldriverparam.h b/indra/llappearance/lldriverparam.h
index a11baba6a5..c6220b626c 100644
--- a/indra/llappearance/lldriverparam.h
+++ b/indra/llappearance/lldriverparam.h
@@ -105,9 +105,9 @@ public:
///*virtual*/ void setWeight(F32 weight);
///*virtual*/ void setAnimationTarget(F32 target_value);
///*virtual*/ void stopAnimating();
- /*virtual*/ void setWeight(F32 weight, BOOL upload_bake);
- /*virtual*/ void setAnimationTarget(F32 target_value, BOOL upload_bake);
- /*virtual*/ void stopAnimating(BOOL upload_bake);
+ /*virtual*/ void setWeight(F32 weight, bool upload_bake);
+ /*virtual*/ void setAnimationTarget(F32 target_value, bool upload_bake);
+ /*virtual*/ void stopAnimating(bool upload_bake);
// [Legacy Bake]
/*virtual*/ bool linkDrivenParams(visual_param_mapper mapper, bool only_cross_params);
/*virtual*/ void resetDrivenParams();
diff --git a/indra/llappearance/lllocaltextureobject.cpp b/indra/llappearance/lllocaltextureobject.cpp
index ff82e4e8e3..84c0fd8380 100644
--- a/indra/llappearance/lllocaltextureobject.cpp
+++ b/indra/llappearance/lllocaltextureobject.cpp
@@ -36,14 +36,14 @@
LLLocalTextureObject::LLLocalTextureObject() :
- mIsBakedReady(FALSE),
+ mIsBakedReady(false),
mDiscard(MAX_DISCARD_LEVEL+1)
{
mImage = NULL;
}
LLLocalTextureObject::LLLocalTextureObject(LLGLTexture* image, const LLUUID& id) :
- mIsBakedReady(FALSE),
+ mIsBakedReady(false),
mDiscard(MAX_DISCARD_LEVEL+1)
{
mImage = image;
@@ -206,7 +206,7 @@ void LLLocalTextureObject::setDiscard(S32 new_discard)
mDiscard = new_discard;
}
-void LLLocalTextureObject::setBakedReady(BOOL ready)
+void LLLocalTextureObject::setBakedReady(bool ready)
{
mIsBakedReady = ready;
}
diff --git a/indra/llappearance/lllocaltextureobject.h b/indra/llappearance/lllocaltextureobject.h
index 5ca503baf4..a5118ffde3 100644
--- a/indra/llappearance/lllocaltextureobject.h
+++ b/indra/llappearance/lllocaltextureobject.h
@@ -63,7 +63,7 @@ public:
void setID(LLUUID new_id);
void setDiscard(S32 new_discard);
- void setBakedReady(BOOL ready);
+ void setBakedReady(bool ready);
protected:
@@ -78,7 +78,7 @@ private:
LLUUID mID;
- BOOL mIsBakedReady;
+ bool mIsBakedReady;
S32 mDiscard;
};
diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp
index 6c04efed52..378beb76f0 100644
--- a/indra/llappearance/llpolymesh.cpp
+++ b/indra/llappearance/llpolymesh.cpp
@@ -72,8 +72,8 @@ LLPolyMeshSharedData::LLPolyMeshSharedData()
mTexCoords = NULL;
mDetailTexCoords = NULL;
mWeights = NULL;
- mHasWeights = FALSE;
- mHasDetailTexCoords = FALSE;
+ mHasWeights = false;
+ mHasDetailTexCoords = false;
mNumFaces = 0;
mFaces = NULL;
@@ -615,7 +615,7 @@ bool LLPolyMeshSharedData::loadMesh( const std::string& fileName )
std::string morph_name(morphName);
LLPolyMorphData* morph_data = new LLPolyMorphData(morph_name);
- BOOL result = morph_data->loadBinary(fp, this);
+ bool result = morph_data->loadBinary(fp, this);
if (!result)
{
@@ -705,12 +705,12 @@ bool LLPolyMeshSharedData::loadMesh( const std::string& fileName )
}
}
- status = TRUE;
+ status = true;
}
else
{
LL_ERRS() << "invalid mesh file header: " << fileName << LL_ENDL;
- status = FALSE;
+ status = false;
}
if (0 == mNumJointNames)
diff --git a/indra/llappearance/llpolymesh.h b/indra/llappearance/llpolymesh.h
index 040868ea2a..e0822bf0e7 100644
--- a/indra/llappearance/llpolymesh.h
+++ b/indra/llappearance/llpolymesh.h
@@ -79,8 +79,8 @@ private:
LLVector2 *mDetailTexCoords;
F32 *mWeights;
- BOOL mHasWeights;
- BOOL mHasDetailTexCoords;
+ bool mHasWeights;
+ bool mHasDetailTexCoords;
// face data
S32 mNumFaces;
@@ -138,7 +138,7 @@ public:
const S32 *getSharedVert(S32 vert);
- BOOL isLOD() { return (mReferenceData != NULL); }
+ bool isLOD() { return (mReferenceData != NULL); }
};
@@ -204,13 +204,13 @@ public:
}
// Returns whether or not the mesh has detail texture coords
- BOOL hasDetailTexCoords() {
+ bool hasDetailTexCoords() {
llassert (mSharedData);
return mSharedData->mHasDetailTexCoords;
}
// Returns whether or not the mesh has vertex weights
- BOOL hasWeights() const{
+ bool hasWeights() const{
llassert (mSharedData);
return mSharedData->mHasWeights;
}
@@ -316,7 +316,7 @@ public:
// Get indices
U32* getIndices() { return mSharedData ? mSharedData->mTriangleIndices : NULL; }
- BOOL isLOD() { return mSharedData && mSharedData->isLOD(); }
+ bool isLOD() { return mSharedData && mSharedData->isLOD(); }
void setAvatar(LLAvatarAppearance* avatarp) { mAvatarp = avatarp; }
LLAvatarAppearance* getAvatar() { return mAvatarp; }
diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp
index f0e51ae017..efcbd77bb1 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)
{
}
@@ -362,7 +362,7 @@ bool LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
mID = info->mID;
// [Legacy Bake]
//setWeight(getDefaultWeight());
- setWeight(getDefaultWeight(), FALSE);
+ setWeight(getDefaultWeight(), false);
LLAvatarAppearance* avatarp = mMesh->getAvatar();
for (LLPolyVolumeMorphInfo& volume_info : getInfo()->mVolumeInfoList)
@@ -661,7 +661,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;
@@ -751,7 +751,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);
@@ -782,10 +782,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)
@@ -829,7 +829,7 @@ void LLPolyVertexMask::generateMask(const U8 *maskTextureData, S32 width, S32 he
clothing_weights[vertIndex].getF32ptr()[VW] = mWeights[index];
}
}
- mWeightsGenerated = TRUE;
+ mWeightsGenerated = true;
}
//-----------------------------------------------------------------------------
diff --git a/indra/llappearance/llpolymorph.h b/indra/llappearance/llpolymorph.h
index f52e9dce8d..a932433819 100644
--- a/indra/llappearance/llpolymorph.h
+++ b/indra/llappearance/llpolymorph.h
@@ -84,14 +84,14 @@ public:
LLPolyVertexMask(const LLPolyVertexMask& pOther);
~LLPolyVertexMask();
- void generateMask(const U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4a *clothing_weights);
+ void generateMask(const U8 *maskData, S32 width, S32 height, S32 num_components, bool invert, LLVector4a *clothing_weights);
F32* getMorphMaskWeights();
protected:
F32* mWeights;
LLPolyMorphData *mMorphData;
- BOOL mWeightsGenerated;
+ bool mWeightsGenerated;
};
@@ -133,7 +133,7 @@ public:
protected:
std::string mMorphName;
- BOOL mIsClothingMorph;
+ bool mIsClothingMorph;
typedef std::vector volume_info_list_t;
volume_info_list_t mVolumeInfoList;
};
@@ -159,7 +159,7 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
// LLVisualParam Virtual functions
- ///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
+ ///*virtual*/ bool parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex sex );
// LLViewerVisualParam Virtual functions
@@ -170,7 +170,7 @@ public:
/*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh);
/*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh);
- void applyMask(const U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert);
+ void applyMask(const U8 *maskData, S32 width, S32 height, S32 num_components, bool invert);
void addPendingMorphMask() { mNumMorphMasksPending++; }
void applyVolumeChanges(F32 delta_weight); // SL-315 - for resetSkeleton()
@@ -183,7 +183,7 @@ protected:
LLPolyVertexMask * mVertMask;
ESex mLastSex;
// number of morph masks that haven't been generated, must be 0 before this morph is applied
- BOOL mNumMorphMasksPending;
+ S32 mNumMorphMasksPending;
typedef std::vector volume_list_t;
volume_list_t mVolumeMorphs;
diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp
index e0abef8c9d..382b182e68 100644
--- a/indra/llappearance/llpolyskeletaldistortion.cpp
+++ b/indra/llappearance/llpolyskeletaldistortion.cpp
@@ -68,7 +68,7 @@ bool LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
std::string name;
LLVector3 scale;
LLVector3 pos;
- BOOL haspos = false;
+ bool haspos = false;
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!bone->getFastAttributeString(name_string, name))
@@ -143,7 +143,7 @@ bool LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
mID = info->mID;
// [Legacy Bake]
//setWeight(getDefaultWeight());
- setWeight(getDefaultWeight(), FALSE);
+ setWeight(getDefaultWeight(), false);
for (LLPolySkeletalBoneInfo& bone_info : getInfo()->mBoneInfoList)
{
diff --git a/indra/llappearance/llpolyskeletaldistortion.h b/indra/llappearance/llpolyskeletaldistortion.h
index 74de9344ff..92707fa0cf 100644
--- a/indra/llappearance/llpolyskeletaldistortion.h
+++ b/indra/llappearance/llpolyskeletaldistortion.h
@@ -51,7 +51,7 @@ class LLAvatarAppearance;
//-----------------------------------------------------------------------------
struct LLPolySkeletalBoneInfo
{
- LLPolySkeletalBoneInfo(std::string &name, LLVector3 &scale, LLVector3 &pos, BOOL haspos)
+ LLPolySkeletalBoneInfo(std::string &name, LLVector3 &scale, LLVector3 &pos, bool haspos)
: mBoneName(name),
mScaleDeformation(scale),
mPositionDeformation(pos),
@@ -59,7 +59,7 @@ struct LLPolySkeletalBoneInfo
std::string mBoneName;
LLVector3 mScaleDeformation;
LLVector3 mPositionDeformation;
- BOOL mHasPositionDeformation;
+ bool mHasPositionDeformation;
};
class alignas(16) LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo
@@ -97,7 +97,7 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
// LLVisualParam Virtual functions
- ///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
+ ///*virtual*/ bool parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex sex );
// LLViewerVisualParam Virtual functions
diff --git a/indra/llappearance/lltexglobalcolor.cpp b/indra/llappearance/lltexglobalcolor.cpp
index f65a76d654..fd6fa3feeb 100644
--- a/indra/llappearance/lltexglobalcolor.cpp
+++ b/indra/llappearance/lltexglobalcolor.cpp
@@ -58,7 +58,7 @@ bool LLTexGlobalColor::setInfo(LLTexGlobalColorInfo *info)
for (LLTexLayerParamColorInfo* color_info : mInfo->mParamColorInfoList)
{
LLTexParamGlobalColor* param_color = new LLTexParamGlobalColor(this);
- if (!param_color->setInfo(color_info, TRUE))
+ if (!param_color->setInfo(color_info, true))
{
mInfo = NULL;
return false;
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index 4086755e2a..45e4da8c8a 100644
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -60,16 +60,16 @@ public:
~LLTexLayerInfo();
bool parseXml(LLXmlTreeNode* node);
- BOOL createVisualParams(LLAvatarAppearance *appearance);
- BOOL isUserSettable() { return mLocalTexture != -1; }
+ bool createVisualParams(LLAvatarAppearance *appearance);
+ bool isUserSettable() { return mLocalTexture != -1; }
S32 getLocalTexture() const { return mLocalTexture; }
- BOOL getOnlyAlpha() const { return mUseLocalTextureAlphaOnly; }
+ bool getOnlyAlpha() const { return mUseLocalTextureAlphaOnly; }
std::string getName() const { return mName; }
private:
std::string mName;
- BOOL mWriteAllChannels; // Don't use masking. Just write RGBA into buffer,
+ bool mWriteAllChannels; // Don't use masking. Just write RGBA into buffer,
LLTexLayerInterface::ERenderPass mRenderPass;
std::string mGlobalColor;
@@ -77,11 +77,11 @@ private:
S32 mLocalTexture;
std::string mStaticImageFileName;
- BOOL mStaticImageIsMask;
- BOOL mUseLocalTextureAlphaOnly; // Ignore RGB channels from the input texture. Use alpha as a mask
- BOOL mIsVisibilityMask;
+ bool mStaticImageIsMask;
+ bool mUseLocalTextureAlphaOnly; // Ignore RGB channels from the input texture. Use alpha as a mask
+ bool mIsVisibilityMask;
- typedef std::vector< std::pair< std::string,BOOL > > morph_name_list_t;
+ typedef std::vector< std::pair< std::string,bool > > morph_name_list_t;
morph_name_list_t mMorphNameList;
param_color_info_list_t mParamColorInfoList;
param_alpha_info_list_t mParamAlphaInfoList;
@@ -130,17 +130,17 @@ void LLTexLayerSetBuffer::preRenderTexLayerSet()
}
// virtual
-void LLTexLayerSetBuffer::postRenderTexLayerSet(BOOL success)
+void LLTexLayerSetBuffer::postRenderTexLayerSet(bool success)
{
popProjection();
}
-BOOL LLTexLayerSetBuffer::renderTexLayerSet(LLRenderTarget* bound_target)
+bool LLTexLayerSetBuffer::renderTexLayerSet(LLRenderTarget* bound_target)
{
// Default color mask for tex layer render
gGL.setColorMask(true, true);
- BOOL success = TRUE;
+ bool success = true;
gAlphaMaskProgram.bind();
gAlphaMaskProgram.setMinimumAlpha(0.004f);
@@ -182,7 +182,7 @@ LLTexLayerSetInfo::LLTexLayerSetInfo() :
mWidth( 1024 ),
mHeight( 1024 ),
//
- mClearAlpha( TRUE )
+ mClearAlpha( true )
{
}
@@ -259,11 +259,11 @@ void LLTexLayerSetInfo::createVisualParams(LLAvatarAppearance *appearance)
// An ordered set of texture layers that get composited into a single texture.
//-----------------------------------------------------------------------------
-BOOL LLTexLayerSet::sHasCaches = FALSE;
+bool LLTexLayerSet::sHasCaches = false;
LLTexLayerSet::LLTexLayerSet(LLAvatarAppearance* const appearance) :
mAvatarAppearance( appearance ),
- mIsVisible( TRUE ),
+ mIsVisible( true ),
mBakedTexIndex(LLAvatarAppearanceDefines::BAKED_HEAD),
mInfo( NULL )
{
@@ -284,7 +284,7 @@ LLTexLayerSet::~LLTexLayerSet()
// setInfo
//-----------------------------------------------------------------------------
-BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
+bool LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
{
llassert(mInfo == NULL);
mInfo = info;
@@ -330,7 +330,7 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
// parseData
//-----------------------------------------------------------------------------
-BOOL LLTexLayerSet::parseData(LLXmlTreeNode* node)
+bool LLTexLayerSet::parseData(LLXmlTreeNode* node)
{
LLTexLayerSetInfo *info = new LLTexLayerSetInfo;
@@ -361,10 +361,10 @@ void LLTexLayerSet::deleteCaches()
}
-BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target )
+bool LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target )
{
- BOOL success = TRUE;
- mIsVisible = TRUE;
+ bool success = true;
+ mIsVisible = true;
if (mMaskLayerList.size() > 0)
{
@@ -372,7 +372,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget*
{
if (layer->isInvisibleAlphaMask())
{
- mIsVisible = FALSE;
+ mIsVisible = false;
}
}
}
@@ -432,8 +432,8 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget*
}
-BOOL LLTexLayerSet::isBodyRegion(const std::string& region) const
-{
+bool LLTexLayerSet::isBodyRegion(const std::string& region) const
+{
return mInfo->mBodyRegion == region;
}
@@ -491,7 +491,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
{
gGL.flush();
{
- LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(info->mStaticAlphaFileName, TRUE);
+ LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(info->mStaticAlphaFileName, true);
if( tex )
{
LLGLSUIDefault gls_ui;
@@ -540,7 +540,7 @@ void LLTexLayerSet::applyMorphMask(const U8* tex_data, S32 width, S32 height, S3
mAvatarAppearance->applyMorphMask(tex_data, width, height, num_components, mBakedTexIndex);
}
-BOOL LLTexLayerSet::isMorphValid() const
+bool LLTexLayerSet::isMorphValid() const
{
for(const LLTexLayerInterface* layer : mLayerList)
{
@@ -568,13 +568,13 @@ void LLTexLayerSet::invalidateMorphMasks()
// LLTexLayerInfo
//-----------------------------------------------------------------------------
LLTexLayerInfo::LLTexLayerInfo() :
- mWriteAllChannels( FALSE ),
+ mWriteAllChannels( false ),
mRenderPass(LLTexLayer::RP_COLOR),
mFixedColor( 0.f, 0.f, 0.f, 0.f ),
mLocalTexture( -1 ),
- mStaticImageIsMask( FALSE ),
- mUseLocalTextureAlphaOnly(FALSE),
- mIsVisibilityMask(FALSE)
+ mStaticImageIsMask( false ),
+ mUseLocalTextureAlphaOnly(false),
+ mIsVisibilityMask(false)
{
}
@@ -616,7 +616,7 @@ bool LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
node->getFastAttributeString( global_color_string, mGlobalColor );
// Visibility mask (optional)
- BOOL is_visibility;
+ bool is_visibility;
static LLStdStringHandle visibility_mask_string = LLXmlTree::addAttributeString("visibility_mask");
if (node->getFastAttributeBOOL(visibility_mask_string, is_visibility))
{
@@ -682,10 +682,10 @@ bool LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle morph_name_string = LLXmlTree::addAttributeString("morph_name");
if (maskNode->getFastAttributeString(morph_name_string, morph_name))
{
- BOOL invert = FALSE;
+ bool invert = false;
static LLStdStringHandle invert_string = LLXmlTree::addAttributeString("invert");
maskNode->getFastAttributeBOOL(invert_string, invert);
- mMorphNameList.push_back(std::pair(morph_name,invert));
+ mMorphNameList.push_back(std::pair(morph_name,invert));
}
}
@@ -721,28 +721,28 @@ bool LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
return true;
}
-BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
+bool LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
{
- BOOL success = true;
+ bool success = true;
for (LLTexLayerParamColorInfo* color_info : mParamColorInfoList)
{
LLTexLayerParamColor* param_color = new LLTexLayerParamColor(appearance);
- if (!param_color->setInfo(color_info, TRUE))
+ if (!param_color->setInfo(color_info, true))
{
LL_WARNS() << "NULL TexLayer Color Param could not be added to visual param list. Deleting." << LL_ENDL;
delete param_color;
- success = FALSE;
+ success = false;
}
}
for (LLTexLayerParamAlphaInfo* alpha_info : mParamAlphaInfoList)
{
LLTexLayerParamAlpha* param_alpha = new LLTexLayerParamAlpha(appearance);
- if (!param_alpha->setInfo(alpha_info, TRUE))
+ if (!param_alpha->setInfo(alpha_info, true))
{
LL_WARNS() << "NULL TexLayer Alpha Param could not be added to visual param list. Deleting." << LL_ENDL;
delete param_alpha;
- success = FALSE;
+ success = false;
}
}
@@ -751,9 +751,9 @@ BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
LLTexLayerInterface::LLTexLayerInterface(LLTexLayerSet* const layer_set):
mTexLayerSet( layer_set ),
- mMorphMasksValid( FALSE ),
+ mMorphMasksValid( false ),
mInfo(NULL),
- mHasMorph(FALSE)
+ mHasMorph(false)
{
}
@@ -767,7 +767,7 @@ LLTexLayerInterface::LLTexLayerInterface(const LLTexLayerInterface &layer, LLWea
mHasMorph = layer.mHasMorph;
}
-BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearable ) // This sets mInfo and calls initialization functions
+bool LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearable ) // This sets mInfo and calls initialization functions
{
// setInfo should only be called once. Code is not robust enough to handle redefinition of a texlayer.
// Not a critical warning, but could be useful for debugging later issues. -Nyx
@@ -785,7 +785,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
if (!wearable)
{
param_color = new LLTexLayerParamColor(this);
- if (!param_color->setInfo(color_info, TRUE))
+ if (!param_color->setInfo(color_info, true))
{
mInfo = NULL;
return false;
@@ -810,7 +810,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
if (!wearable)
{
param_alpha = new LLTexLayerParamAlpha( this );
- if (!param_alpha->setInfo(alpha_info, TRUE))
+ if (!param_alpha->setInfo(alpha_info, true))
{
mInfo = NULL;
return false;
@@ -900,14 +900,14 @@ const std::string& LLTexLayerInterface::getGlobalColor() const
return mInfo->mGlobalColor;
}
-BOOL LLTexLayerInterface::isVisibilityMask() const
+bool LLTexLayerInterface::isVisibilityMask() const
{
return mInfo->mIsVisibilityMask;
}
void LLTexLayerInterface::invalidateMorphMasks()
{
- mMorphMasksValid = FALSE;
+ mMorphMasksValid = false;
}
LLViewerVisualParam* LLTexLayerInterface::getVisualParamPtr(S32 index) const
@@ -987,7 +987,7 @@ void LLTexLayer::asLLSD(LLSD& sd) const
// setInfo
//-----------------------------------------------------------------------------
-BOOL LLTexLayer::setInfo(const LLTexLayerInfo* info, LLWearable* wearable )
+bool LLTexLayer::setInfo(const LLTexLayerInfo* info, LLWearable* wearable )
{
return LLTexLayerInterface::setInfo(info, wearable);
}
@@ -1027,14 +1027,14 @@ void LLTexLayer::calculateTexLayerColor(const param_color_list_t ¶m_list, LL
}
}
-BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
+bool LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
{
// *TODO: Is this correct?
//gPipeline.disableLights();
stop_glerror();
LLColor4 net_color;
- BOOL color_specified = findNetColor(&net_color);
+ bool color_specified = findNetColor(&net_color);
if (mTexLayerSet->getAvatarAppearance()->mIsDummy)
{
@@ -1042,7 +1042,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
net_color = LLAvatarAppearance::getDummyColor();
}
- BOOL success = TRUE;
+ bool success = true;
// If you can't see the layer, don't render it.
if( is_approx_zero( net_color.mV[VW] ) )
@@ -1050,7 +1050,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
return success;
}
- BOOL alpha_mask_specified = FALSE;
+ bool alpha_mask_specified = false;
param_alpha_list_t::const_iterator iter = mParamAlphaList.begin();
if( iter != mParamAlphaList.end() )
{
@@ -1058,7 +1058,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
// However, we can't do this optimization if we have morph masks that need updating.
/* if (!mHasMorph)
{
- BOOL skip_layer = TRUE;
+ bool skip_layer = true;
while( iter != mParamAlphaList.end() )
{
@@ -1066,7 +1066,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
if( !param->getSkip() )
{
- skip_layer = FALSE;
+ skip_layer = false;
break;
}
@@ -1081,7 +1081,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
const bool force_render = true;
renderMorphMasks(x, y, width, height, net_color, bound_target, force_render);
- alpha_mask_specified = TRUE;
+ alpha_mask_specified = true;
gGL.flush();
gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ONE_MINUS_DEST_ALPHA);
}
@@ -1122,7 +1122,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
- gGL.getTexUnit(0)->bind(tex, TRUE);
+ gGL.getTexUnit(0)->bind(tex, true);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
gl_rect_2d_simple_tex( width, height );
@@ -1137,7 +1137,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
}
// else
// {
-// success = FALSE;
+// success = false;
// }
}
}
@@ -1148,13 +1148,13 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask);
if( tex )
{
- gGL.getTexUnit(0)->bind(tex, TRUE);
+ gGL.getTexUnit(0)->bind(tex, true);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
else
{
- success = FALSE;
+ success = false;
}
}
}
@@ -1206,7 +1206,7 @@ const U8* LLTexLayer::getAlphaData() const
return (iter2 == mAlphaCache.end()) ? 0 : iter2->second;
}
-BOOL LLTexLayer::findNetColor(LLColor4* net_color) const
+bool LLTexLayer::findNetColor(LLColor4* net_color) const
{
// Color is either:
// * one or more color parameters (weighted colors) (which may make use of a global color or fixed color)
@@ -1250,9 +1250,9 @@ BOOL LLTexLayer::findNetColor(LLColor4* net_color) const
return false; // No need to draw a separate colored polygon
}
-BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
+bool LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
{
- BOOL success = true;
+ bool success = true;
gGL.flush();
@@ -1262,14 +1262,14 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
if( tex )
{
gAlphaMaskProgram.setMinimumAlpha(0.f);
- gGL.getTexUnit(0)->bind(tex, TRUE);
+ gGL.getTexUnit(0)->bind(tex, true);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
else
{
- success = FALSE;
+ success = false;
}
}
else
@@ -1304,7 +1304,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
return;
}
LL_PROFILE_ZONE_SCOPED;
- BOOL success = TRUE;
+ bool success = true;
llassert( !mParamAlphaList.empty() );
@@ -1349,7 +1349,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
{
LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
- gGL.getTexUnit(0)->bind(tex, TRUE);
+ gGL.getTexUnit(0)->bind(tex, true);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
gl_rect_2d_simple_tex( width, height );
@@ -1366,7 +1366,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
{
if( (tex->getComponents() == 4) || (tex->getComponents() == 1) )
{
- gGL.getTexUnit(0)->bind(tex, TRUE);
+ gGL.getTexUnit(0)->bind(tex, true);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
@@ -1547,7 +1547,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
getTexLayerSet()->getAvatarAppearance()->dirtyMesh();
- mMorphMasksValid = TRUE;
+ mMorphMasksValid = true;
getTexLayerSet()->applyMorphMask(alpha_data, width, height, 1);
}
}
@@ -1580,7 +1580,7 @@ void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32
}
}
-/*virtual*/ BOOL LLTexLayer::isInvisibleAlphaMask() const
+/*virtual*/ bool LLTexLayer::isInvisibleAlphaMask() const
{
if (mLocalTextureObject)
{
@@ -1649,7 +1649,7 @@ LLTexLayerTemplate::~LLTexLayerTemplate()
// setInfo
//-----------------------------------------------------------------------------
-/*virtual*/ BOOL LLTexLayerTemplate::setInfo(const LLTexLayerInfo* info, LLWearable* wearable )
+/*virtual*/ bool LLTexLayerTemplate::setInfo(const LLTexLayerInfo* info, LLWearable* wearable )
{
return LLTexLayerInterface::setInfo(info, wearable);
}
@@ -1698,14 +1698,14 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
return layer;
}
-/*virtual*/ BOOL LLTexLayerTemplate::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
+/*virtual*/ bool LLTexLayerTemplate::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
{
if(!mInfo)
{
- return FALSE ;
+ return false ;
}
- BOOL success = TRUE;
+ bool success = true;
updateWearableCache();
for (LLWearable* wearable : mWearableCache)
{
@@ -1730,9 +1730,9 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
return success;
}
-/*virtual*/ BOOL LLTexLayerTemplate::blendAlphaTexture( S32 x, S32 y, S32 width, S32 height) // Multiplies a single alpha texture against the frame buffer
+/*virtual*/ bool LLTexLayerTemplate::blendAlphaTexture( S32 x, S32 y, S32 width, S32 height) // Multiplies a single alpha texture against the frame buffer
{
- BOOL success = TRUE;
+ bool success = true;
U32 num_wearables = updateWearableCache();
for (U32 i = 0; i < num_wearables; i++)
{
@@ -1756,8 +1756,8 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
}
}
-/*virtual*/ void LLTexLayerTemplate::setHasMorph(BOOL newval)
-{
+/*virtual*/ void LLTexLayerTemplate::setHasMorph(bool newval)
+{
mHasMorph = newval;
U32 num_wearables = updateWearableCache();
for (U32 i = 0; i < num_wearables; i++)
@@ -1783,7 +1783,7 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
}
}
-/*virtual*/ BOOL LLTexLayerTemplate::isInvisibleAlphaMask() const
+/*virtual*/ bool LLTexLayerTemplate::isInvisibleAlphaMask() const
{
U32 num_wearables = updateWearableCache();
for (U32 i = 0; i < num_wearables; i++)
@@ -1920,7 +1920,7 @@ LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name)
// Returns a GL Image (without a backing ImageRaw) that contains the decoded data from a tga file named file_name.
// Caches the result to speed identical subsequent requests.
-LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, BOOL is_mask)
+LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, bool is_mask)
{
LL_PROFILE_ZONE_SCOPED;
LLPointer tex;
@@ -1934,7 +1934,7 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
else
{
llassert(gTextureManagerBridgep);
- tex = gTextureManagerBridgep->getLocalTexture( FALSE );
+ tex = gTextureManagerBridgep->getLocalTexture( false );
LLPointer image_raw = new LLImageRaw;
if( loadImageRaw( file_name, image_raw ) )
{
@@ -1950,7 +1950,7 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
image_raw->copyUnscaledAlphaMask(alpha_image_raw, LLColor4U::black);
}
- tex->createGLTexture(0, image_raw, 0, TRUE, LLGLTexture::LOCAL);
+ tex->createGLTexture(0, image_raw, 0, true, LLGLTexture::LOCAL);
gGL.getTexUnit(0)->bind(tex);
tex->setAddressMode(LLTexUnit::TAM_CLAMP);
@@ -1968,11 +1968,11 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
}
// Reads a .tga file, decodes it, and puts the decoded data in image_raw.
-// Returns TRUE if successful.
-BOOL LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLImageRaw* image_raw)
+// Returns true if successful.
+bool LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLImageRaw* image_raw)
{
LL_PROFILE_ZONE_SCOPED;
- BOOL success = FALSE;
+ bool success = false;
std::string path;
path = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,file_name);
LLPointer image_tga = new LLImageTGA( path );
diff --git a/indra/llappearance/lltexlayer.h b/indra/llappearance/lltexlayer.h
index 7a63c43e0f..5cd80173c2 100644
--- a/indra/llappearance/lltexlayer.h
+++ b/indra/llappearance/lltexlayer.h
@@ -65,13 +65,13 @@ public:
LLTexLayerInterface(const LLTexLayerInterface &layer, LLWearable *wearable);
virtual ~LLTexLayerInterface() {}
- virtual BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) = 0;
+ virtual bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) = 0;
virtual void deleteCaches() = 0;
- virtual BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) = 0;
- virtual BOOL isInvisibleAlphaMask() const = 0;
+ virtual bool blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) = 0;
+ virtual bool isInvisibleAlphaMask() const = 0;
const LLTexLayerInfo* getInfo() const { return mInfo; }
- virtual BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // sets mInfo, calls initialization functions
+ virtual bool setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // sets mInfo, calls initialization functions
LLWearableType::EType getWearableType() const;
LLAvatarAppearanceDefines::ETextureIndex getLocalTextureIndex() const;
@@ -80,16 +80,16 @@ public:
LLTexLayerSet* const getTexLayerSet() { return mTexLayerSet; }
void invalidateMorphMasks();
- virtual void setHasMorph(BOOL newval) { mHasMorph = newval; }
- BOOL hasMorph() const { return mHasMorph; }
- BOOL isMorphValid() const { return mMorphMasksValid; }
+ virtual void setHasMorph(bool newval) { mHasMorph = newval; }
+ bool hasMorph() const { return mHasMorph; }
+ bool isMorphValid() const { return mMorphMasksValid; }
void requestUpdate();
virtual void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target) = 0;
- BOOL hasAlphaParams() const { return !mParamAlphaList.empty(); }
+ bool hasAlphaParams() const { return !mParamAlphaList.empty(); }
ERenderPass getRenderPass() const;
- BOOL isVisibilityMask() const;
+ bool isVisibilityMask() const;
virtual void asLLSD(LLSD& sd) const {}
@@ -100,8 +100,8 @@ protected:
protected:
LLTexLayerSet* const mTexLayerSet;
const LLTexLayerInfo* mInfo;
- BOOL mMorphMasksValid;
- BOOL mHasMorph;
+ bool mMorphMasksValid;
+ bool mHasMorph;
// Layers can have either mParamColorList, mGlobalColor, or mFixedColor. They are looked for in that order.
param_color_list_t mParamColorList;
@@ -121,13 +121,13 @@ public:
LLTexLayerTemplate(LLTexLayerSet* const layer_set, LLAvatarAppearance* const appearance);
LLTexLayerTemplate(const LLTexLayerTemplate &layer);
/*virtual*/ ~LLTexLayerTemplate();
- /*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target);
- /*virtual*/ BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions
- /*virtual*/ BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
+ /*virtual*/ bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target);
+ /*virtual*/ bool setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions
+ /*virtual*/ bool blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
/*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target);
- /*virtual*/ void setHasMorph(BOOL newval);
+ /*virtual*/ void setHasMorph(bool newval);
/*virtual*/ void deleteCaches();
- /*virtual*/ BOOL isInvisibleAlphaMask() const;
+ /*virtual*/ bool isInvisibleAlphaMask() const;
protected:
U32 updateWearableCache() const;
LLTexLayer* getLayer(U32 i) const;
@@ -151,18 +151,18 @@ public:
LLTexLayer(const LLTexLayerTemplate &layer_template, LLLocalTextureObject *lto, LLWearable *wearable);
/*virtual*/ ~LLTexLayer();
- /*virtual*/ BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions
- /*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target);
+ /*virtual*/ bool setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions
+ /*virtual*/ bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target);
/*virtual*/ void deleteCaches();
const U8* getAlphaData() const;
- BOOL findNetColor(LLColor4* color) const;
- /*virtual*/ BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
+ bool findNetColor(LLColor4* color) const;
+ /*virtual*/ bool blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
/*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target);
void renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, LLRenderTarget* bound_target, bool force_render);
void addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target);
- /*virtual*/ BOOL isInvisibleAlphaMask() const;
+ /*virtual*/ bool isInvisibleAlphaMask() const;
void setLTO(LLLocalTextureObject *lto) { mLocalTextureObject = lto; }
LLLocalTextureObject* getLTO() { return mLocalTextureObject; }
@@ -197,14 +197,14 @@ public:
void gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S32 width, S32 height, LLRenderTarget* bound_target);
const LLTexLayerSetInfo* getInfo() const { return mInfo; }
- BOOL setInfo(const LLTexLayerSetInfo *info); // This sets mInfo and calls initialization functions
+ bool setInfo(const LLTexLayerSetInfo *info); // This sets mInfo and calls initialization functions
- BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target = nullptr);
+ bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target = nullptr);
void renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target = nullptr, bool forceClear = false);
- BOOL isBodyRegion(const std::string& region) const;
+ bool isBodyRegion(const std::string& region) const;
void applyMorphMask(const U8* tex_data, S32 width, S32 height, S32 num_components);
- BOOL isMorphValid() const;
+ bool isMorphValid() const;
virtual void requestUpdate() = 0;
void invalidateMorphMasks();
void deleteCaches();
@@ -213,12 +213,12 @@ public:
LLAvatarAppearance* getAvatarAppearance() const { return mAvatarAppearance; }
const std::string getBodyRegionName() const;
- BOOL hasComposite() const { return (mComposite.notNull()); }
+ bool hasComposite() const { return (mComposite.notNull()); }
LLAvatarAppearanceDefines::EBakedTextureIndex getBakedTexIndex() const { return mBakedTexIndex; }
void setBakedTexIndex(LLAvatarAppearanceDefines::EBakedTextureIndex index) { mBakedTexIndex = index; }
- BOOL isVisible() const { return mIsVisible; }
+ bool isVisible() const { return mIsVisible; }
- static BOOL sHasCaches;
+ static bool sHasCaches;
protected:
typedef std::vector layer_list_t;
@@ -226,7 +226,7 @@ protected:
layer_list_t mMaskLayerList;
LLPointer mComposite;
LLAvatarAppearance* const mAvatarAppearance; // note: backlink only; don't make this an LLPointer.
- BOOL mIsVisible;
+ bool mIsVisible;
LLAvatarAppearanceDefines::EBakedTextureIndex mBakedTexIndex;
const LLTexLayerSetInfo* mInfo;
@@ -252,7 +252,7 @@ protected:
S32 mWidth;
S32 mHeight;
std::string mStaticAlphaFileName;
- BOOL mClearAlpha; // Set alpha to 1 for this layerset (if there is no mStaticAlphaFileName)
+ bool mClearAlpha; // Set alpha to 1 for this layerset (if there is no mStaticAlphaFileName)
typedef std::vector layer_info_list_t;
layer_info_list_t mLayerInfoList;
};
@@ -275,15 +275,15 @@ protected:
void popProjection() const;
virtual void preRenderTexLayerSet();
// [Legacy Bake]
- //virtual void midRenderTexLayerSet(BOOL success) {}
- virtual void midRenderTexLayerSet(BOOL success, LLRenderTarget* bound_target) {}
+ //virtual void midRenderTexLayerSet(bool success) {}
+ virtual void midRenderTexLayerSet(bool success, LLRenderTarget* bound_target) {}
// [Legacy Bake]
- virtual void postRenderTexLayerSet(BOOL success);
+ virtual void postRenderTexLayerSet(bool success);
virtual S32 getCompositeOriginX() const = 0;
virtual S32 getCompositeOriginY() const = 0;
virtual S32 getCompositeWidth() const = 0;
virtual S32 getCompositeHeight() const = 0;
- BOOL renderTexLayerSet(LLRenderTarget* bound_target);
+ bool renderTexLayerSet(LLRenderTarget* bound_target);
LLTexLayerSet* const mTexLayerSet;
};
@@ -297,12 +297,12 @@ class LLTexLayerStaticImageList : public LLSingleton
LLSINGLETON(LLTexLayerStaticImageList);
~LLTexLayerStaticImageList();
public:
- LLGLTexture* getTexture(const std::string& file_name, BOOL is_mask);
+ LLGLTexture* getTexture(const std::string& file_name, bool is_mask);
LLImageTGA* getImageTGA(const std::string& file_name);
void deleteCachedImages();
void dumpByteCount() const;
protected:
- BOOL loadImageRaw(const std::string& file_name, LLImageRaw* image_raw);
+ bool loadImageRaw(const std::string& file_name, LLImageRaw* image_raw);
private:
LLStringTable mImageNames;
typedef std::map > texture_map_t;
diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp
index 7c1eceadc9..9e6233f206 100644
--- a/indra/llappearance/lltexlayerparams.cpp
+++ b/indra/llappearance/lltexlayerparams.cpp
@@ -69,7 +69,7 @@ LLTexLayerParam::LLTexLayerParam(const LLTexLayerParam& pOther)
{
}
-BOOL LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appearance)
+bool LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, bool add_to_appearance)
{
LLViewerVisualParam::setInfo(info);
@@ -123,8 +123,8 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLTexLayerInterface* layer)
mCachedProcessedTexture(NULL),
mStaticImageTGA(),
mStaticImageRaw(),
- mNeedsCreateTexture(FALSE),
- mStaticImageInvalid(FALSE),
+ mNeedsCreateTexture(false),
+ mStaticImageInvalid(false),
mAvgDistortionVec(1.f, 1.f, 1.f),
mCachedEffectiveWeight(0.f)
{
@@ -136,8 +136,8 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLAvatarAppearance* appearance)
mCachedProcessedTexture(NULL),
mStaticImageTGA(),
mStaticImageRaw(),
- mNeedsCreateTexture(FALSE),
- mStaticImageInvalid(FALSE),
+ mNeedsCreateTexture(false),
+ mStaticImageInvalid(false),
mAvgDistortionVec(1.f, 1.f, 1.f),
mCachedEffectiveWeight(0.f)
{
@@ -173,17 +173,17 @@ void LLTexLayerParamAlpha::deleteCaches()
mStaticImageTGA = NULL; // deletes image
mCachedProcessedTexture = NULL;
mStaticImageRaw = NULL;
- mNeedsCreateTexture = FALSE;
+ mNeedsCreateTexture = false;
}
-BOOL LLTexLayerParamAlpha::getMultiplyBlend() const
+bool LLTexLayerParamAlpha::getMultiplyBlend() const
{
return ((LLTexLayerParamAlphaInfo *)getInfo())->mMultiplyBlend;
}
// [Legacy Bake]
//void LLTexLayerParamAlpha::setWeight(F32 weight)
-void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL upload_bake)
+void LLTexLayerParamAlpha::setWeight(F32 weight, bool upload_bake)
// [Legacy Bake]
{
if (mIsAnimating || mTexLayer == NULL)
@@ -213,7 +213,7 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL upload_bake)
// [Legacy Bake]
//void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value)
-void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL upload_bake)
+void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, bool upload_bake)
{
// do not animate dummy parameters
if (mIsDummy)
@@ -228,7 +228,7 @@ void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL upload_bake
// [Legacy Bake]
//setWeight(target_value);
setWeight(target_value, upload_bake);
- mIsAnimating = TRUE;
+ mIsAnimating = true;
if (mNext)
{
// [Legacy Bake]
@@ -239,7 +239,7 @@ void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL upload_bake
// [Legacy Bake]
//void LLTexLayerParamAlpha::animate(F32 delta)
-void LLTexLayerParamAlpha::animate(F32 delta, BOOL upload_bake)
+void LLTexLayerParamAlpha::animate(F32 delta, bool upload_bake)
{
if (mNext)
{
@@ -249,7 +249,7 @@ void LLTexLayerParamAlpha::animate(F32 delta, BOOL upload_bake)
}
}
-BOOL LLTexLayerParamAlpha::getSkip() const
+bool LLTexLayerParamAlpha::getSkip() const
{
if (!mTexLayer)
{
@@ -277,10 +277,10 @@ BOOL LLTexLayerParamAlpha::getSkip() const
}
-BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
+bool LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
{
LL_PROFILE_ZONE_SCOPED;
- BOOL success = true;
+ bool success = true;
if (!mTexLayer)
{
@@ -288,7 +288,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
}
F32 effective_weight = (mTexLayer->getTexLayerSet()->getAvatarAppearance()->getSex() & getSex()) ? mCurWeight : getDefaultWeight();
- BOOL weight_changed = effective_weight != mCachedEffectiveWeight;
+ bool weight_changed = effective_weight != mCachedEffectiveWeight;
if (getSkip())
{
return success;
@@ -312,12 +312,12 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
// Don't load the image file until we actually need it the first time. Like now.
mStaticImageTGA = LLTexLayerStaticImageList::getInstance()->getImageTGA(info->mStaticImageFileName);
// We now have something in one of our caches
- LLTexLayerSet::sHasCaches |= mStaticImageTGA.notNull() ? TRUE : FALSE;
+ LLTexLayerSet::sHasCaches |= mStaticImageTGA.notNull() ? true : false;
if (mStaticImageTGA.isNull())
{
LL_WARNS() << "Unable to load static file: " << info->mStaticImageFileName << LL_ENDL;
- mStaticImageInvalid = TRUE; // don't try again.
+ mStaticImageInvalid = true; // don't try again.
return false;
}
}
@@ -334,10 +334,10 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
if (!mCachedProcessedTexture)
{
llassert(gTextureManagerBridgep);
- mCachedProcessedTexture = gTextureManagerBridgep->getLocalTexture(image_tga_width, image_tga_height, 1, FALSE);
+ mCachedProcessedTexture = gTextureManagerBridgep->getLocalTexture(image_tga_width, image_tga_height, 1, false);
// We now have something in one of our caches
- LLTexLayerSet::sHasCaches |= mCachedProcessedTexture ? TRUE : FALSE;
+ LLTexLayerSet::sHasCaches |= mCachedProcessedTexture ? true : false;
mCachedProcessedTexture->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
}
@@ -346,7 +346,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
mStaticImageRaw = NULL;
mStaticImageRaw = new LLImageRaw;
mStaticImageTGA->decodeAndProcess(mStaticImageRaw, info->mDomain, effective_weight);
- mNeedsCreateTexture = TRUE;
+ mNeedsCreateTexture = true;
LL_DEBUGS() << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << LL_ENDL;
}
@@ -357,7 +357,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
if (mNeedsCreateTexture)
{
mCachedProcessedTexture->createGLTexture(0, mStaticImageRaw);
- mNeedsCreateTexture = FALSE;
+ mNeedsCreateTexture = false;
gGL.getTexUnit(0)->bind(mCachedProcessedTexture);
mCachedProcessedTexture->setAddressMode(LLTexUnit::TAM_CLAMP);
}
@@ -390,8 +390,8 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
// LLTexLayerParamAlphaInfo
//-----------------------------------------------------------------------------
LLTexLayerParamAlphaInfo::LLTexLayerParamAlphaInfo() :
- mMultiplyBlend(FALSE),
- mSkipIfZeroWeight(FALSE),
+ mMultiplyBlend(false),
+ mSkipIfZeroWeight(false),
mDomain(0.f)
{
}
@@ -492,7 +492,7 @@ LLColor4 LLTexLayerParamColor::getNetColor() const
// [Legacy Bake]
//void LLTexLayerParamColor::setWeight(F32 weight)
-void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake)
+void LLTexLayerParamColor::setWeight(F32 weight, bool upload_bake)
{
if (mIsAnimating)
{
@@ -535,14 +535,14 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake)
// [Legacy Bake]
//void LLTexLayerParamColor::setAnimationTarget(F32 target_value)
-void LLTexLayerParamColor::setAnimationTarget(F32 target_value, BOOL upload_bake)
+void LLTexLayerParamColor::setAnimationTarget(F32 target_value, bool upload_bake)
{
// set value first then set interpolating flag to ignore further updates
mTargetWeight = target_value;
// [Legacy Bake]
//setWeight(target_value);
setWeight(target_value, upload_bake);
- mIsAnimating = TRUE;
+ mIsAnimating = true;
if (mNext)
{
// [Legacy Bake]
@@ -553,7 +553,7 @@ void LLTexLayerParamColor::setAnimationTarget(F32 target_value, BOOL upload_bake
// [Legacy Bake]
//void LLTexLayerParamColor::animate(F32 delta)
-void LLTexLayerParamColor::animate(F32 delta, BOOL upload_bake)
+void LLTexLayerParamColor::animate(F32 delta, bool upload_bake)
{
if (mNext)
{
diff --git a/indra/llappearance/lltexlayerparams.h b/indra/llappearance/lltexlayerparams.h
index d88ee259b4..18a2f5048b 100644
--- a/indra/llappearance/lltexlayerparams.h
+++ b/indra/llappearance/lltexlayerparams.h
@@ -48,7 +48,7 @@ class LLTexLayerParam : public LLViewerVisualParam
public:
LLTexLayerParam(LLTexLayerInterface *layer);
LLTexLayerParam(LLAvatarAppearance *appearance);
- /*virtual*/ BOOL setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appearance);
+ /*virtual*/ bool setInfo(LLViewerVisualParamInfo *info, bool add_to_appearance);
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const = 0;
protected:
@@ -74,15 +74,15 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
- ///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
+ ///*virtual*/ bool parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex avatar_sex ) {}
// [Legacy Bake]
///*virtual*/ void setWeight(F32 weight);
///*virtual*/ void setAnimationTarget(F32 target_value);
///*virtual*/ void animate(F32 delta);
- /*virtual*/ void setWeight(F32 weight, BOOL upload_bake);
- /*virtual*/ void setAnimationTarget(F32 target_value, BOOL upload_bake);
- /*virtual*/ void animate(F32 delta, BOOL upload_bake);
+ /*virtual*/ void setWeight(F32 weight, bool upload_bake);
+ /*virtual*/ void setAnimationTarget(F32 target_value, bool upload_bake);
+ /*virtual*/ void animate(F32 delta, bool upload_bake);
// [Legacy Bake]
// LLViewerVisualParam Virtual functions
@@ -100,10 +100,10 @@ public:
//
// New functions
- BOOL render( S32 x, S32 y, S32 width, S32 height );
- BOOL getSkip() const;
+ bool render( S32 x, S32 y, S32 width, S32 height );
+ bool getSkip() const;
void deleteCaches();
- BOOL getMultiplyBlend() const;
+ bool getMultiplyBlend() const;
private:
LLTexLayerParamAlpha(const LLTexLayerParamAlpha& pOther);
@@ -111,8 +111,8 @@ private:
LLPointer mCachedProcessedTexture;
LLPointer mStaticImageTGA;
LLPointer mStaticImageRaw;
- std::atomic mNeedsCreateTexture;
- BOOL mStaticImageInvalid;
+ std::atomic mNeedsCreateTexture;
+ bool mStaticImageInvalid;
LL_ALIGN_16(LLVector4a mAvgDistortionVec);
F32 mCachedEffectiveWeight;
@@ -135,8 +135,8 @@ public:
private:
std::string mStaticImageFileName;
- BOOL mMultiplyBlend;
- BOOL mSkipIfZeroWeight;
+ bool mMultiplyBlend;
+ bool mSkipIfZeroWeight;
F32 mDomain;
};
//
@@ -168,15 +168,15 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
- ///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
+ ///*virtual*/ bool parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex avatar_sex ) {}
// [Legacy Bake]
///*virtual*/ void setWeight(F32 weight);
///*virtual*/ void setAnimationTarget(F32 target_value);
///*virtual*/ void animate(F32 delta);
- /*virtual*/ void setWeight(F32 weight, BOOL upload_bake);
- /*virtual*/ void setAnimationTarget(F32 target_value, BOOL upload_bake);
- /*virtual*/ void animate(F32 delta, BOOL upload_bake);
+ /*virtual*/ void setWeight(F32 weight, bool upload_bake);
+ /*virtual*/ void setAnimationTarget(F32 target_value, bool upload_bake);
+ /*virtual*/ void animate(F32 delta, bool upload_bake);
// [Legacy Bake]
diff --git a/indra/llappearance/llviewervisualparam.cpp b/indra/llappearance/llviewervisualparam.cpp
index d6091f30bc..88a715cdf3 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)
@@ -155,7 +155,7 @@ BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info)
mID = info->mID;
// [Legacy Bake]
//setWeight(getDefaultWeight());
- setWeight(getDefaultWeight(), FALSE);
+ setWeight(getDefaultWeight(), false);
return true;
}
diff --git a/indra/llappearance/llviewervisualparam.h b/indra/llappearance/llviewervisualparam.h
index 9ad3e6eae8..42c32aa319 100644
--- a/indra/llappearance/llviewervisualparam.h
+++ b/indra/llappearance/llviewervisualparam.h
@@ -49,13 +49,13 @@ public:
protected:
S32 mWearableType;
- BOOL mCrossWearable;
+ bool mCrossWearable;
std::string mEditGroup;
F32 mCamDist;
F32 mCamAngle; // degrees
F32 mCamElevation;
F32 mEditGroupDisplayOrder;
- BOOL mShowSimple; // show edit controls when in "simple ui" mode?
+ bool mShowSimple; // show edit controls when in "simple ui" mode?
F32 mSimpleMin; // when in simple UI, apply this minimum, range 0.f to 100.f
F32 mSimpleMax; // when in simple UI, apply this maximum, range 0.f to 100.f
};
@@ -75,12 +75,12 @@ public:
// Special: These functions are overridden by child classes
LLViewerVisualParamInfo *getInfo() const { return (LLViewerVisualParamInfo*)mInfo; };
// This sets mInfo and calls initialization functions
- BOOL setInfo(LLViewerVisualParamInfo *info);
+ bool setInfo(LLViewerVisualParamInfo *info);
virtual LLViewerVisualParam* cloneParam(LLWearable* wearable) const = 0;
// LLVisualParam Virtual functions
- ///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
+ ///*virtual*/ bool parseData(LLXmlTreeNode* node);
// New Virtual functions
virtual F32 getTotalDistortion() = 0;
@@ -99,11 +99,11 @@ public:
F32 getCameraAngle() const { return getInfo()->mCamAngle; } // degrees
F32 getCameraElevation() const { return getInfo()->mCamElevation; }
- BOOL getShowSimple() const { return getInfo()->mShowSimple; }
+ bool getShowSimple() const { return getInfo()->mShowSimple; }
F32 getSimpleMin() const { return getInfo()->mSimpleMin; }
F32 getSimpleMax() const { return getInfo()->mSimpleMax; }
- BOOL getCrossWearable() const { return getInfo()->mCrossWearable; }
+ bool getCrossWearable() const { return getInfo()->mCrossWearable; }
protected:
LLViewerVisualParam(const LLViewerVisualParam& pOther);
diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp
index ffa5310717..3f53578ef8 100644
--- a/indra/llappearance/llwearable.cpp
+++ b/indra/llappearance/llwearable.cpp
@@ -89,14 +89,14 @@ LLAssetType::EType LLWearable::getAssetType() const
return LLWearableType::getInstance()->getAssetType(mType);
}
-BOOL LLWearable::exportFile(const std::string& filename) const
+bool LLWearable::exportFile(const std::string& filename) const
{
llofstream ofs(filename.c_str(), std::ios_base::out | std::ios_base::trunc | std::ios_base::binary);
return ofs.is_open() && exportStream(ofs);
}
// virtual
-BOOL LLWearable::exportStream( std::ostream& output_stream ) const
+bool LLWearable::exportStream( std::ostream& output_stream ) const
{
if (!output_stream.good()) return false;
@@ -472,7 +472,7 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
return LLWearable::SUCCESS;
}
-BOOL LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size)
+bool LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size)
{
if (!input_stream.good())
{
@@ -555,7 +555,7 @@ void LLWearable::revertValues()
F32 value = vp_pair.second;
// [Legacy Bake]
//setVisualParamWeight(id, value);
- setVisualParamWeight(id, value, TRUE);
+ setVisualParamWeight(id, value, true);
mSavedVisualParamMap[id] = param->getWeight();
}
}
@@ -641,7 +641,7 @@ void LLWearable::addVisualParam(LLVisualParam *param)
{
delete mVisualParamIndexMap[param->getID()];
}
- param->setIsDummy(FALSE);
+ param->setIsDummy(false);
param->setParamLocation(LOC_WEARABLE);
mVisualParamIndexMap[param->getID()] = param;
mSavedVisualParamMap[param->getID()] = param->getDefaultWeight();
@@ -650,7 +650,7 @@ void LLWearable::addVisualParam(LLVisualParam *param)
// [Legacy Bake]
//void LLWearable::setVisualParamWeight(S32 param_index, F32 value)
-void LLWearable::setVisualParamWeight(S32 param_index, F32 value, BOOL upload_bake)
+void LLWearable::setVisualParamWeight(S32 param_index, F32 value, bool upload_bake)
{
if( is_in_map(mVisualParamIndexMap, param_index ) )
{
@@ -697,7 +697,7 @@ void LLWearable::getVisualParams(visual_param_vec_t &list)
// [Legacy Bake]
//void LLWearable::animateParams(F32 delta)
-void LLWearable::animateParams(F32 delta, BOOL upload_bake)
+void LLWearable::animateParams(F32 delta, bool upload_bake)
{
for(visual_param_index_map_t::value_type& vp_pair : mVisualParamIndexMap)
{
@@ -724,7 +724,7 @@ LLColor4 LLWearable::getClothesColor(S32 te) const
// [Legacy Bake]
//void LLWearable::setClothesColor( S32 te, const LLColor4& new_color)
-void LLWearable::setClothesColor( S32 te, const LLColor4& new_color, BOOL upload_bake)
+void LLWearable::setClothesColor( S32 te, const LLColor4& new_color, bool upload_bake)
{
U32 param_name[3];
if( LLAvatarAppearance::teToColorParams( (LLAvatarAppearanceDefines::ETextureIndex)te, param_name ) )
@@ -754,7 +754,7 @@ void LLWearable::writeToAvatar(LLAvatarAppearance* avatarp)
// [Legacy Bake]
//avatarp->setVisualParamWeight( param_id, weight);
- avatarp->setVisualParamWeight( param_id, weight, FALSE);
+ avatarp->setVisualParamWeight( param_id, weight, false);
}
}
}
diff --git a/indra/llappearance/llwearable.h b/indra/llappearance/llwearable.h
index e2b8a7068c..014784c589 100644
--- a/indra/llappearance/llwearable.h
+++ b/indra/llappearance/llwearable.h
@@ -96,9 +96,9 @@ public:
SUCCESS,
BAD_HEADER
};
- BOOL exportFile(const std::string& filename) const;
+ bool exportFile(const std::string& filename) const;
EImportResult importFile(const std::string& filename, LLAvatarAppearance* avatarp );
- virtual BOOL exportStream( std::ostream& output_stream ) const;
+ virtual bool exportStream( std::ostream& output_stream ) const;
virtual EImportResult importStream( std::istream& input_stream, LLAvatarAppearance* avatarp );
static void setCurrentDefinitionVersion( S32 version ) { LLWearable::sCurrentDefinitionVersion = version; }
@@ -112,18 +112,18 @@ public:
void addVisualParam(LLVisualParam *param);
// [Legacy Bake]
//void setVisualParamWeight(S32 index, F32 value);
- void setVisualParamWeight(S32 index, F32 value, BOOL upload_bake);
+ void setVisualParamWeight(S32 index, F32 value, bool upload_bake);
F32 getVisualParamWeight(S32 index) const;
LLVisualParam* getVisualParam(S32 index) const;
void getVisualParams(visual_param_vec_t &list);
// [Legacy Bake]
//void animateParams(F32 delta);
- void animateParams(F32 delta, BOOL upload_bake);
+ void animateParams(F32 delta, bool upload_bake);
LLColor4 getClothesColor(S32 te) const;
// [Legacy Bake]
//void setClothesColor( S32 te, const LLColor4& new_color);
- void setClothesColor( S32 te, const LLColor4& new_color, BOOL upload_bake);
+ void setClothesColor( S32 te, const LLColor4& new_color, bool upload_bake);
virtual void revertValues();
virtual void saveValues();
@@ -144,7 +144,7 @@ protected:
void destroyTextures();
void createVisualParams(LLAvatarAppearance *avatarp);
void createLayers(S32 te, LLAvatarAppearance *avatarp);
- BOOL getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size);
+ bool getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size);
static S32 sCurrentDefinitionVersion; // Depends on the current state of the avatar_lad.xml.
S32 mDefinitionVersion; // Depends on the state of the avatar_lad.xml when this asset was created.
diff --git a/indra/llappearance/llwearabledata.cpp b/indra/llappearance/llwearabledata.cpp
index 6441b3f4df..39127936aa 100644
--- a/indra/llappearance/llwearabledata.cpp
+++ b/indra/llappearance/llwearabledata.cpp
@@ -87,7 +87,7 @@ void LLWearableData::setWearable(const LLWearableType::EType type, U32 index, LL
{
wearable_vec[index] = wearable;
old_wearable->setUpdated();
- const BOOL removed = FALSE;
+ const bool removed = false;
wearableUpdated(wearable, removed);
}
}
@@ -116,14 +116,14 @@ void LLWearableData::pushWearable(const LLWearableType::EType type,
// mWearableDatas[type].push_back(wearable); mWearableDatas[type].push_back(wearable);
if (trigger_updated)
{
- const BOOL removed = FALSE;
+ const bool removed = false;
wearableUpdated(wearable, removed);
}
}
}
// virtual
-void LLWearableData::wearableUpdated(LLWearable *wearable, BOOL removed)
+void LLWearableData::wearableUpdated(LLWearable *wearable, bool removed)
{
wearable->setUpdated();
if (!removed)
@@ -155,7 +155,7 @@ void LLWearableData::eraseWearable(const LLWearableType::EType type, U32 index)
if (wearable)
{
mWearableDatas[type].erase(mWearableDatas[type].begin() + index);
- const BOOL removed = TRUE;
+ const bool removed = true;
wearableUpdated(wearable, removed);
}
}
@@ -211,7 +211,7 @@ void LLWearableData::pullCrossWearableValues(const LLWearableType::EType type)
}
-BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_found) const
+bool LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_found) const
{
if (wearable == NULL)
{
@@ -253,7 +253,7 @@ U32 LLWearableData::getClothingLayerCount() const
return count;
}
-BOOL LLWearableData::canAddWearable(const LLWearableType::EType type) const
+bool LLWearableData::canAddWearable(const LLWearableType::EType type) const
{
LLAssetType::EType a_type = LLWearableType::getInstance()->getAssetType(type);
if (a_type==LLAssetType::AT_CLOTHING)
@@ -271,7 +271,7 @@ BOOL LLWearableData::canAddWearable(const LLWearableType::EType type) const
}
}
-BOOL LLWearableData::isOnTop(LLWearable* wearable) const
+bool LLWearableData::isOnTop(LLWearable* wearable) const
{
if (!wearable) return false;
const LLWearableType::EType type = wearable->getType();
@@ -357,7 +357,7 @@ U32 LLWearableData::getWearableCount(const U32 tex_index) const
// [Legacy Bake]
LLUUID LLWearableData::computeBakedTextureHash(LLAvatarAppearanceDefines::EBakedTextureIndex baked_index,
- BOOL generate_valid_hash) // Set to false if you want to upload the baked texture w/o putting it in the cache
+ bool generate_valid_hash) // Set to false if you want to upload the baked texture w/o putting it in the cache
{
LLUUID hash_id;
bool hash_computed = false;
diff --git a/indra/llappearance/llwearabledata.h b/indra/llappearance/llwearabledata.h
index 8ecf29a7a0..5a746d2993 100644
--- a/indra/llappearance/llwearabledata.h
+++ b/indra/llappearance/llwearabledata.h
@@ -60,11 +60,11 @@ public:
const LLWearable* getBottomWearable(const LLWearableType::EType type) const;
U32 getWearableCount(const LLWearableType::EType type) const;
U32 getWearableCount(const U32 tex_index) const;
- BOOL getWearableIndex(const LLWearable *wearable, U32& index) const;
+ bool getWearableIndex(const LLWearable *wearable, U32& index) const;
U32 getClothingLayerCount() const;
- BOOL canAddWearable(const LLWearableType::EType type) const;
+ bool canAddWearable(const LLWearableType::EType type) const;
- BOOL isOnTop(LLWearable* wearable) const;
+ bool isOnTop(LLWearable* wearable) const;
static const U32 MAX_CLOTHING_LAYERS = 60;
@@ -76,7 +76,7 @@ protected:
void setWearable(const LLWearableType::EType type, U32 index, LLWearable *wearable);
void pushWearable(const LLWearableType::EType type, LLWearable *wearable,
bool trigger_updated = true);
- virtual void wearableUpdated(LLWearable *wearable, BOOL removed);
+ virtual void wearableUpdated(LLWearable *wearable, bool removed);
void eraseWearable(LLWearable *wearable);
void eraseWearable(const LLWearableType::EType type, U32 index);
// void clearWearableType(const LLWearableType::EType type);
@@ -91,7 +91,7 @@ private:
//--------------------------------------------------------------------
public:
LLUUID computeBakedTextureHash(LLAvatarAppearanceDefines::EBakedTextureIndex baked_index,
- BOOL generate_valid_hash = TRUE);
+ bool generate_valid_hash = true);
protected:
virtual void invalidateBakedTextureHash(LLMD5& hash) const {}
// [Legacy Bake]
diff --git a/indra/llappearance/llwearabletype.cpp b/indra/llappearance/llwearabletype.cpp
index 209b13d490..e71a3cf611 100644
--- a/indra/llappearance/llwearabletype.cpp
+++ b/indra/llappearance/llwearabletype.cpp
@@ -32,30 +32,30 @@
LLWearableType::LLWearableDictionary::LLWearableDictionary(LLTranslationBridge::ptr_t& trans)
{
- addEntry(LLWearableType::WT_SHAPE, new WearableEntry(trans, "shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, FALSE, FALSE));
- addEntry(LLWearableType::WT_SKIN, new WearableEntry(trans, "skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, FALSE, FALSE));
- addEntry(LLWearableType::WT_HAIR, new WearableEntry(trans, "hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, FALSE, FALSE));
- addEntry(LLWearableType::WT_EYES, new WearableEntry(trans, "eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, FALSE, FALSE));
- addEntry(LLWearableType::WT_SHIRT, new WearableEntry(trans, "shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, FALSE, TRUE));
- addEntry(LLWearableType::WT_PANTS, new WearableEntry(trans, "pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, FALSE, TRUE));
- addEntry(LLWearableType::WT_SHOES, new WearableEntry(trans, "shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, FALSE, TRUE));
- addEntry(LLWearableType::WT_SOCKS, new WearableEntry(trans, "socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, FALSE, TRUE));
- addEntry(LLWearableType::WT_JACKET, new WearableEntry(trans, "jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, FALSE, TRUE));
- addEntry(LLWearableType::WT_GLOVES, new WearableEntry(trans, "gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, FALSE, TRUE));
- addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(trans, "undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, FALSE, TRUE));
- addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(trans, "underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, FALSE, TRUE));
- addEntry(LLWearableType::WT_SKIRT, new WearableEntry(trans, "skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE));
- addEntry(LLWearableType::WT_ALPHA, new WearableEntry(trans, "alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
- addEntry(LLWearableType::WT_TATTOO, new WearableEntry(trans, "tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
- addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(trans, "universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, FALSE, TRUE));
+ addEntry(LLWearableType::WT_SHAPE, new WearableEntry(trans, "shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, false, false));
+ addEntry(LLWearableType::WT_SKIN, new WearableEntry(trans, "skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, false, false));
+ addEntry(LLWearableType::WT_HAIR, new WearableEntry(trans, "hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, false, false));
+ addEntry(LLWearableType::WT_EYES, new WearableEntry(trans, "eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, false, false));
+ addEntry(LLWearableType::WT_SHIRT, new WearableEntry(trans, "shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, false, true));
+ addEntry(LLWearableType::WT_PANTS, new WearableEntry(trans, "pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, false, true));
+ addEntry(LLWearableType::WT_SHOES, new WearableEntry(trans, "shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, false, true));
+ addEntry(LLWearableType::WT_SOCKS, new WearableEntry(trans, "socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, false, true));
+ addEntry(LLWearableType::WT_JACKET, new WearableEntry(trans, "jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, false, true));
+ addEntry(LLWearableType::WT_GLOVES, new WearableEntry(trans, "gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, false, true));
+ addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(trans, "undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, false, true));
+ addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(trans, "underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, false, true));
+ addEntry(LLWearableType::WT_SKIRT, new WearableEntry(trans, "skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, false, true));
+ addEntry(LLWearableType::WT_ALPHA, new WearableEntry(trans, "alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, false, true));
+ addEntry(LLWearableType::WT_TATTOO, new WearableEntry(trans, "tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, false, true));
+ addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(trans, "universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, false, true));
// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-2.6)
- addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));
+ addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, true, false));
// [/SL:KB]
-// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
+// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, true, true));
- addEntry(LLWearableType::WT_INVALID, new WearableEntry(trans, "invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_UNKNOWN, FALSE, FALSE));
- addEntry(LLWearableType::WT_NONE, new WearableEntry(trans, "none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
+ addEntry(LLWearableType::WT_INVALID, new WearableEntry(trans, "invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_UNKNOWN, false, false));
+ addEntry(LLWearableType::WT_NONE, new WearableEntry(trans, "none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, false, false));
}
@@ -115,14 +115,14 @@ LLInventoryType::EIconName LLWearableType::getIconName(LLWearableType::EType typ
return entry->mIconName;
}
-BOOL LLWearableType::getDisableCameraSwitch(LLWearableType::EType type)
+bool LLWearableType::getDisableCameraSwitch(LLWearableType::EType type)
{
const WearableEntry *entry = mDictionary.lookup(type);
if (!entry) return false;
return entry->mDisableCameraSwitch;
}
-BOOL LLWearableType::getAllowMultiwear(LLWearableType::EType type)
+bool LLWearableType::getAllowMultiwear(LLWearableType::EType type)
{
const WearableEntry *entry = mDictionary.lookup(type);
if (!entry) return false;
diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h
index 11beda624a..92fc626b72 100644
--- a/indra/llappearance/llwearabletype.h
+++ b/indra/llappearance/llwearabletype.h
@@ -72,8 +72,8 @@ public:
LLAssetType::EType getAssetType(EType type);
EType typeNameToType(const std::string& type_name);
LLInventoryType::EIconName getIconName(EType type);
- BOOL getDisableCameraSwitch(EType type);
- BOOL getAllowMultiwear(EType type);
+ bool getDisableCameraSwitch(EType type);
+ bool getAllowMultiwear(EType type);
static EType inventoryFlagsToWearableType(U32 flags);
@@ -85,8 +85,8 @@ private:
const std::string& default_new_name,
LLAssetType::EType assetType,
LLInventoryType::EIconName iconName,
- BOOL disable_camera_switch = FALSE,
- BOOL allow_multiwear = TRUE) :
+ bool disable_camera_switch = false,
+ bool allow_multiwear = true) :
LLDictionaryEntry(name),
mAssetType(assetType),
mDefaultNewName(default_new_name),
@@ -101,8 +101,8 @@ private:
const std::string mLabel;
const std::string mDefaultNewName;
LLInventoryType::EIconName mIconName;
- BOOL mDisableCameraSwitch;
- BOOL mAllowMultiwear;
+ bool mDisableCameraSwitch;
+ bool mAllowMultiwear;
};
class LLWearableDictionary : public LLDictionary
diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp
index c476a30fb5..0531428c5d 100644
--- a/indra/llcharacter/llanimationstates.cpp
+++ b/indra/llcharacter/llanimationstates.cpp
@@ -369,7 +369,7 @@ const char *LLAnimationLibrary::animStateToString( const LLUUID& state )
//-----------------------------------------------------------------------------
// Return the animation state for a given name
//-----------------------------------------------------------------------------
-LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, BOOL allow_ids )
+LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, bool allow_ids )
{
std::string lower_case_name(name);
LLStringUtil::toLower(lower_case_name);
@@ -393,7 +393,7 @@ LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, BOOL allo
else if (allow_ids)
{
// try to convert string to LLUUID
- id.set(name, FALSE);
+ id.set(name, false);
}
return id;
diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h
index 35db6fbf44..ff0534bae6 100644
--- a/indra/llcharacter/llanimationstates.h
+++ b/indra/llcharacter/llanimationstates.h
@@ -223,7 +223,7 @@ public:
// Return the animation state for the given name.
// Retun NULL if the name is invalid.
//-----------------------------------------------------------------------------
- LLUUID stringToAnimState( const std::string& name, BOOL allow_ids = TRUE );
+ LLUUID stringToAnimState( const std::string& name, bool allow_ids = true );
//-----------------------------------------------------------------------------
// Associate an anim state with a name
diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp
index d03d3d8958..83266a3f43 100644
--- a/indra/llcharacter/llbvhloader.cpp
+++ b/indra/llcharacter/llbvhloader.cpp
@@ -184,7 +184,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error
LL_DEBUGS("BVH") << "After translations and optimize" << LL_ENDL;
dumpBVHInfo();
- mInitialized = TRUE;
+ mInitialized = true;
}
@@ -232,7 +232,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName)
//--------------------------------------------------------------------
// load data one line at a time
//--------------------------------------------------------------------
- BOOL loadingGlobals = FALSE;
+ bool loadingGlobals = false;
while ( getLine(fp) )
{
//----------------------------------------------------------------
@@ -256,7 +256,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName)
if (strcmp(name, "GLOBALS")==0)
{
- loadingGlobals = TRUE;
+ loadingGlobals = true;
continue;
}
}
@@ -303,7 +303,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName)
if ( sscanf(mLine, " %*s = %f %f", &loop_in, &loop_out) == 2 )
{
- mLoop = TRUE;
+ mLoop = true;
}
else if ( sscanf(mLine, " %*s = %127s", trueFalse) == 1 ) /* Flawfinder: ignore */
{
@@ -501,8 +501,8 @@ void LLBVHLoader::makeTranslation(std::string alias_name, std::string joint_name
if (joint_name == "mPelvis")
{
- newTrans.mRelativePositionKey = TRUE;
- newTrans.mRelativeRotationKey = TRUE;
+ newTrans.mRelativePositionKey = true;
+ newTrans.mRelativeRotationKey = true;
}
}
@@ -614,7 +614,7 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 &
//--------------------------------------------------------------------
// consume joints
//--------------------------------------------------------------------
- while (TRUE)
+ while (true)
{
//----------------------------------------------------------------
// get next line
@@ -974,7 +974,7 @@ void LLBVHLoader::applyTranslations()
if ( trans.mIgnore )
{
//LL_INFOS() << "NOTE: Ignoring " << joint->mName.c_str() << LL_ENDL;
- joint->mIgnore = TRUE;
+ joint->mIgnore = true;
continue;
}
@@ -988,10 +988,10 @@ void LLBVHLoader::applyTranslations()
}
//Allow joint position changes as of SL-318
- joint->mIgnorePositions = FALSE;
+ joint->mIgnorePositions = false;
if (joint->mNumChannels == 3)
{
- joint->mIgnorePositions = TRUE;
+ joint->mIgnorePositions = true;
}
//----------------------------------------------------------------
@@ -1000,13 +1000,13 @@ void LLBVHLoader::applyTranslations()
if ( trans.mRelativePositionKey )
{
// LL_INFOS() << "NOTE: Removing 1st position offset from all keys for " << joint->mOutName.c_str() << LL_ENDL;
- joint->mRelativePositionKey = TRUE;
+ joint->mRelativePositionKey = true;
}
if ( trans.mRelativeRotationKey )
{
// LL_INFOS() << "NOTE: Removing 1st rotation from all keys for " << joint->mOutName.c_str() << LL_ENDL;
- joint->mRelativeRotationKey = TRUE;
+ joint->mRelativeRotationKey = true;
}
if ( trans.mRelativePosition.magVec() > 0.0f )
@@ -1070,8 +1070,8 @@ void LLBVHLoader::optimize()
for (Joint* joint : mJoints)
{
- BOOL pos_changed = FALSE;
- BOOL rot_changed = FALSE;
+ bool pos_changed = false;
+ bool rot_changed = false;
if ( ! joint->mIgnore )
{
@@ -1084,7 +1084,7 @@ void LLBVHLoader::optimize()
// no keys?
if (first_key == joint->mKeys.end())
{
- joint->mIgnore = TRUE;
+ joint->mIgnore = true;
continue;
}
@@ -1097,13 +1097,13 @@ void LLBVHLoader::optimize()
{
// *FIX: use single frame to move pelvis
// if only one keyframe force output for this joint
- rot_changed = TRUE;
+ rot_changed = true;
}
else
{
// if more than one keyframe, use first frame as reference and skip to second
- first_key->mIgnorePos = TRUE;
- first_key->mIgnoreRot = TRUE;
+ first_key->mIgnorePos = true;
+ first_key->mIgnoreRot = true;
++ki;
}
@@ -1124,7 +1124,7 @@ void LLBVHLoader::optimize()
joint->mNumPosKeys++;
if (dist_vec_squared(LLVector3(ki_prev->mPos), first_frame_pos) > POSITION_MOTION_THRESHOLD_SQUARED)
{
- pos_changed = TRUE;
+ pos_changed = true;
}
}
else
@@ -1137,12 +1137,12 @@ void LLBVHLoader::optimize()
if (dist_vec_squared(current_pos, first_frame_pos) > POSITION_MOTION_THRESHOLD_SQUARED)
{
- pos_changed = TRUE;
+ pos_changed = true;
}
if (dist_vec_squared(interp_pos, test_pos) < POSITION_KEYFRAME_THRESHOLD_SQUARED)
{
- ki_prev->mIgnorePos = TRUE;
+ ki_prev->mIgnorePos = true;
numPosFramesConsidered++;
}
else
@@ -1163,7 +1163,7 @@ void LLBVHLoader::optimize()
if (rot_test > ROTATION_MOTION_THRESHOLD)
{
- rot_changed = TRUE;
+ rot_changed = true;
}
}
else
@@ -1185,7 +1185,7 @@ void LLBVHLoader::optimize()
rot_test = x_delta + y_delta;
if (rot_test > ROTATION_MOTION_THRESHOLD)
{
- rot_changed = TRUE;
+ rot_changed = true;
}
x_delta = dist_vec(LLVector3::x_axis * interp_rot, LLVector3::x_axis * test_rot);
y_delta = dist_vec(LLVector3::y_axis * interp_rot, LLVector3::y_axis * test_rot);
@@ -1207,9 +1207,9 @@ void LLBVHLoader::optimize()
// because it's significantly faster.
if (diff_max > 0)
{
- if (ki_max->mIgnoreRot == TRUE)
+ if (ki_max->mIgnoreRot == true)
{
- ki_max->mIgnoreRot = FALSE;
+ ki_max->mIgnoreRot = false;
joint->mNumRotKeys++;
}
diff_max = 0;
@@ -1218,7 +1218,7 @@ void LLBVHLoader::optimize()
else
{
// This keyframe isn't significant enough, throw it away.
- ki_prev->mIgnoreRot = TRUE;
+ ki_prev->mIgnoreRot = true;
numRotFramesConsidered++;
// Store away the keyframe that has the largest deviation from the interpolated line, for insertion later.
if (rot_test > diff_max)
@@ -1237,7 +1237,7 @@ void LLBVHLoader::optimize()
if (!(pos_changed || rot_changed))
{
//LL_INFOS() << "Ignoring joint " << joint->mName << LL_ENDL;
- joint->mIgnore = TRUE;
+ joint->mIgnore = true;
}
}
}
@@ -1250,13 +1250,13 @@ void LLBVHLoader::reset()
mDuration = 0.0f;
mPriority = 2;
- mLoop = FALSE;
+ mLoop = false;
mLoopInPoint = 0.f;
mLoopOutPoint = 0.f;
mEaseIn = 0.3f;
mEaseOut = 0.3f;
mHand = 1;
- mInitialized = FALSE;
+ mInitialized = false;
mEmoteName = "";
mLineNumber = 0;
@@ -1269,8 +1269,8 @@ void LLBVHLoader::reset()
//------------------------------------------------------------------------
// Remove LLVolatileAPRPool/apr_file_t and use FILE* instead
-//BOOL LLBVHLoader::getLine(apr_file_t* fp)
-BOOL LLBVHLoader::getLine(LLAPRFile::tFiletype* fp)
+//bool LLBVHLoader::getLine(apr_file_t* fp)
+bool LLBVHLoader::getLine(LLAPRFile::tFiletype* fp)
//
{
if (apr_file_eof(fp) == APR_EOF)
@@ -1296,7 +1296,7 @@ U32 LLBVHLoader::getOutputSize()
}
// writes contents to datapacker
-BOOL LLBVHLoader::serialize(LLDataPacker& dp)
+bool LLBVHLoader::serialize(LLDataPacker& dp)
{
F32 time;
diff --git a/indra/llcharacter/llbvhloader.h b/indra/llcharacter/llbvhloader.h
index 18f25cdc50..0213d3a323 100644
--- a/indra/llcharacter/llbvhloader.h
+++ b/indra/llcharacter/llbvhloader.h
@@ -71,8 +71,8 @@ struct Key
F32 mPos[3];
F32 mRot[3];
- BOOL mIgnorePos;
- BOOL mIgnoreRot;
+ bool mIgnorePos;
+ bool mIgnoreRot;
};
@@ -89,10 +89,10 @@ struct Joint
Joint(const char *name)
{
mName = name;
- mIgnore = FALSE;
- mIgnorePositions = FALSE;
- mRelativePositionKey = FALSE;
- mRelativeRotationKey = FALSE;
+ mIgnore = false;
+ mIgnorePositions = false;
+ mRelativePositionKey = false;
+ mRelativeRotationKey = false;
mOutName = name;
mOrder[0] = 'X';
mOrder[1] = 'Y';
@@ -111,10 +111,10 @@ struct Joint
LLVector3 mRelativePosition;
//
std::string mName;
- BOOL mIgnore;
- BOOL mIgnorePositions;
- BOOL mRelativePositionKey;
- BOOL mRelativeRotationKey;
+ bool mIgnore;
+ bool mIgnorePositions;
+ bool mRelativePositionKey;
+ bool mRelativeRotationKey;
std::string mOutName;
std::string mMergeParentName;
std::string mMergeChildName;
@@ -161,18 +161,18 @@ class Translation
public:
Translation()
{
- mIgnore = FALSE;
- mIgnorePositions = FALSE;
- mRelativePositionKey = FALSE;
- mRelativeRotationKey = FALSE;
+ mIgnore = false;
+ mIgnorePositions = false;
+ mRelativePositionKey = false;
+ mRelativeRotationKey = false;
mPriorityModifier = 0;
}
std::string mOutName;
- BOOL mIgnore;
- BOOL mIgnorePositions;
- BOOL mRelativePositionKey;
- BOOL mRelativeRotationKey;
+ bool mIgnore;
+ bool mIgnorePositions;
+ bool mRelativePositionKey;
+ bool mRelativeRotationKey;
LLMatrix3 mFrameMatrix;
LLMatrix3 mOffsetMatrix;
LLVector3 mRelativePosition;
@@ -293,7 +293,7 @@ public:
U32 getOutputSize();
// writes contents to datapacker
- BOOL serialize(LLDataPacker& dp);
+ bool serialize(LLDataPacker& dp);
// flags redundant keyframe data
void optimize();
@@ -302,7 +302,7 @@ public:
F32 getDuration() { return mDuration; }
- BOOL isInitialized() { return mInitialized; }
+ bool isInitialized() { return mInitialized; }
ELoadStatus getStatus() { return mStatus; }
@@ -312,10 +312,9 @@ public:
protected:
// Consumes one line of input from file.
-
// Remove LLVolatileAPRPool/apr_file_t and use FILE* instead
- // BOOL getLine(apr_file_t *fp);
- BOOL getLine(LLAPRFile::tFiletype *fp);
+ // bool getLine(apr_file_t *fp);
+ bool getLine(LLAPRFile::tFiletype *fp);
//
// parser state
@@ -330,7 +329,7 @@ protected:
TranslationMap mTranslations;
S32 mPriority;
- BOOL mLoop;
+ bool mLoop;
F32 mLoopInPoint;
F32 mLoopOutPoint;
F32 mEaseIn;
@@ -338,7 +337,7 @@ protected:
S32 mHand;
std::string mEmoteName;
- BOOL mInitialized;
+ bool mInitialized;
ELoadStatus mStatus;
// computed values
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp
index 9460498fc9..8f66ac6826 100644
--- a/indra/llcharacter/llcharacter.cpp
+++ b/indra/llcharacter/llcharacter.cpp
@@ -39,7 +39,7 @@
LLStringTable LLCharacter::sVisualParamNames(1024);
std::vector< LLCharacter* > LLCharacter::sInstances;
-BOOL LLCharacter::sAllowInstancesChange = TRUE ;
+bool LLCharacter::sAllowInstancesChange = true ;
//-----------------------------------------------------------------------------
// LLCharacter()
@@ -122,7 +122,7 @@ LLJoint *LLCharacter::getJoint( const JointKey &name )
//-----------------------------------------------------------------------------
// registerMotion()
//-----------------------------------------------------------------------------
-BOOL LLCharacter::registerMotion( const LLUUID& id, LLMotionConstructor create )
+bool LLCharacter::registerMotion( const LLUUID& id, LLMotionConstructor create )
{
return mMotionController.registerMotion(id, create);
}
@@ -155,7 +155,7 @@ LLMotion* LLCharacter::createMotion( const LLUUID &id )
//-----------------------------------------------------------------------------
// startMotion()
//-----------------------------------------------------------------------------
-BOOL LLCharacter::startMotion(const LLUUID &id, F32 start_offset)
+bool LLCharacter::startMotion(const LLUUID &id, F32 start_offset)
{
return mMotionController.startMotion(id, start_offset);
}
@@ -164,7 +164,7 @@ BOOL LLCharacter::startMotion(const LLUUID &id, F32 start_offset)
//-----------------------------------------------------------------------------
// stopMotion()
//-----------------------------------------------------------------------------
-BOOL LLCharacter::stopMotion(const LLUUID& id, BOOL stop_immediate)
+bool LLCharacter::stopMotion(const LLUUID& id, bool stop_immediate)
{
return mMotionController.stopMotionLocally(id, stop_immediate);
}
@@ -172,7 +172,7 @@ BOOL LLCharacter::stopMotion(const LLUUID& id, BOOL stop_immediate)
//-----------------------------------------------------------------------------
// isMotionActive()
//-----------------------------------------------------------------------------
-BOOL LLCharacter::isMotionActive(const LLUUID& id)
+bool LLCharacter::isMotionActive(const LLUUID& id)
{
LLMotion *motionp = mMotionController.findMotion(id);
if (motionp)
@@ -288,8 +288,8 @@ void LLCharacter::removeAnimationData(std::string name)
// setVisualParamWeight()
//-----------------------------------------------------------------------------
// [Legacy Bake]
-//BOOL LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 weight)
-BOOL LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 weight, BOOL upload_bake)
+//bool LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 weight)
+bool LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 weight, bool upload_bake)
{
S32 index = which_param->getID();
visual_param_index_map_t::iterator index_iter = mVisualParamIndexMap.find(index);
@@ -307,8 +307,8 @@ BOOL LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 wei
// setVisualParamWeight()
//-----------------------------------------------------------------------------
// [Legacy Bake]
-//BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight)
-BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake)
+//bool LLCharacter::setVisualParamWeight(const char* param_name, F32 weight)
+bool LLCharacter::setVisualParamWeight(const char* param_name, F32 weight, bool upload_bake)
{
std::string tname(param_name);
LLStringUtil::toLower(tname);
@@ -329,8 +329,8 @@ BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight, BOOL
// setVisualParamWeight()
//-----------------------------------------------------------------------------
// [Legacy Bake]
-//BOOL LLCharacter::setVisualParamWeight(S32 index, F32 weight)
-BOOL LLCharacter::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake)
+//bool LLCharacter::setVisualParamWeight(S32 index, F32 weight)
+bool LLCharacter::setVisualParamWeight(S32 index, F32 weight, bool upload_bake)
{
visual_param_index_map_t::iterator index_iter = mVisualParamIndexMap.find(index);
if (index_iter != mVisualParamIndexMap.end())
@@ -409,7 +409,7 @@ void LLCharacter::clearVisualParamWeights()
{
// [Legacy Bake]
//param->setWeight( param->getDefaultWeight());
- param->setWeight( param->getDefaultWeight(), FALSE);
+ param->setWeight( param->getDefaultWeight(), false);
}
}
}
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index e08695ea9f..8ae5c475b5 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -131,7 +131,7 @@ public:
//-------------------------------------------------------------------------
// registers a motion with the character
// returns true if successfull
- BOOL registerMotion( const LLUUID& id, LLMotionConstructor create );
+ bool registerMotion( const LLUUID& id, LLMotionConstructor create );
void removeMotion( const LLUUID& id );
@@ -143,13 +143,13 @@ public:
// start a motion
// returns true if successful, false if an error occurred
- virtual BOOL startMotion( const LLUUID& id, F32 start_offset = 0.f);
+ virtual bool startMotion( const LLUUID& id, F32 start_offset = 0.f);
// stop a motion
- virtual BOOL stopMotion( const LLUUID& id, BOOL stop_immediate = FALSE );
+ virtual bool stopMotion( const LLUUID& id, bool stop_immediate = false );
// is this motion active?
- BOOL isMotionActive( const LLUUID& id );
+ bool isMotionActive( const LLUUID& id );
// Event handler for motion deactivation.
// Called when a motion has completely stopped and has been deactivated.
@@ -162,7 +162,7 @@ public:
void updateMotions(e_update_t update_type);
LLAnimPauseRequest requestPause();
- BOOL areAnimationsPaused() const { return mMotionController.isPaused(); }
+ bool areAnimationsPaused() const { return mMotionController.isPaused(); }
void setAnimTimeFactor(F32 factor) { mMotionController.setTimeFactor(factor); }
void setTimeStep(F32 time_step) { mMotionController.setTimeStep(time_step); }
@@ -197,12 +197,12 @@ public:
void addSharedVisualParam(LLVisualParam *param);
// [Legacy Bake]
- //virtual BOOL setVisualParamWeight(const LLVisualParam *which_param, F32 weight);
- //virtual BOOL setVisualParamWeight(const char* param_name, F32 weight);
- //virtual BOOL setVisualParamWeight(S32 index, F32 weight);
- virtual BOOL setVisualParamWeight(const LLVisualParam *which_param, F32 weight, BOOL upload_bake = FALSE );
- virtual BOOL setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake = FALSE );
- virtual BOOL setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake = FALSE );
+ //virtual bool setVisualParamWeight(const LLVisualParam *which_param, F32 weight);
+ //virtual bool setVisualParamWeight(const char* param_name, F32 weight);
+ //virtual bool setVisualParamWeight(S32 index, F32 weight);
+ virtual bool setVisualParamWeight(const LLVisualParam *which_param, F32 weight, bool upload_bake = false );
+ virtual bool setVisualParamWeight(const char* param_name, F32 weight, bool upload_bake = false );
+ virtual bool setVisualParamWeight(S32 index, F32 weight, bool upload_bake = false );
// [Legacy Bake]
// get visual param weight by param or name
@@ -267,7 +267,7 @@ public:
void setSkeletonSerialNum( U32 num ) { mSkeletonSerialNum = num; }
static std::vector< LLCharacter* > sInstances;
- static BOOL sAllowInstancesChange ; //debug use
+ static bool sAllowInstancesChange ; //debug use
virtual void setHoverOffset(const LLVector3& hover_offset, bool send_update=true) { mHoverOffset = hover_offset; }
const LLVector3& getHoverOffset() const { return mHoverOffset; }
diff --git a/indra/llcharacter/lleditingmotion.cpp b/indra/llcharacter/lleditingmotion.cpp
index cf6438aad9..0eed1ab39e 100644
--- a/indra/llcharacter/lleditingmotion.cpp
+++ b/indra/llcharacter/lleditingmotion.cpp
@@ -141,7 +141,7 @@ LLMotion::LLMotionInitStatus LLEditingMotion::onInitialize(LLCharacter *characte
//-----------------------------------------------------------------------------
// LLEditingMotion::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLEditingMotion::onActivate()
+bool LLEditingMotion::onActivate()
{
// propagate joint positions to kinematic chain
// SL-315
@@ -161,14 +161,14 @@ BOOL LLEditingMotion::onActivate()
//-----------------------------------------------------------------------------
// LLEditingMotion::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask)
+bool LLEditingMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
LLVector3 focus_pt;
LLVector3* pointAtPt = (LLVector3*)mCharacter->getAnimationData("PointAtPoint");
- BOOL result = true;
+ bool result = true;
if (!pointAtPt)
{
diff --git a/indra/llcharacter/lleditingmotion.h b/indra/llcharacter/lleditingmotion.h
index 63295983e0..de78c47da6 100644
--- a/indra/llcharacter/lleditingmotion.h
+++ b/indra/llcharacter/lleditingmotion.h
@@ -94,14 +94,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate();
+ virtual bool onActivate();
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp
index d0c4139da7..b36b83e75e 100644
--- a/indra/llcharacter/llgesture.cpp
+++ b/indra/llcharacter/llgesture.cpp
@@ -91,14 +91,14 @@ const LLGesture &LLGesture::operator =(const LLGesture &rhs)
}
-BOOL LLGesture::trigger(KEY key, MASK mask)
+bool LLGesture::trigger(KEY key, MASK mask)
{
LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL;
return false;
}
-BOOL LLGesture::trigger(const std::string& trigger_string)
+bool LLGesture::trigger(const std::string& trigger_string)
{
LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL;
return false;
@@ -189,12 +189,12 @@ void LLGestureList::deleteAll()
// Iterates through space delimited tokens in string, triggering any gestures found.
// Generates a revised string that has the found tokens replaced by their replacement strings
// and (as a minor side effect) has multiple spaces in a row replaced by single spaces.
-BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::string* revised_string)
+bool LLGestureList::triggerAndReviseString(const std::string &string, std::string* revised_string)
{
std::string tokenized = string;
- BOOL found_gestures = FALSE;
- BOOL first_token = TRUE;
+ bool found_gestures = false;
+ bool first_token = true;
typedef boost::tokenizer > tokenizer;
boost::char_separator sep(" ");
@@ -235,7 +235,7 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin
}
}
- found_gestures = TRUE;
+ found_gestures = true;
break;
}
gesture = NULL;
@@ -251,14 +251,14 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin
revised_string->append( cur_token );
}
- first_token = FALSE;
+ first_token = false;
}
return found_gestures;
}
-BOOL LLGestureList::trigger(KEY key, MASK mask)
+bool LLGestureList::trigger(KEY key, MASK mask)
{
for (U32 i = 0; i < mList.size(); i++)
{
diff --git a/indra/llcharacter/llgesture.h b/indra/llcharacter/llgesture.h
index cfb489f727..22db9bc565 100644
--- a/indra/llcharacter/llgesture.h
+++ b/indra/llcharacter/llgesture.h
@@ -55,10 +55,10 @@ public:
const std::string& getOutputString() const { return mOutputString; }
// Triggers if a key/mask matches it
- virtual BOOL trigger(KEY key, MASK mask);
+ virtual bool trigger(KEY key, MASK mask);
// Triggers if case-insensitive substring matches (assumes string is lowercase)
- virtual BOOL trigger(const std::string &string);
+ virtual bool trigger(const std::string &string);
// non-endian-neutral serialization
U8 *serialize(U8 *buffer) const;
@@ -84,10 +84,10 @@ public:
virtual ~LLGestureList();
// Triggers if a key/mask matches one in the list
- BOOL trigger(KEY key, MASK mask);
+ bool trigger(KEY key, MASK mask);
// Triggers if substring matches and generates revised string.
- BOOL triggerAndReviseString(const std::string &string, std::string* revised_string);
+ bool triggerAndReviseString(const std::string &string, std::string* revised_string);
// Used for construction from UI
S32 count() const { return mList.size(); }
diff --git a/indra/llcharacter/llhandmotion.cpp b/indra/llcharacter/llhandmotion.cpp
index 1aad9565fc..f74c8aa70c 100644
--- a/indra/llcharacter/llhandmotion.cpp
+++ b/indra/llcharacter/llhandmotion.cpp
@@ -98,7 +98,7 @@ LLMotion::LLMotionInitStatus LLHandMotion::onInitialize(LLCharacter *character)
//-----------------------------------------------------------------------------
// LLHandMotion::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLHandMotion::onActivate()
+bool LLHandMotion::onActivate()
{
LLPolyMesh *upperBodyMesh = mCharacter->getUpperBodyMesh();
@@ -119,7 +119,7 @@ BOOL LLHandMotion::onActivate()
//-----------------------------------------------------------------------------
// LLHandMotion::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask)
+bool LLHandMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
eHandPose *requestedHandPose;
diff --git a/indra/llcharacter/llhandmotion.h b/indra/llcharacter/llhandmotion.h
index a37e50f595..828b4851be 100644
--- a/indra/llcharacter/llhandmotion.h
+++ b/indra/llcharacter/llhandmotion.h
@@ -107,14 +107,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
- // must return TRUE to indicate success, or else
- // it will be deactivated
- virtual BOOL onActivate();
+ // must return true to indicate success, or else
+ // it will be deactivated
+ virtual bool onActivate();
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
diff --git a/indra/llcharacter/llheadrotmotion.cpp b/indra/llcharacter/llheadrotmotion.cpp
index f8350484e3..81255ac7b6 100644
--- a/indra/llcharacter/llheadrotmotion.cpp
+++ b/indra/llcharacter/llheadrotmotion.cpp
@@ -164,7 +164,7 @@ LLMotion::LLMotionInitStatus LLHeadRotMotion::onInitialize(LLCharacter *characte
//-----------------------------------------------------------------------------
// LLHeadRotMotion::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLHeadRotMotion::onActivate()
+bool LLHeadRotMotion::onActivate()
{
return true;
}
@@ -173,7 +173,7 @@ BOOL LLHeadRotMotion::onActivate()
//-----------------------------------------------------------------------------
// LLHeadRotMotion::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask)
+bool LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
LLQuaternion targetHeadRotWorld;
@@ -279,7 +279,7 @@ LLEyeMotion::LLEyeMotion(const LLUUID &id) : LLMotion(id)
mEyeLookAwayPitch = 0.f;
mEyeBlinkTime = 0.f;
- mEyesClosed = FALSE;
+ mEyesClosed = false;
mHeadJoint = NULL;
@@ -362,7 +362,7 @@ LLMotion::LLMotionInitStatus LLEyeMotion::onInitialize(LLCharacter *character)
//-----------------------------------------------------------------------------
// LLEyeMotion::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLEyeMotion::onActivate()
+bool LLEyeMotion::onActivate()
{
return true;
}
@@ -373,7 +373,7 @@ BOOL LLEyeMotion::onActivate()
void LLEyeMotion::adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_state, LLJointState& right_eye_state)
{
// Compute eye rotation.
- BOOL has_eye_target = FALSE;
+ bool has_eye_target = false;
LLQuaternion target_eye_rot;
LLVector3 eye_look_at;
F32 vergence;
@@ -385,7 +385,7 @@ void LLEyeMotion::adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_s
LLVector3 up;
eye_look_at = *targetPos;
- has_eye_target = TRUE;
+ has_eye_target = true;
F32 lookAtDistance = eye_look_at.normVec();
left.setVec(skyward % eye_look_at);
@@ -460,7 +460,7 @@ void LLEyeMotion::adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_s
//-----------------------------------------------------------------------------
// LLEyeMotion::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
+bool LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
//calculate jitter
@@ -508,7 +508,7 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
if (rightEyeBlinkMorph == 1.f)
{
- mEyesClosed = TRUE;
+ mEyesClosed = true;
mEyeBlinkTime = EYE_BLINK_CLOSE_TIME;
mEyeBlinkTimer.reset();
}
@@ -528,7 +528,7 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
if (rightEyeBlinkMorph == 0.f)
{
- mEyesClosed = FALSE;
+ mEyesClosed = false;
mEyeBlinkTime = EYE_BLINK_MIN_TIME + ll_frand(EYE_BLINK_MAX_TIME - EYE_BLINK_MIN_TIME);
mEyeBlinkTimer.reset();
}
diff --git a/indra/llcharacter/llheadrotmotion.h b/indra/llcharacter/llheadrotmotion.h
index fbc0885039..6bab1e8795 100644
--- a/indra/llcharacter/llheadrotmotion.h
+++ b/indra/llcharacter/llheadrotmotion.h
@@ -89,14 +89,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate();
+ virtual bool onActivate();
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
@@ -172,16 +172,16 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate();
+ virtual bool onActivate();
void adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_state, LLJointState& right_eye_state);
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
@@ -209,7 +209,7 @@ public:
// eye blinking
LLFrameTimer mEyeBlinkTimer;
F32 mEyeBlinkTime;
- BOOL mEyesClosed;
+ bool mEyesClosed;
};
#endif // LL_LLHEADROTMOTION_H
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 676042bcc8..6334350cfb 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -123,10 +123,10 @@ void LLJoint::init()
{
mName = "unnamed";
mParent = NULL;
- mXform.setScaleChildOffset(TRUE);
+ mXform.setScaleChildOffset(true);
mXform.setScale(LLVector3(1.0f, 1.0f, 1.0f));
mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY;
- mUpdateXform = TRUE;
+ mUpdateXform = true;
mSupport = SUPPORT_BASE;
mEnd = LLVector3(0.0f, 0.0f, 0.0f);
}
@@ -153,7 +153,7 @@ LLJoint::LLJoint(const std::string &name, LLJoint *parent) :
mJointNum(-2)
{
init();
- mUpdateXform = FALSE;
+ mUpdateXform = false;
setName(name);
if (parent)
@@ -1017,7 +1017,7 @@ void LLJoint::updateWorldMatrix()
if (mDirtyFlags & MATRIX_DIRTY)
{
sNumUpdates++;
- mXform.updateMatrix(FALSE);
+ mXform.updateMatrix(false);
mWorldMatrix.loadu(mXform.getWorldMatrix());
mDirtyFlags = 0x0;
}
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 30aa1ee89d..17cc5b99c8 100644
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -65,21 +65,21 @@ inline std::ostream& operator<<(std::ostream &aLHS, JointKey const &aRHS)
}
//
-const S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15;
+constexpr S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15;
// Need to set this to count of animate-able joints,
// currently = #bones + #collision_volumes + #attachments + 2,
// rounded to next multiple of 4.
-const U32 LL_CHARACTER_MAX_ANIMATED_JOINTS = 216; // must be divisible by 4!
-const U32 LL_MAX_JOINTS_PER_MESH_OBJECT = 110;
+constexpr U32 LL_CHARACTER_MAX_ANIMATED_JOINTS = 216; // must be divisible by 4!
+constexpr U32 LL_MAX_JOINTS_PER_MESH_OBJECT = 110;
// These should be higher than the joint_num of any
// other joint, to avoid conflicts in updateMotionsByType()
-const U32 LL_HAND_JOINT_NUM = (LL_CHARACTER_MAX_ANIMATED_JOINTS-1);
-const U32 LL_FACE_JOINT_NUM = (LL_CHARACTER_MAX_ANIMATED_JOINTS-2);
-const S32 LL_CHARACTER_MAX_PRIORITY = 7;
-const F32 LL_MAX_PELVIS_OFFSET = 5.f;
+constexpr U32 LL_HAND_JOINT_NUM = (LL_CHARACTER_MAX_ANIMATED_JOINTS-1);
+constexpr U32 LL_FACE_JOINT_NUM = (LL_CHARACTER_MAX_ANIMATED_JOINTS-2);
+constexpr S32 LL_CHARACTER_MAX_PRIORITY = 7;
+constexpr F32 LL_MAX_PELVIS_OFFSET = 5.f;
-const F32 LL_JOINT_TRESHOLD_POS_OFFSET = 0.0001f; //0.1 mm
+constexpr F32 LL_JOINT_TRESHOLD_POS_OFFSET = 0.0001f; //0.1 mm
class LLVector3OverrideMap
{
@@ -158,7 +158,7 @@ protected:
public:
U32 mDirtyFlags;
- BOOL mUpdateXform;
+ bool mUpdateXform;
// describes the skin binding pose
LLVector3 mSkinOffset;
@@ -305,7 +305,7 @@ public:
void clampRotation(LLQuaternion old_rot, LLQuaternion new_rot);
- virtual BOOL isAnimatable() const { return true; }
+ virtual bool isAnimatable() const { return true; }
void addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh_id, const std::string& av_info, bool& active_override_changed );
void removeAttachmentPosOverride( const LLUUID& mesh_id, const std::string& av_info, bool& active_override_changed );
diff --git a/indra/llcharacter/lljointsolverrp3.cpp b/indra/llcharacter/lljointsolverrp3.cpp
index f3d5e2e324..4b5d1c8894 100644
--- a/indra/llcharacter/lljointsolverrp3.cpp
+++ b/indra/llcharacter/lljointsolverrp3.cpp
@@ -53,9 +53,9 @@ LLJointSolverRP3::LLJointSolverRP3()
mLengthAB = 1.0f;
mLengthBC = 1.0f;
mPoleVector.setVec( 1.0f, 0.0f, 0.0f );
- mbUseBAxis = FALSE;
+ mbUseBAxis = false;
mTwist = 0.0f;
- mFirstTime = TRUE;
+ mFirstTime = true;
}
@@ -114,7 +114,7 @@ void LLJointSolverRP3::setBAxis( const LLVector3& bAxis )
{
mBAxis = bAxis;
mBAxis.normVec();
- mbUseBAxis = TRUE;
+ mbUseBAxis = true;
}
//-----------------------------------------------------------------------------
diff --git a/indra/llcharacter/lljointsolverrp3.h b/indra/llcharacter/lljointsolverrp3.h
index 88b5d08710..4eb814ee2b 100644
--- a/indra/llcharacter/lljointsolverrp3.h
+++ b/indra/llcharacter/lljointsolverrp3.h
@@ -97,11 +97,11 @@ protected:
LLVector3 mPoleVector;
LLVector3 mBAxis;
- BOOL mbUseBAxis;
+ bool mbUseBAxis;
F32 mTwist;
- BOOL mFirstTime;
+ bool mFirstTime;
LLMatrix4 mSavedJointAMat;
LLMatrix4 mSavedInvPlaneMat;
diff --git a/indra/llcharacter/lljointstate.h b/indra/llcharacter/lljointstate.h
index 1ccc6b5093..c01ec96450 100644
--- a/indra/llcharacter/lljointstate.h
+++ b/indra/llcharacter/lljointstate.h
@@ -80,7 +80,7 @@ public:
// joint that this state is applied to
LLJoint* getJoint() { return mJoint; }
const LLJoint* getJoint() const { return mJoint; }
- BOOL setJoint( LLJoint *joint ) { mJoint = joint; return mJoint != NULL; }
+ bool setJoint( LLJoint *joint ) { mJoint = joint; return mJoint != NULL; }
// transform type (bitwise flags can be combined)
// Note that these are set automatically when various
diff --git a/indra/llcharacter/llkeyframefallmotion.cpp b/indra/llcharacter/llkeyframefallmotion.cpp
index e8bb2bf95d..ed6dd69362 100644
--- a/indra/llcharacter/llkeyframefallmotion.cpp
+++ b/indra/llcharacter/llkeyframefallmotion.cpp
@@ -91,7 +91,7 @@ LLMotion::LLMotionInitStatus LLKeyframeFallMotion::onInitialize(LLCharacter *cha
//-----------------------------------------------------------------------------
// LLKeyframeFallMotion::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeFallMotion::onActivate()
+bool LLKeyframeFallMotion::onActivate()
{
LLVector3 ground_pos;
LLVector3 ground_normal;
@@ -119,10 +119,10 @@ BOOL LLKeyframeFallMotion::onActivate()
//-----------------------------------------------------------------------------
// LLKeyframeFallMotion::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeFallMotion::onUpdate(F32 activeTime, U8* joint_mask)
+bool LLKeyframeFallMotion::onUpdate(F32 activeTime, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
- BOOL result = LLKeyframeMotion::onUpdate(activeTime, joint_mask);
+ bool result = LLKeyframeMotion::onUpdate(activeTime, joint_mask);
F32 slerp_amt = clamp_rescale(activeTime / getDuration(), 0.5f, 0.75f, 0.f, 1.f);
if (mPelvisState.notNull())
diff --git a/indra/llcharacter/llkeyframefallmotion.h b/indra/llcharacter/llkeyframefallmotion.h
index 7f0a2fdda2..1ca1ed4dec 100644
--- a/indra/llcharacter/llkeyframefallmotion.h
+++ b/indra/llcharacter/llkeyframefallmotion.h
@@ -60,9 +60,9 @@ public:
// animation callbacks to be implemented by subclasses
//-------------------------------------------------------------------------
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
- virtual BOOL onActivate();
+ virtual bool onActivate();
virtual F32 getEaseInDuration();
- virtual BOOL onUpdate(F32 activeTime, U8* joint_mask);
+ virtual bool onUpdate(F32 activeTime, U8* joint_mask);
protected:
//-------------------------------------------------------------------------
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index b0acbbb285..fc512bd935 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -68,7 +68,7 @@ static F32 MAX_CONSTRAINTS = 10;
//-----------------------------------------------------------------------------
LLKeyframeMotion::JointMotionList::JointMotionList()
: mDuration(0.f),
- mLoop(FALSE),
+ mLoop(false),
mLoopInPoint(0.f),
mLoopOutPoint(0.f),
mEaseInDuration(0.f),
@@ -508,7 +508,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
LLAssetType::AT_ANIMATION,
onLoadComplete,
(void*)character_id,
- FALSE);
+ false);
}
else
{
@@ -568,7 +568,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
U8 *anim_data;
S32 anim_file_size;
- BOOL success = FALSE;
+ bool success = false;
LLFileSystem* anim_file = new LLFileSystem(mID, LLAssetType::AT_ANIMATION);
if (!anim_file || !anim_file->getSize())
{
@@ -623,7 +623,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
//-----------------------------------------------------------------------------
// setupPose()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeMotion::setupPose()
+bool LLKeyframeMotion::setupPose()
{
// add all valid joint states to the pose
for (U32 jm=0; jmgetNumJointMotions(); jm++)
@@ -662,7 +662,7 @@ BOOL LLKeyframeMotion::setupPose()
//-----------------------------------------------------------------------------
// LLKeyframeMotion::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeMotion::onActivate()
+bool LLKeyframeMotion::onActivate()
{
// If the keyframe anim has an associated emote, trigger it.
if( mJointMotionList->mEmoteName.length() > 0 )
@@ -683,7 +683,7 @@ BOOL LLKeyframeMotion::onActivate()
//-----------------------------------------------------------------------------
// LLKeyframeMotion::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeMotion::onUpdate(F32 time, U8* joint_mask)
+bool LLKeyframeMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// llassert(time >= 0.f); // This will fire
@@ -872,7 +872,7 @@ void LLKeyframeMotion::initializeConstraint(JointConstraint* constraint)
void LLKeyframeMotion::activateConstraint(JointConstraint* constraint)
{
JointConstraintSharedData *shared_data = constraint->mSharedData;
- constraint->mActive = TRUE;
+ constraint->mActive = true;
S32 joint_num;
// grab ground position if we need to
@@ -904,17 +904,17 @@ void LLKeyframeMotion::deactivateConstraint(JointConstraint *constraintp)
{
if (constraintp->mSourceVolume)
{
- constraintp->mSourceVolume->mUpdateXform = FALSE;
+ constraintp->mSourceVolume->mUpdateXform = false;
}
if (constraintp->mSharedData->mConstraintTargetType != CONSTRAINT_TARGET_TYPE_GROUND)
{
if (constraintp->mTargetVolume)
{
- constraintp->mTargetVolume->mUpdateXform = FALSE;
+ constraintp->mTargetVolume->mUpdateXform = false;
}
}
- constraintp->mActive = FALSE;
+ constraintp->mActive = false;
}
//-----------------------------------------------------------------------------
@@ -1091,9 +1091,9 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
// convert intermediate joint positions to world coordinates
positions[joint_num] = ( constraint->mPositions[joint_num] * mPelvisp->getWorldRotation()) + mPelvisp->getWorldPosition();
F32 time_constant = 1.f / clamp_rescale(constraint->mFixupDistanceRMS, 0.f, 0.5f, 0.2f, 8.f);
-// LL_INFOS() << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, FALSE) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL;
- positions[joint_num] = lerp(positions[joint_num], kinematic_position,
- LLSmoothInterpolation::getInterpolant(time_constant, FALSE));
+// LL_INFOS() << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, false) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL;
+ positions[joint_num] = lerp(positions[joint_num], kinematic_position,
+ LLSmoothInterpolation::getInterpolant(time_constant, false));
}
S32 iteration_count;
@@ -1228,9 +1228,9 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
// allow_invalid_joints should be true when handling existing content, to avoid breakage.
// During upload, we should be more restrictive and reject such animations.
//-----------------------------------------------------------------------------
-BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints)
+bool LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints)
{
- BOOL old_version = FALSE;
+ bool old_version = false;
std::unique_ptr joint_motion_list(new LLKeyframeMotion::JointMotionList);
//-------------------------------------------------------------------------
@@ -1254,7 +1254,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
if (version == 0 && sub_version == 1)
{
- old_version = TRUE;
+ old_version = true;
}
else if (version != KEYFRAME_MOTION_VERSION || sub_version != KEYFRAME_MOTION_SUBVERSION)
{
@@ -1355,7 +1355,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
if (female_land_anim == asset_id || formal_female_land_anim == asset_id)
{
LL_WARNS() << "Animation(" << asset_id << ") won't be looped." << LL_ENDL;
- joint_motion_list->mLoop = FALSE;
+ joint_motion_list->mLoop = false;
}
//-------------------------------------------------------------------------
@@ -1659,7 +1659,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
// scan position curve keys
//---------------------------------------------------------------------
PositionCurve *pCurve = &joint_motion->mPositionCurve;
- BOOL is_pelvis = joint_motion->mJointName == "mPelvis";
+ bool is_pelvis = joint_motion->mJointName == "mPelvis";
for (S32 k = 0; k < joint_motion->mPositionCurve.mNumKeys; k++)
{
U16 time_short;
@@ -1906,7 +1906,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
if (!constraintp->mTargetConstraintDir.isExactlyZero())
{
- constraintp->mUseTargetOffset = TRUE;
+ constraintp->mUseTargetOffset = true;
// constraintp->mTargetConstraintDir *= constraintp->mSourceConstraintOffset.magVec();
}
@@ -2001,9 +2001,9 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
//-----------------------------------------------------------------------------
// serialize()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
+bool LLKeyframeMotion::serialize(LLDataPacker& dp) const
{
- BOOL success = true;
+ bool success = true;
LL_DEBUGS("BVH") << "serializing" << LL_ENDL;
@@ -2286,7 +2286,7 @@ void LLKeyframeMotion::flushKeyframeCache()
//-----------------------------------------------------------------------------
// setLoop()
//-----------------------------------------------------------------------------
-void LLKeyframeMotion::setLoop(BOOL loop)
+void LLKeyframeMotion::setLoop(bool loop)
{
if (mJointMotionList)
{
@@ -2534,7 +2534,7 @@ LLKeyframeMotion::JointConstraint::JointConstraint(JointConstraintSharedData* sh
{
mWeight = 0.f;
mTotalLength = 0.f;
- mActive = FALSE;
+ mActive = false;
mSourceVolume = NULL;
mTargetVolume = NULL;
mFixupDistanceRMS = 0.f;
diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h
index 59a1d39a62..56c4364fd8 100644
--- a/indra/llcharacter/llkeyframemotion.h
+++ b/indra/llcharacter/llkeyframemotion.h
@@ -135,14 +135,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate();
+ virtual bool onActivate();
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
@@ -155,14 +155,14 @@ public:
public:
U32 getFileSize();
- BOOL serialize(LLDataPacker& dp) const;
- BOOL deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints = true);
- BOOL isLoaded() { return mJointMotionList != NULL; }
+ bool serialize(LLDataPacker& dp) const;
+ bool deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints = true);
+ bool isLoaded() { return mJointMotionList != NULL; }
bool dumpToFile(const std::string& name);
// setters for modifying a keyframe animation
- void setLoop(BOOL loop);
+ void setLoop(bool loop);
F32 getLoopIn() {
return (mJointMotionList) ? mJointMotionList->mLoopInPoint : 0.f;
@@ -211,7 +211,7 @@ protected:
mEaseInStopTime(0.f),
mEaseOutStartTime(0.f),
mEaseOutStopTime(0.f),
- mUseTargetOffset(FALSE),
+ mUseTargetOffset(false),
mConstraintType(CONSTRAINT_TYPE_POINT),
mConstraintTargetType(CONSTRAINT_TARGET_TYPE_BODY),
mSourceConstraintVolume(0),
@@ -231,7 +231,7 @@ protected:
F32 mEaseInStopTime;
F32 mEaseOutStartTime;
F32 mEaseOutStopTime;
- BOOL mUseTargetOffset;
+ bool mUseTargetOffset;
EConstraintType mConstraintType;
EConstraintTargetType mConstraintTargetType;
};
@@ -251,7 +251,7 @@ protected:
LLVector3 mPositions[MAX_CHAIN_LENGTH];
F32 mJointLengths[MAX_CHAIN_LENGTH];
F32 mJointLengthFractions[MAX_CHAIN_LENGTH];
- BOOL mActive;
+ bool mActive;
LLVector3d mGroundPos;
LLVector3 mGroundNorm;
LLJoint* mSourceVolume;
@@ -271,7 +271,7 @@ protected:
void applyConstraint(JointConstraint* constraintp, F32 time, U8* joint_mask);
- BOOL setupPose();
+ bool setupPose();
public:
enum AssetStatus { ASSET_LOADED, ASSET_FETCHED, ASSET_NEEDS_FETCH, ASSET_FETCH_FAILED, ASSET_UNDEFINED };
diff --git a/indra/llcharacter/llkeyframemotionparam.cpp b/indra/llcharacter/llkeyframemotionparam.cpp
index fc1eaf9103..4ea90047be 100644
--- a/indra/llcharacter/llkeyframemotionparam.cpp
+++ b/indra/llcharacter/llkeyframemotionparam.cpp
@@ -136,7 +136,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotionParam::onInitialize(LLCharacter *ch
//-----------------------------------------------------------------------------
// LLKeyframeMotionParam::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeMotionParam::onActivate()
+bool LLKeyframeMotionParam::onActivate()
{
for (motion_map_t::value_type& motion_pair : mParameterizedMotions)
{
@@ -153,7 +153,7 @@ BOOL LLKeyframeMotionParam::onActivate()
//-----------------------------------------------------------------------------
// LLKeyframeMotionParam::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
+bool LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
F32 weightFactor = 1.f / (F32)mParameterizedMotions.size();
@@ -286,7 +286,7 @@ void LLKeyframeMotionParam::onDeactivate()
//-----------------------------------------------------------------------------
// LLKeyframeMotionParam::addKeyframeMotion()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value)
+bool LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value)
{
LLMotion *newMotion = mCharacter->createMotion( id );
@@ -325,7 +325,7 @@ void LLKeyframeMotionParam::setDefaultKeyframeMotion(char *name)
//-----------------------------------------------------------------------------
// loadMotions()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeMotionParam::loadMotions()
+bool LLKeyframeMotionParam::loadMotions()
{
//-------------------------------------------------------------------------
// Load named file by concatenating the character prefix with the motion name.
@@ -409,7 +409,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
//-------------------------------------------------------------------------
// get priority
//-------------------------------------------------------------------------
- BOOL isFirstMotion = TRUE;
+ bool isFirstMotion = true;
num = sscanf(p, "%79s %79s %f", strA, strB, &floatA); /* Flawfinder: ignore */
while(1)
@@ -424,7 +424,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
addKeyframeMotion(strA, gAnimLibrary.stringToAnimState(std::string(strA)), strB, floatA);
if (isFirstMotion)
{
- isFirstMotion = FALSE;
+ isFirstMotion = false;
setDefaultKeyframeMotion(strA);
}
diff --git a/indra/llcharacter/llkeyframemotionparam.h b/indra/llcharacter/llkeyframemotionparam.h
index 3b0bc36012..553d95dbbe 100644
--- a/indra/llcharacter/llkeyframemotionparam.h
+++ b/indra/llcharacter/llkeyframemotionparam.h
@@ -102,14 +102,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate();
+ virtual bool onActivate();
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
@@ -128,12 +128,12 @@ protected:
};
// add a motion and associated parameter triplet
- BOOL addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value);
+ bool addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value);
// set default motion for LOD and retrieving blend constants
void setDefaultKeyframeMotion(char *);
- BOOL loadMotions();
+ bool loadMotions();
protected:
//-------------------------------------------------------------------------
diff --git a/indra/llcharacter/llkeyframestandmotion.cpp b/indra/llcharacter/llkeyframestandmotion.cpp
index f99492fd47..5e31d70216 100644
--- a/indra/llcharacter/llkeyframestandmotion.cpp
+++ b/indra/llcharacter/llkeyframestandmotion.cpp
@@ -46,7 +46,7 @@ const F32 POSITION_THRESHOLD = 0.1f;
//-----------------------------------------------------------------------------
LLKeyframeStandMotion::LLKeyframeStandMotion(const LLUUID &id) : LLKeyframeMotion(id)
{
- mFlipFeet = FALSE;
+ mFlipFeet = false;
mCharacter = NULL;
// create kinematic hierarchy
@@ -67,7 +67,7 @@ LLKeyframeStandMotion::LLKeyframeStandMotion(const LLUUID &id) : LLKeyframeMotio
mKneeRightState = NULL;
mAnkleRightState = NULL;
- mTrackAnkles = TRUE;
+ mTrackAnkles = true;
mFrameNum = 0;
}
@@ -90,7 +90,7 @@ LLMotion::LLMotionInitStatus LLKeyframeStandMotion::onInitialize(LLCharacter *ch
// save character pointer for later use
mCharacter = character;
- mFlipFeet = FALSE;
+ mFlipFeet = false;
// load keyframe data, setup pose and joint states
LLMotion::LLMotionInitStatus status = LLKeyframeMotion::onInitialize(character);
@@ -129,7 +129,7 @@ LLMotion::LLMotionInitStatus LLKeyframeStandMotion::onInitialize(LLCharacter *ch
//-----------------------------------------------------------------------------
// LLKeyframeStandMotion::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeStandMotion::onActivate()
+bool LLKeyframeStandMotion::onActivate()
{
//-------------------------------------------------------------------------
// setup the IK solvers
@@ -158,12 +158,12 @@ void LLKeyframeStandMotion::onDeactivate()
//-----------------------------------------------------------------------------
// LLKeyframeStandMotion::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask)
+bool LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask)
{
//-------------------------------------------------------------------------
// let the base class update the cycle
//-------------------------------------------------------------------------
- BOOL status = LLKeyframeMotion::onUpdate(time, joint_mask);
+ bool status = LLKeyframeMotion::onUpdate(time, joint_mask);
if (!status)
{
return false;
@@ -185,16 +185,16 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask)
{
mLastGoodPelvisRotation = mPelvisState->getJoint()->getWorldRotation();
mLastGoodPelvisRotation.normalize();
- mTrackAnkles = TRUE;
+ mTrackAnkles = true;
}
else if ((mCharacter->getCharacterPosition() - mLastGoodPosition).magVecSquared() > POSITION_THRESHOLD)
{
mLastGoodPosition = mCharacter->getCharacterPosition();
- mTrackAnkles = TRUE;
+ mTrackAnkles = true;
}
else if (mPose.getWeight() < 1.f)
{
- mTrackAnkles = TRUE;
+ mTrackAnkles = true;
}
diff --git a/indra/llcharacter/llkeyframestandmotion.h b/indra/llcharacter/llkeyframestandmotion.h
index 1aa5b187ba..0932a837bd 100644
--- a/indra/llcharacter/llkeyframestandmotion.h
+++ b/indra/llcharacter/llkeyframestandmotion.h
@@ -63,9 +63,9 @@ public:
// animation callbacks to be implemented by subclasses
//-------------------------------------------------------------------------
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
- virtual BOOL onActivate();
+ virtual bool onActivate();
void onDeactivate();
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ virtual bool onUpdate(F32 time, U8* joint_mask);
public:
//-------------------------------------------------------------------------
@@ -85,7 +85,7 @@ public:
LLCharacter *mCharacter;
- BOOL mFlipFeet;
+ bool mFlipFeet;
LLPointer mPelvisState;
@@ -109,7 +109,7 @@ public:
LLQuaternion mLastGoodPelvisRotation;
LLVector3 mLastGoodPosition;
- BOOL mTrackAnkles;
+ bool mTrackAnkles;
S32 mFrameNum;
} LL_ALIGN_POSTFIX(16);
diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp
index 89621ab0a9..4e7cc6acfc 100644
--- a/indra/llcharacter/llkeyframewalkmotion.cpp
+++ b/indra/llcharacter/llkeyframewalkmotion.cpp
@@ -83,7 +83,7 @@ LLMotion::LLMotionInitStatus LLKeyframeWalkMotion::onInitialize(LLCharacter *cha
//-----------------------------------------------------------------------------
// LLKeyframeWalkMotion::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeWalkMotion::onActivate()
+bool LLKeyframeWalkMotion::onActivate()
{
mRealTimeLast = 0.0f;
mAdjTimeLast = 0.0f;
@@ -103,7 +103,7 @@ void LLKeyframeWalkMotion::onDeactivate()
//-----------------------------------------------------------------------------
// LLKeyframeWalkMotion::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLKeyframeWalkMotion::onUpdate(F32 time, U8* joint_mask)
+bool LLKeyframeWalkMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
// compute time since last update
@@ -174,7 +174,7 @@ LLMotion::LLMotionInitStatus LLWalkAdjustMotion::onInitialize(LLCharacter *chara
//-----------------------------------------------------------------------------
// LLWalkAdjustMotion::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLWalkAdjustMotion::onActivate()
+bool LLWalkAdjustMotion::onActivate()
{
mAnimSpeed = 0.f;
mAdjustedSpeed = 0.f;
@@ -197,7 +197,7 @@ BOOL LLWalkAdjustMotion::onActivate()
//-----------------------------------------------------------------------------
// LLWalkAdjustMotion::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask)
+bool LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
// delta_time is guaranteed to be non zero
@@ -365,7 +365,7 @@ LLMotion::LLMotionInitStatus LLFlyAdjustMotion::onInitialize(LLCharacter *charac
//-----------------------------------------------------------------------------
// LLFlyAdjustMotion::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLFlyAdjustMotion::onActivate()
+bool LLFlyAdjustMotion::onActivate()
{
mPelvisState->setPosition(LLVector3::zero);
mPelvisState->setRotation(LLQuaternion::DEFAULT);
@@ -376,7 +376,7 @@ BOOL LLFlyAdjustMotion::onActivate()
//-----------------------------------------------------------------------------
// LLFlyAdjustMotion::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask)
+bool LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
LLVector3 ang_vel = mCharacter->getCharacterAngularVelocity() * mCharacter->getTimeDilation();
diff --git a/indra/llcharacter/llkeyframewalkmotion.h b/indra/llcharacter/llkeyframewalkmotion.h
index d9e9322c82..7539d84db1 100644
--- a/indra/llcharacter/llkeyframewalkmotion.h
+++ b/indra/llcharacter/llkeyframewalkmotion.h
@@ -65,9 +65,9 @@ public:
// animation callbacks to be implemented by subclasses
//-------------------------------------------------------------------------
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
- virtual BOOL onActivate();
+ virtual bool onActivate();
virtual void onDeactivate();
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ virtual bool onUpdate(F32 time, U8* joint_mask);
public:
//-------------------------------------------------------------------------
@@ -100,9 +100,9 @@ public:
// animation callbacks to be implemented by subclasses
//-------------------------------------------------------------------------
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
- virtual BOOL onActivate();
+ virtual bool onActivate();
virtual void onDeactivate();
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ virtual bool onUpdate(F32 time, U8* joint_mask);
virtual LLJoint::JointPriority getPriority(){return LLJoint::HIGH_PRIORITY;}
virtual bool getLoop() { return true; }
virtual F32 getDuration() { return 0.f; }
@@ -150,9 +150,9 @@ public:
// animation callbacks to be implemented by subclasses
//-------------------------------------------------------------------------
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
- virtual BOOL onActivate();
+ virtual bool onActivate();
virtual void onDeactivate() {};
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ virtual bool onUpdate(F32 time, U8* joint_mask);
virtual LLJoint::JointPriority getPriority(){return LLJoint::HIGHER_PRIORITY;}
virtual bool getLoop() { return true; }
virtual F32 getDuration() { return 0.f; }
diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp
index a3c23a9c94..a0b599663e 100644
--- a/indra/llcharacter/llmotion.cpp
+++ b/indra/llcharacter/llmotion.cpp
@@ -43,8 +43,8 @@
// Class Constructor
//-----------------------------------------------------------------------------
LLMotion::LLMotion( const LLUUID &id ) :
- mStopped(TRUE),
- mActive(FALSE),
+ mStopped(true),
+ mActive(false),
mID(id),
mActivationTimestamp(0.f),
mStopTimestamp(0.f),
@@ -132,10 +132,10 @@ void LLMotion::setDeactivateCallback( void (*cb)(void *), void* userdata )
void LLMotion::setStopTime(F32 time)
{
mStopTimestamp = time;
- mStopped = TRUE;
+ mStopped = true;
}
-BOOL LLMotion::isBlending()
+bool LLMotion::isBlending()
{
return mPose.getWeight() < 1.f;
}
@@ -146,8 +146,8 @@ BOOL LLMotion::isBlending()
void LLMotion::activate(F32 time)
{
mActivationTimestamp = time;
- mStopped = FALSE;
- mActive = TRUE;
+ mStopped = false;
+ mActive = true;
onActivate();
}
@@ -156,7 +156,7 @@ void LLMotion::activate(F32 time)
//-----------------------------------------------------------------------------
void LLMotion::deactivate()
{
- mActive = FALSE;
+ mActive = false;
mPose.setWeight(0.f);
if (mDeactivateCallback)
diff --git a/indra/llcharacter/llmotion.h b/indra/llcharacter/llmotion.h
index 1453979764..d6d7267115 100644
--- a/indra/llcharacter/llmotion.h
+++ b/indra/llcharacter/llmotion.h
@@ -91,21 +91,21 @@ public:
virtual void setStopTime(F32 time);
- BOOL isStopped() const { return mStopped; }
+ bool isStopped() const { return mStopped; }
- void setStopped(BOOL stopped) { mStopped = stopped; }
+ void setStopped(bool stopped) { mStopped = stopped; }
- BOOL isBlending();
+ bool isBlending();
// Activation functions.
// It is OK for other classes to activate a motion,
// but only the controller can deactivate it.
- // Thus, if mActive == TRUE, the motion *may* be on the controllers active list,
- // but if mActive == FALSE, the motion is gauranteed not to be on the active list.
+ // Thus, if mActive == true, the motion *may* be on the controllers active list,
+ // but if mActive == false, the motion is gauranteed not to be on the active list.
protected:
// Used by LLMotionController only
void deactivate();
- BOOL isActive() { return mActive; }
+ bool isActive() { return mActive; }
public:
void activate(F32 time);
@@ -144,15 +144,15 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character) = 0;
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 activeTime, U8* joint_mask) = 0;
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 activeTime, U8* joint_mask) = 0;
// called when a motion is deactivated
virtual void onDeactivate() = 0;
// can we crossfade this motion with a new instance when restarted?
- // should ultimately always be TRUE, but lack of emote blending, etc
+ // should ultimately always be true, but lack of emote blending, etc
// requires this
virtual bool canDeprecate();
@@ -161,16 +161,16 @@ public:
protected:
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate() = 0;
+ virtual bool onActivate() = 0;
void addJointState(const LLPointer& jointState);
protected:
LLPose mPose;
- BOOL mStopped; // motion has been stopped;
- BOOL mActive; // motion is on active list (can be stopped or not stopped)
+ bool mStopped; // motion has been stopped;
+ bool mActive; // motion is on active list (can be stopped or not stopped)
//-------------------------------------------------------------------------
// these are set implicitly by the motion controller and
@@ -208,8 +208,8 @@ public:
F32 getMinPixelArea() { return 0.f; }
LLMotionInitStatus onInitialize(LLCharacter*) { LL_INFOS() << "LLTestMotion::onInitialize()" << LL_ENDL; return STATUS_SUCCESS; }
- BOOL onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return true; }
- BOOL onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return true; }
+ bool onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return true; }
+ bool onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return true; }
void onDeactivate() { LL_INFOS() << "LLTestMotion::onDeactivate()" << LL_ENDL; }
};
@@ -251,14 +251,14 @@ public:
/*virtual*/ LLMotionInitStatus onInitialize(LLCharacter *character) { return STATUS_SUCCESS; }
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- /*virtual*/ BOOL onActivate() { return true; }
+ /*virtual*/ bool onActivate() { return true; }
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- /*virtual*/ BOOL onUpdate(F32 activeTime, U8* joint_mask) { return true; }
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ /*virtual*/ bool onUpdate(F32 activeTime, U8* joint_mask) { return true; }
// called when a motion is deactivated
/*virtual*/ void onDeactivate() {}
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp
index 36878880c7..1145f20db1 100644
--- a/indra/llcharacter/llmotioncontroller.cpp
+++ b/indra/llcharacter/llmotioncontroller.cpp
@@ -76,7 +76,7 @@ LLMotionRegistry::~LLMotionRegistry()
//-----------------------------------------------------------------------------
// addMotion()
//-----------------------------------------------------------------------------
-BOOL LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor )
+bool LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor )
{
// LL_INFOS() << "Registering motion: " << name << LL_ENDL;
if (!is_in_map(mMotionTable, id))
@@ -134,13 +134,13 @@ LLMotionController::LLMotionController()
mAnimTime(0.f),
mPrevTimerElapsed(0.f),
mLastTime(0.0f),
- mHasRunOnce(FALSE),
- mPaused(FALSE),
+ mHasRunOnce(false),
+ mPaused(false),
mPausedFrame(0),
mTimeStep(0.f),
mTimeStepCount(0),
mLastInterp(0.f),
- mIsSelf(FALSE),
+ mIsSelf(false),
mLastCountAfterPurge(0)
{
}
@@ -278,7 +278,7 @@ void LLMotionController::setTimeStep(F32 step)
LLMotion* motionp = *iter;
F32 activation_time = motionp->mActivationTimestamp;
motionp->mActivationTimestamp = (F32)(llfloor(activation_time / step)) * step;
- BOOL stopped = motionp->isStopped();
+ bool stopped = motionp->isStopped();
motionp->setStopTime((F32)(llfloor(motionp->getStopTime() / step)) * step);
motionp->setStopped(stopped);
motionp->mSendStopTimestamp = (F32)llfloor(motionp->mSendStopTimestamp / step) * step;
@@ -306,7 +306,7 @@ void LLMotionController::setCharacter(LLCharacter *character)
//-----------------------------------------------------------------------------
// registerMotion()
//-----------------------------------------------------------------------------
-BOOL LLMotionController::registerMotion( const LLUUID& id, LLMotionConstructor constructor )
+bool LLMotionController::registerMotion( const LLUUID& id, LLMotionConstructor constructor )
{
return sRegistry.registerMotion(id, constructor);
}
@@ -399,7 +399,7 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id )
//-----------------------------------------------------------------------------
// startMotion()
//-----------------------------------------------------------------------------
-BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset)
+bool LLMotionController::startMotion(const LLUUID &id, F32 start_offset)
{
// do we have an instance of this motion for this character?
LLMotion *motion = findMotion(id);
@@ -441,7 +441,7 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset)
//-----------------------------------------------------------------------------
// stopMotionLocally()
//-----------------------------------------------------------------------------
-BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate)
+bool LLMotionController::stopMotionLocally(const LLUUID &id, bool stop_immediate)
{
// if already inactive, return false
LLMotion *motion = findMotion(id);
@@ -449,7 +449,7 @@ BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate
return stopMotionInstance(motion, stop_immediate||mPaused);
}
-BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediate)
+bool LLMotionController::stopMotionInstance(LLMotion* motion, bool stop_immediate)
{
if (!motion)
{
@@ -469,7 +469,7 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat
}
else if (isMotionLoading(motion))
{
- motion->setStopped(TRUE);
+ motion->setStopped(true);
return true;
}
@@ -528,7 +528,7 @@ void LLMotionController::updateIdleMotion(LLMotion* motionp)
if (mLastTime <= motionp->mSendStopTimestamp)
{
mCharacter->requestStopMotion( motionp );
- stopMotionInstance(motionp, FALSE);
+ stopMotionInstance(motionp, false);
}
}
else if (mAnimTime >= motionp->mActivationTimestamp)
@@ -562,7 +562,7 @@ void LLMotionController::updateIdleActiveMotions()
void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
- BOOL update_result = TRUE;
+ bool update_result = true;
U8 last_joint_signature[LL_CHARACTER_MAX_ANIMATED_JOINTS];
memset(&last_joint_signature, 0, sizeof(U8) * LL_CHARACTER_MAX_ANIMATED_JOINTS);
@@ -578,11 +578,11 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
continue;
}
- BOOL update_motion = FALSE;
+ bool update_motion = false;
if (motionp->getPose()->getWeight() < 1.f)
{
- update_motion = TRUE;
+ update_motion = true;
}
else
{
@@ -594,7 +594,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
if ((*current_signature | test_signature) > (*current_signature))
{
*current_signature |= test_signature;
- update_motion = TRUE;
+ update_motion = true;
}
*((U32*)&last_joint_signature[i * 4]) = *(U32*)&(mJointSignature[1][i * 4]);
@@ -604,7 +604,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
if ((*current_signature | test_signature) > (*current_signature))
{
*current_signature |= test_signature;
- update_motion = TRUE;
+ update_motion = true;
}
}
}
@@ -630,7 +630,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
if (mLastTime <= motionp->mSendStopTimestamp)
{
mCharacter->requestStopMotion( motionp );
- stopMotionInstance(motionp, FALSE);
+ stopMotionInstance(motionp, false);
}
}
@@ -711,7 +711,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
if (mLastTime <= motionp->mSendStopTimestamp)
{
mCharacter->requestStopMotion( motionp );
- stopMotionInstance(motionp, FALSE);
+ stopMotionInstance(motionp, false);
}
}
@@ -757,12 +757,12 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
// propagate this to the network
// as not all viewers are guaranteed to have access to the same logic
mCharacter->requestStopMotion( motionp );
- stopMotionInstance(motionp, FALSE);
+ stopMotionInstance(motionp, false);
}
}
- // even if onupdate returns FALSE, add this motion in to the blend one last time
+ // even if onupdate returns false, add this motion in to the blend one last time
mPoseBlender.addMotion(motionp);
}
}
@@ -825,7 +825,7 @@ void LLMotionController::updateMotions(bool force_update)
// The use_quantum optimization or possibly the associated code in setTimeStamp()
// does not work as implemented.
// Currently setting mTimeStep to nonzero is disabled elsewhere.
- BOOL use_quantum = (mTimeStep != 0.f);
+ bool use_quantum = (mTimeStep != 0.f);
// Always update mPrevTimerElapsed
F32 cur_time = mTimer.getElapsedTimeF32();
@@ -898,7 +898,7 @@ void LLMotionController::updateMotions(bool force_update)
if (use_quantum)
{
- mPoseBlender.blendAndCache(TRUE);
+ mPoseBlender.blendAndCache(true);
}
else
{
@@ -906,7 +906,7 @@ void LLMotionController::updateMotions(bool force_update)
}
}
- mHasRunOnce = TRUE;
+ mHasRunOnce = true;
// LL_INFOS() << "Motion controller time " << motionTimer.getElapsedTimeF32() << LL_ENDL;
}
@@ -926,13 +926,13 @@ void LLMotionController::updateMotionsMinimal()
deactivateStoppedMotions();
- mHasRunOnce = TRUE;
+ mHasRunOnce = true;
}
//-----------------------------------------------------------------------------
// activateMotionInstance()
//-----------------------------------------------------------------------------
-BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
+bool LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// It's not clear why the getWeight() line seems to be crashing this, but
@@ -945,7 +945,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
if (mLoadingMotions.find(motion) != mLoadingMotions.end())
{
// we want to start this motion, but we can't yet, so flag it as started
- motion->setStopped(FALSE);
+ motion->setStopped(false);
// report pending animations as activated
return true;
}
@@ -997,7 +997,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
//-----------------------------------------------------------------------------
// deactivateMotionInstance()
//-----------------------------------------------------------------------------
-BOOL LLMotionController::deactivateMotionInstance(LLMotion *motion)
+bool LLMotionController::deactivateMotionInstance(LLMotion *motion)
{
motion->deactivate();
@@ -1022,7 +1022,7 @@ void LLMotionController::deprecateMotionInstance(LLMotion* motion)
mDeprecatedMotions.insert(motion);
//fade out deprecated motion
- stopMotionInstance(motion, FALSE);
+ stopMotionInstance(motion, false);
//no longer canonical
mAllMotions.erase(motion->getID());
}
@@ -1137,7 +1137,7 @@ void LLMotionController::pauseAllMotions()
if (!mPaused)
{
//LL_INFOS() << "Pausing animations..." << LL_ENDL;
- mPaused = TRUE;
+ mPaused = true;
mPausedFrame = LLFrameTimer::getFrameCount();
}
@@ -1151,7 +1151,7 @@ void LLMotionController::unpauseAllMotions()
if (mPaused)
{
//LL_INFOS() << "Unpausing animations..." << LL_ENDL;
- mPaused = FALSE;
+ mPaused = false;
}
}
// End
diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h
index f03a8d1834..3e4edf7ff2 100644
--- a/indra/llcharacter/llmotioncontroller.h
+++ b/indra/llcharacter/llmotioncontroller.h
@@ -62,7 +62,7 @@ public:
// adds motion classes to the registry
// returns true if successfull
- BOOL registerMotion( const LLUUID& id, LLMotionConstructor create);
+ bool registerMotion( const LLUUID& id, LLMotionConstructor create);
// creates a new instance of a named motion
// returns NULL motion is not registered
@@ -85,7 +85,7 @@ class LLMotionController
public:
typedef std::list motion_list_t;
typedef std::set motion_set_t;
- BOOL mIsSelf;
+ bool mIsSelf;
public:
// Constructor
@@ -102,7 +102,7 @@ public:
// registers a motion with the controller
// (actually just forwards call to motion registry)
// returns true if successfull
- BOOL registerMotion( const LLUUID& id, LLMotionConstructor create );
+ bool registerMotion( const LLUUID& id, LLMotionConstructor create );
// creates a motion from the registry
LLMotion *createMotion( const LLUUID &id );
@@ -115,13 +115,13 @@ public:
// start motion
// begins playing the specified motion
// returns true if successful
- BOOL startMotion( const LLUUID &id, F32 start_offset );
+ bool startMotion( const LLUUID &id, F32 start_offset );
// stop motion
// stops a playing motion
// in reality, it begins the ease out transition phase
// returns true if successful
- BOOL stopMotionLocally( const LLUUID &id, BOOL stop_immediate );
+ bool stopMotionLocally( const LLUUID &id, bool stop_immediate );
// Move motions from loading to loaded
void updateLoadingMotions();
@@ -147,7 +147,7 @@ public:
// pause and continue all motions
void pauseAllMotions();
void unpauseAllMotions();
- BOOL isPaused() const { return mPaused; }
+ bool isPaused() const { return mPaused; }
S32 getPausedFrame() const { return mPausedFrame; }
void setTimeStep(F32 step);
@@ -181,10 +181,10 @@ protected:
// internal operations act on motion instances directly
// as there can be duplicate motions per id during blending overlap
void deleteAllMotions();
- BOOL activateMotionInstance(LLMotion *motion, F32 time);
- BOOL deactivateMotionInstance(LLMotion *motion);
+ bool activateMotionInstance(LLMotion *motion, F32 time);
+ bool deactivateMotionInstance(LLMotion *motion);
void deprecateMotionInstance(LLMotion* motion);
- BOOL stopMotionInstance(LLMotion *motion, BOOL stop_imemdiate);
+ bool stopMotionInstance(LLMotion *motion, bool stop_imemdiate);
void removeMotionInstance(LLMotion* motion);
void updateRegularMotions();
void updateAdditiveMotions();
@@ -224,8 +224,8 @@ protected:
F32 mPrevTimerElapsed;
F32 mAnimTime;
F32 mLastTime;
- BOOL mHasRunOnce;
- BOOL mPaused;
+ bool mHasRunOnce;
+ bool mPaused;
S32 mPausedFrame;
F32 mTimeStep;
S32 mTimeStepCount;
diff --git a/indra/llcharacter/llmultigesture.cpp b/indra/llcharacter/llmultigesture.cpp
index 2938bf9473..73652a15b4 100644
--- a/indra/llcharacter/llmultigesture.cpp
+++ b/indra/llcharacter/llmultigesture.cpp
@@ -48,7 +48,7 @@ LLMultiGesture::LLMultiGesture()
mTrigger(),
mReplaceText(),
mSteps(),
- mPlaying(FALSE),
+ mPlaying(false),
mCurrentStep(0),
mDoneCallback(NULL),
mCallbackData(NULL)
@@ -64,12 +64,12 @@ LLMultiGesture::~LLMultiGesture()
void LLMultiGesture::reset()
{
- mPlaying = FALSE;
+ mPlaying = false;
mCurrentStep = 0;
mWaitTimer.reset();
- mWaitingTimer = FALSE;
- mWaitingAnimations = FALSE;
- mWaitingAtEnd = FALSE;
+ mWaitingTimer = false;
+ mWaitingAnimations = false;
+ mWaitingAtEnd = false;
mRequestedAnimIDs.clear();
mPlayingAnimIDs.clear();
}
@@ -114,7 +114,7 @@ S32 LLMultiGesture::getMaxSerialSize() const
return max_size;
}
-BOOL LLMultiGesture::serialize(LLDataPacker& dp) const
+bool LLMultiGesture::serialize(LLDataPacker& dp) const
{
dp.packS32(GESTURE_VERSION, "version");
dp.packU8(mKey, "key");
@@ -130,7 +130,7 @@ BOOL LLMultiGesture::serialize(LLDataPacker& dp) const
LLGestureStep* step = mSteps[i];
dp.packS32(step->getType(), "step_type");
- BOOL ok = step->serialize(dp);
+ bool ok = step->serialize(dp);
if (!ok)
{
return false;
@@ -139,7 +139,7 @@ BOOL LLMultiGesture::serialize(LLDataPacker& dp) const
return true;
}
-BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
+bool LLMultiGesture::deserialize(LLDataPacker& dp)
{
S32 version;
dp.unpackS32(version, "version");
@@ -179,7 +179,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
case STEP_ANIMATION:
{
LLGestureStepAnimation* step = new LLGestureStepAnimation();
- BOOL ok = step->deserialize(dp);
+ bool ok = step->deserialize(dp);
if (!ok) return false;
mSteps.push_back(step);
break;
@@ -187,7 +187,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
case STEP_SOUND:
{
LLGestureStepSound* step = new LLGestureStepSound();
- BOOL ok = step->deserialize(dp);
+ bool ok = step->deserialize(dp);
if (!ok) return false;
mSteps.push_back(step);
break;
@@ -195,7 +195,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
case STEP_CHAT:
{
LLGestureStepChat* step = new LLGestureStepChat();
- BOOL ok = step->deserialize(dp);
+ bool ok = step->deserialize(dp);
if (!ok) return false;
mSteps.push_back(step);
break;
@@ -203,7 +203,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
case STEP_WAIT:
{
LLGestureStepWait* step = new LLGestureStepWait();
- BOOL ok = step->deserialize(dp);
+ bool ok = step->deserialize(dp);
if (!ok) return false;
mSteps.push_back(step);
break;
@@ -262,7 +262,7 @@ S32 LLGestureStepAnimation::getMaxSerialSize() const
return max_size;
}
-BOOL LLGestureStepAnimation::serialize(LLDataPacker& dp) const
+bool LLGestureStepAnimation::serialize(LLDataPacker& dp) const
{
dp.packString(mAnimName, "anim_name");
dp.packUUID(mAnimAssetID, "asset_id");
@@ -270,7 +270,7 @@ BOOL LLGestureStepAnimation::serialize(LLDataPacker& dp) const
return true;
}
-BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp)
+bool LLGestureStepAnimation::deserialize(LLDataPacker& dp)
{
dp.unpackString(mAnimName, "anim_name");
@@ -344,7 +344,7 @@ S32 LLGestureStepSound::getMaxSerialSize() const
return max_size;
}
-BOOL LLGestureStepSound::serialize(LLDataPacker& dp) const
+bool LLGestureStepSound::serialize(LLDataPacker& dp) const
{
dp.packString(mSoundName, "sound_name");
dp.packUUID(mSoundAssetID, "asset_id");
@@ -352,7 +352,7 @@ BOOL LLGestureStepSound::serialize(LLDataPacker& dp) const
return true;
}
-BOOL LLGestureStepSound::deserialize(LLDataPacker& dp)
+bool LLGestureStepSound::deserialize(LLDataPacker& dp)
{
dp.unpackString(mSoundName, "sound_name");
@@ -404,14 +404,14 @@ S32 LLGestureStepChat::getMaxSerialSize() const
return max_size;
}
-BOOL LLGestureStepChat::serialize(LLDataPacker& dp) const
+bool LLGestureStepChat::serialize(LLDataPacker& dp) const
{
dp.packString(mChatText, "chat_text");
dp.packU32(mFlags, "flags");
return true;
}
-BOOL LLGestureStepChat::deserialize(LLDataPacker& dp)
+bool LLGestureStepChat::deserialize(LLDataPacker& dp)
{
dp.unpackString(mChatText, "chat_text");
@@ -459,14 +459,14 @@ S32 LLGestureStepWait::getMaxSerialSize() const
return max_size;
}
-BOOL LLGestureStepWait::serialize(LLDataPacker& dp) const
+bool LLGestureStepWait::serialize(LLDataPacker& dp) const
{
dp.packF32(mWaitSeconds, "wait_seconds");
dp.packU32(mFlags, "flags");
return true;
}
-BOOL LLGestureStepWait::deserialize(LLDataPacker& dp)
+bool LLGestureStepWait::deserialize(LLDataPacker& dp)
{
dp.unpackF32(mWaitSeconds, "wait_seconds");
dp.unpackU32(mFlags, "flags");
diff --git a/indra/llcharacter/llmultigesture.h b/indra/llcharacter/llmultigesture.h
index 92820159d4..13acbc3f52 100644
--- a/indra/llcharacter/llmultigesture.h
+++ b/indra/llcharacter/llmultigesture.h
@@ -46,8 +46,8 @@ public:
// Maximum number of bytes this could hold once serialized.
S32 getMaxSerialSize() const;
- BOOL serialize(LLDataPacker& dp) const;
- BOOL deserialize(LLDataPacker& dp);
+ bool serialize(LLDataPacker& dp) const;
+ bool deserialize(LLDataPacker& dp);
void dump();
@@ -75,19 +75,19 @@ public:
std::vector mSteps;
// Is the gesture currently playing?
- BOOL mPlaying;
+ bool mPlaying;
// "instruction pointer" for steps
S32 mCurrentStep;
// We're waiting for triggered animations to stop playing
- BOOL mWaitingAnimations;
+ bool mWaitingAnimations;
// We're waiting a fixed amount of time
- BOOL mWaitingTimer;
+ bool mWaitingTimer;
// Waiting after the last step played for all animations to complete
- BOOL mWaitingAtEnd;
+ bool mWaitingAtEnd;
// Timer for waiting
LLFrameTimer mWaitTimer;
@@ -129,8 +129,8 @@ public:
virtual std::vector getLabel() const = 0;
virtual S32 getMaxSerialSize() const = 0;
- virtual BOOL serialize(LLDataPacker& dp) const = 0;
- virtual BOOL deserialize(LLDataPacker& dp) = 0;
+ virtual bool serialize(LLDataPacker& dp) const = 0;
+ virtual bool deserialize(LLDataPacker& dp) = 0;
virtual void dump() = 0;
};
@@ -151,8 +151,8 @@ public:
virtual std::vector getLabel() const;
virtual S32 getMaxSerialSize() const;
- virtual BOOL serialize(LLDataPacker& dp) const;
- virtual BOOL deserialize(LLDataPacker& dp);
+ virtual bool serialize(LLDataPacker& dp) const;
+ virtual bool deserialize(LLDataPacker& dp);
virtual void dump();
@@ -174,8 +174,8 @@ public:
virtual std::vector getLabel() const;
virtual S32 getMaxSerialSize() const;
- virtual BOOL serialize(LLDataPacker& dp) const;
- virtual BOOL deserialize(LLDataPacker& dp);
+ virtual bool serialize(LLDataPacker& dp) const;
+ virtual bool deserialize(LLDataPacker& dp);
virtual void dump();
@@ -197,8 +197,8 @@ public:
virtual std::vector getLabel() const;
virtual S32 getMaxSerialSize() const;
- virtual BOOL serialize(LLDataPacker& dp) const;
- virtual BOOL deserialize(LLDataPacker& dp);
+ virtual bool serialize(LLDataPacker& dp) const;
+ virtual bool deserialize(LLDataPacker& dp);
virtual void dump();
@@ -222,8 +222,8 @@ public:
virtual std::vector getLabel() const;
virtual S32 getMaxSerialSize() const;
- virtual BOOL serialize(LLDataPacker& dp) const;
- virtual BOOL deserialize(LLDataPacker& dp);
+ virtual bool serialize(LLDataPacker& dp) const;
+ virtual bool deserialize(LLDataPacker& dp);
virtual void dump();
diff --git a/indra/llcharacter/llpose.cpp b/indra/llcharacter/llpose.cpp
index 5acdfbf532..1983607d47 100644
--- a/indra/llcharacter/llpose.cpp
+++ b/indra/llcharacter/llpose.cpp
@@ -81,7 +81,7 @@ LLJointState *LLPose::getNextJointState()
//-----------------------------------------------------------------------------
// addJointState()
//-----------------------------------------------------------------------------
-BOOL LLPose::addJointState(const LLPointer& jointState)
+bool LLPose::addJointState(const LLPointer& jointState)
{
if (mJointMap.find(jointState->getJoint()->getName()) == mJointMap.end())
{
@@ -93,7 +93,7 @@ BOOL LLPose::addJointState(const LLPointer& jointState)
//-----------------------------------------------------------------------------
// removeJointState()
//-----------------------------------------------------------------------------
-BOOL LLPose::removeJointState(const LLPointer& jointState)
+bool LLPose::removeJointState(const LLPointer& jointState)
{
mJointMap.erase(jointState->getJoint()->getName());
return true;
@@ -102,7 +102,7 @@ BOOL LLPose::removeJointState(const LLPointer& jointState)
//-----------------------------------------------------------------------------
// removeAllJointStates()
//-----------------------------------------------------------------------------
-BOOL LLPose::removeAllJointStates()
+bool LLPose::removeAllJointStates()
{
mJointMap.clear();
return true;
@@ -181,7 +181,7 @@ LLJointStateBlender::LLJointStateBlender()
{
mJointStates[i] = NULL;
mPriorities[i] = S32_MIN;
- mAdditiveBlends[i] = FALSE;
+ mAdditiveBlends[i] = false;
}
}
@@ -193,7 +193,7 @@ LLJointStateBlender::~LLJointStateBlender()
//-----------------------------------------------------------------------------
// addJointState()
//-----------------------------------------------------------------------------
-BOOL LLJointStateBlender::addJointState(const LLPointer& joint_state, S32 priority, BOOL additive_blend)
+bool LLJointStateBlender::addJointState(const LLPointer& joint_state, S32 priority, bool additive_blend)
{
llassert(joint_state);
@@ -235,7 +235,7 @@ BOOL LLJointStateBlender::addJointState(const LLPointer& joint_sta
//-----------------------------------------------------------------------------
// blendJointStates()
//-----------------------------------------------------------------------------
-void LLJointStateBlender::blendJointStates(BOOL apply_now)
+void LLJointStateBlender::blendJointStates(bool apply_now)
{
// we need at least one joint to blend
// if there is one, it will be in slot zero according to insertion logic
@@ -468,7 +468,7 @@ LLPoseBlender::~LLPoseBlender()
//-----------------------------------------------------------------------------
// addMotion()
//-----------------------------------------------------------------------------
-BOOL LLPoseBlender::addMotion(LLMotion* motion)
+bool LLPoseBlender::addMotion(LLMotion* motion)
{
LLPose* pose = motion->getPose();
@@ -525,7 +525,7 @@ void LLPoseBlender::blendAndApply()
//-----------------------------------------------------------------------------
// blendAndCache()
//-----------------------------------------------------------------------------
-void LLPoseBlender::blendAndCache(BOOL reset_cached_joints)
+void LLPoseBlender::blendAndCache(bool reset_cached_joints)
{
for (blender_list_t::iterator iter = mActiveBlenders.begin();
iter != mActiveBlenders.end(); ++iter)
@@ -535,7 +535,7 @@ void LLPoseBlender::blendAndCache(BOOL reset_cached_joints)
{
jsbp->resetCachedJoint();
}
- jsbp->blendJointStates(FALSE);
+ jsbp->blendJointStates(false);
}
}
diff --git a/indra/llcharacter/llpose.h b/indra/llcharacter/llpose.h
index 1405f1e053..d43956e120 100644
--- a/indra/llcharacter/llpose.h
+++ b/indra/llcharacter/llpose.h
@@ -65,11 +65,11 @@ public:
// Destructor
~LLPose();
// add a joint state in this pose
- BOOL addJointState(const LLPointer& jointState);
+ bool addJointState(const LLPointer& jointState);
// remove a joint state from this pose
- BOOL removeJointState(const LLPointer& jointState);
+ bool removeJointState(const LLPointer& jointState);
// removes all joint states from this pose
- BOOL removeAllJointStates();
+ bool removeAllJointStates();
// set weight for all joint states in this pose
void setWeight(F32 weight);
// get weight for this pose
@@ -87,12 +87,12 @@ class LLJointStateBlender
protected:
LLPointer mJointStates[JSB_NUM_JOINT_STATES];
S32 mPriorities[JSB_NUM_JOINT_STATES];
- BOOL mAdditiveBlends[JSB_NUM_JOINT_STATES];
+ bool mAdditiveBlends[JSB_NUM_JOINT_STATES];
public:
LLJointStateBlender();
~LLJointStateBlender();
- void blendJointStates(BOOL apply_now = TRUE);
- BOOL addJointState(const LLPointer& joint_state, S32 priority, BOOL additive_blend);
+ void blendJointStates(bool apply_now = true);
+ bool addJointState(const LLPointer& joint_state, S32 priority, bool additive_blend);
void interpolate(F32 u);
void clear();
void resetCachedJoint();
@@ -120,7 +120,7 @@ public:
~LLPoseBlender();
// request motion joint states to be added to pose blender joint state records
- BOOL addMotion(LLMotion* motion);
+ bool addMotion(LLMotion* motion);
// blend all joint states and apply to skeleton
void blendAndApply();
@@ -129,7 +129,7 @@ public:
void clearBlenders();
// blend all joint states and cache results
- void blendAndCache(BOOL reset_cached_joints);
+ void blendAndCache(bool reset_cached_joints);
// interpolate all joints towards cached values
void interpolate(F32 u);
diff --git a/indra/llcharacter/llstatemachine.cpp b/indra/llcharacter/llstatemachine.cpp
index 80813965ea..4f0c4e8dc1 100644
--- a/indra/llcharacter/llstatemachine.cpp
+++ b/indra/llcharacter/llstatemachine.cpp
@@ -49,7 +49,7 @@ bool operator!=(const LLUniqueID &a, const LLUniqueID &b)
LLStateDiagram::LLStateDiagram()
{
mDefaultState = NULL;
- mUseDefaultState = FALSE;
+ mUseDefaultState = false;
}
LLStateDiagram::~LLStateDiagram()
@@ -58,14 +58,14 @@ LLStateDiagram::~LLStateDiagram()
}
// add a state to the state graph
-BOOL LLStateDiagram::addState(LLFSMState *state)
+bool LLStateDiagram::addState(LLFSMState *state)
{
mStates[state] = Transitions();
return true;
}
// add a directed transition between 2 states
-BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition)
+bool LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition)
{
StateMap::iterator state_it;
state_it = mStates.find(&start_state);
@@ -97,9 +97,9 @@ BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_stat
}
// add an undirected transition between 2 states
-BOOL LLStateDiagram::addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition)
+bool LLStateDiagram::addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition)
{
- BOOL result;
+ bool result;
result = addTransition(start_state, end_state, transition);
if (result)
{
@@ -162,7 +162,7 @@ LLFSMState* LLStateDiagram::processTransition(LLFSMState& start_state, LLFSMTran
void LLStateDiagram::setDefaultState(LLFSMState& default_state)
{
- mUseDefaultState = TRUE;
+ mUseDefaultState = true;
mDefaultState = &default_state;
}
@@ -179,7 +179,7 @@ S32 LLStateDiagram::numDeadendStates()
return numDeadends;
}
-BOOL LLStateDiagram::stateIsValid(LLFSMState& state)
+bool LLStateDiagram::stateIsValid(LLFSMState& state)
{
if (mStates.find(&state) != mStates.end())
{
@@ -200,7 +200,7 @@ LLFSMState* LLStateDiagram::getState(U32 state_id)
return NULL;
}
-BOOL LLStateDiagram::saveDotFile(const std::string& filename)
+bool LLStateDiagram::saveDotFile(const std::string& filename)
{
LLAPRFile outfile ;
outfile.open(filename, LL_APR_W);
@@ -312,7 +312,7 @@ void LLStateMachine::runCurrentState(void *data)
}
// set current state
-BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, BOOL skip_entry)
+bool LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, bool skip_entry)
{
llassert(mStateDiagram);
@@ -329,7 +329,7 @@ BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data,
return false;
}
-BOOL LLStateMachine::setCurrentState(U32 state_id, void* user_data, BOOL skip_entry)
+bool LLStateMachine::setCurrentState(U32 state_id, void* user_data, bool skip_entry)
{
llassert(mStateDiagram);
diff --git a/indra/llcharacter/llstatemachine.h b/indra/llcharacter/llstatemachine.h
index a2f7e59bd2..521da113e9 100644
--- a/indra/llcharacter/llstatemachine.h
+++ b/indra/llcharacter/llstatemachine.h
@@ -74,7 +74,7 @@ protected:
StateMap mStates;
Transitions mDefaultTransitions;
LLFSMState* mDefaultState;
- BOOL mUseDefaultState;
+ bool mUseDefaultState;
public:
LLStateDiagram();
@@ -82,13 +82,13 @@ public:
protected:
// add a state to the state graph, executed implicitly when adding transitions
- BOOL addState(LLFSMState *state);
+ bool addState(LLFSMState *state);
// add a directed transition between 2 states
- BOOL addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition);
+ bool addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition);
// add an undirected transition between 2 states
- BOOL addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition);
+ bool addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition);
// add a transition that is taken if none other exist
void addDefaultTransition(LLFSMState& end_state, LLFSMTransition& transition);
@@ -103,14 +103,14 @@ protected:
S32 numDeadendStates();
// does this state exist in the state diagram?
- BOOL stateIsValid(LLFSMState& state);
+ bool stateIsValid(LLFSMState& state);
// get a state pointer by ID
LLFSMState* getState(U32 state_id);
public:
// save the graph in a DOT file for rendering and visualization
- BOOL saveDotFile(const std::string& filename);
+ bool saveDotFile(const std::string& filename);
};
class LLStateMachine
@@ -138,10 +138,10 @@ public:
void runCurrentState(void *data);
// set state by state pointer
- BOOL setCurrentState(LLFSMState *initial_state, void* user_data, BOOL skip_entry = TRUE);
+ bool setCurrentState(LLFSMState *initial_state, void* user_data, bool skip_entry = true);
// set state by unique ID
- BOOL setCurrentState(U32 state_id, void* user_data, BOOL skip_entry = TRUE);
+ bool setCurrentState(U32 state_id, void* user_data, bool skip_entry = true);
};
#endif //_LL_LLSTATEMACHINE_H
diff --git a/indra/llcharacter/lltargetingmotion.cpp b/indra/llcharacter/lltargetingmotion.cpp
index 0697d04fd3..87d61a2d36 100644
--- a/indra/llcharacter/lltargetingmotion.cpp
+++ b/indra/llcharacter/lltargetingmotion.cpp
@@ -93,7 +93,7 @@ LLMotion::LLMotionInitStatus LLTargetingMotion::onInitialize(LLCharacter *charac
//-----------------------------------------------------------------------------
// LLTargetingMotion::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLTargetingMotion::onActivate()
+bool LLTargetingMotion::onActivate()
{
return true;
}
@@ -101,7 +101,7 @@ BOOL LLTargetingMotion::onActivate()
//-----------------------------------------------------------------------------
// LLTargetingMotion::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLTargetingMotion::onUpdate(F32 time, U8* joint_mask)
+bool LLTargetingMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
F32 slerp_amt = LLSmoothInterpolation::getInterpolant(TORSO_TARGET_HALF_LIFE);
@@ -109,7 +109,7 @@ BOOL LLTargetingMotion::onUpdate(F32 time, U8* joint_mask)
LLVector3 target;
LLVector3* lookAtPoint = (LLVector3*)mCharacter->getAnimationData("LookAtPoint");
- BOOL result = TRUE;
+ bool result = true;
if (!lookAtPoint)
{
diff --git a/indra/llcharacter/lltargetingmotion.h b/indra/llcharacter/lltargetingmotion.h
index 85749a0882..b284dd2941 100644
--- a/indra/llcharacter/lltargetingmotion.h
+++ b/indra/llcharacter/lltargetingmotion.h
@@ -91,14 +91,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate();
+ virtual bool onActivate();
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ // must return true while it is active, and
+ // must return true when the motion is completed.
+ virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp
index 600d86343d..adc5c69803 100644
--- a/indra/llcharacter/llvisualparam.cpp
+++ b/indra/llcharacter/llvisualparam.cpp
@@ -164,8 +164,8 @@ LLVisualParam::LLVisualParam()
mLastWeight( 0.f ),
mNext( NULL ),
mTargetWeight( 0.f ),
- mIsAnimating( FALSE ),
- mIsDummy(FALSE),
+ mIsAnimating( false ),
+ mIsDummy(false),
mID( -1 ),
mInfo( 0 ),
mParamLocation(LOC_UNKNOWN)
@@ -207,21 +207,21 @@ LLVisualParam::~LLVisualParam()
// setInfo()
//-----------------------------------------------------------------------------
-BOOL LLVisualParam::setInfo(LLVisualParamInfo *info)
+bool LLVisualParam::setInfo(LLVisualParamInfo *info)
{
llassert(mInfo == NULL);
if (info->mID < 0)
return false;
mInfo = info;
mID = info->mID;
- setWeight(getDefaultWeight(), FALSE );
+ setWeight(getDefaultWeight(), false );
return true;
}
//-----------------------------------------------------------------------------
// parseData()
//-----------------------------------------------------------------------------
-BOOL LLVisualParam::parseData(LLXmlTreeNode *node)
+bool LLVisualParam::parseData(LLXmlTreeNode *node)
{
LLVisualParamInfo *info = new LLVisualParamInfo;
@@ -238,7 +238,7 @@ BOOL LLVisualParam::parseData(LLXmlTreeNode *node)
//-----------------------------------------------------------------------------
// [Legacy Bake]
//void LLVisualParam::setWeight(F32 weight)
-void LLVisualParam::setWeight(F32 weight, BOOL upload_bake)
+void LLVisualParam::setWeight(F32 weight, bool upload_bake)
{
if (mIsAnimating)
{
@@ -267,7 +267,7 @@ void LLVisualParam::setWeight(F32 weight, BOOL upload_bake)
//-----------------------------------------------------------------------------
// [Legacy Bake]
//void LLVisualParam::setAnimationTarget(F32 target_value)
-void LLVisualParam::setAnimationTarget(F32 target_value, BOOL upload_bake)
+void LLVisualParam::setAnimationTarget(F32 target_value, bool upload_bake)
{
// don't animate dummy parameters
if (mIsDummy)
@@ -290,7 +290,7 @@ void LLVisualParam::setAnimationTarget(F32 target_value, BOOL upload_bake)
{
mTargetWeight = target_value;
}
- mIsAnimating = TRUE;
+ mIsAnimating = true;
if (mNext)
{
@@ -323,7 +323,7 @@ void LLVisualParam::clearNextParam()
//-----------------------------------------------------------------------------
// [Legacy Bake]
//void LLVisualParam::animate( F32 delta)
-void LLVisualParam::animate( F32 delta, BOOL upload_bake)
+void LLVisualParam::animate( F32 delta, bool upload_bake)
{
if (mIsAnimating)
{
@@ -339,11 +339,11 @@ void LLVisualParam::animate( F32 delta, BOOL upload_bake)
//-----------------------------------------------------------------------------
// [Legacy Bake]
//void LLVisualParam::stopAnimating()
-void LLVisualParam::stopAnimating(BOOL upload_bake)
+void LLVisualParam::stopAnimating(bool upload_bake)
{
if (mIsAnimating && isTweakable())
{
- mIsAnimating = FALSE;
+ mIsAnimating = false;
// [Legacy Bake]
//setWeight(mTargetWeight);
setWeight(mTargetWeight, upload_bake);
diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h
index 33806fbc34..fa9c8bfeed 100644
--- a/indra/llcharacter/llvisualparam.h
+++ b/indra/llcharacter/llvisualparam.h
@@ -113,11 +113,11 @@ public:
// (They can not be virtual because they use specific derived Info classes)
LLVisualParamInfo* getInfo() const { return mInfo; }
// This sets mInfo and calls initialization functions
- BOOL setInfo(LLVisualParamInfo *info);
+ bool setInfo(LLVisualParamInfo *info);
// Virtual functions
// Pure virtuals
- //virtual BOOL parseData( LLXmlTreeNode *node ) = 0;
+ //virtual bool parseData( LLXmlTreeNode *node ) = 0;
virtual void apply( ESex avatar_sex ) = 0;
// Default functions
// [Legacy Bake]
@@ -125,10 +125,10 @@ public:
//virtual void setAnimationTarget( F32 target_value);
//virtual void animate(F32 delta);
//virtual void stopAnimating();
- virtual void setWeight(F32 weight, BOOL upload_bake);
- virtual void setAnimationTarget( F32 target_value, BOOL upload_bake);
- virtual void animate(F32 delta, BOOL upload_bake);
- virtual void stopAnimating(BOOL upload_bake);
+ virtual void setWeight(F32 weight, bool upload_bake);
+ virtual void setAnimationTarget( F32 target_value, bool upload_bake);
+ virtual void animate(F32 delta, bool upload_bake);
+ virtual void stopAnimating(bool upload_bake);
// [Legacy Bake]
virtual bool linkDrivenParams(visual_param_mapper mapper, bool only_cross_params);
@@ -157,17 +157,17 @@ public:
F32 getCurrentWeight() const { return mCurWeight; }
F32 getLastWeight() const { return mLastWeight; }
void setLastWeight(F32 val) { mLastWeight = val; }
- BOOL isAnimating() const { return mIsAnimating; }
- BOOL isTweakable() const { return (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) || (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT); }
+ bool isAnimating() const { return mIsAnimating; }
+ bool isTweakable() const { return (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) || (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT); }
LLVisualParam* getNextParam() { return mNext; }
void setNextParam( LLVisualParam *next );
void clearNextParam();
- virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating && !mIsDummy; }
- BOOL getAnimating() const { return mIsAnimating; }
+ virtual void setAnimating(bool is_animating) { mIsAnimating = is_animating && !mIsDummy; }
+ bool getAnimating() const { return mIsAnimating; }
- void setIsDummy(BOOL is_dummy) { mIsDummy = is_dummy; }
+ void setIsDummy(bool is_dummy) { mIsDummy = is_dummy; }
void setParamLocation(EParamLocation loc);
EParamLocation getParamLocation() const { return mParamLocation; }
@@ -179,8 +179,8 @@ protected:
F32 mLastWeight; // last weight
LLVisualParam* mNext; // next param in a shared chain
F32 mTargetWeight; // interpolation target
- BOOL mIsAnimating; // this value has been given an interpolation target
- BOOL mIsDummy; // this is used to prevent dummy visual params from animating
+ bool mIsAnimating; // this value has been given an interpolation target
+ bool mIsDummy; // this is used to prevent dummy visual params from animating
S32 mID; // id for storing weight/morphtarget compares compactly
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index f25f892331..6a98e50eb8 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -308,10 +308,10 @@ S32 wstring_utf16_length(const LLWString &wstr, const S32 woffset, const S32 wle
// Given a wstring and an offset in it, returns the length as wstring (i.e.,
// number of llwchars) of the longest substring that starts at the offset
// and whose equivalent utf-16 string does not exceeds the given utf16_length.
-S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, const S32 woffset, const S32 utf16_length, BOOL *unaligned)
+S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, const S32 woffset, const S32 utf16_length, bool *unaligned)
{
const auto end = wstr.length();
- BOOL u = FALSE;
+ bool u{ false };
S32 n = woffset + utf16_length;
S32 i = woffset;
while (i < end)
@@ -1486,7 +1486,7 @@ S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions)
if (iter != substitutions.end())
{
S32 secFromEpoch = 0;
- BOOL r = LLStringUtil::convertToS32(iter->second, secFromEpoch);
+ bool r = LLStringUtil::convertToS32(iter->second, secFromEpoch);
if (r)
{
found_replacement = formatDatetime(replacement, tokens[0], param, secFromEpoch);
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 0f6f2a7928..1c5e243e7d 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -391,7 +391,7 @@ public:
static void _makeASCII(string_type& string);
// Conversion to other data types
- static bool convertToBOOL(const string_type& string, BOOL& value);
+ static bool convertToBOOL(const string_type& string, bool& value);
static bool convertToU8(const string_type& string, U8& value);
static bool convertToS8(const string_type& string, S8& value);
static bool convertToS16(const string_type& string, S16& value);
@@ -696,7 +696,7 @@ LL_COMMON_API S32 utf16str_wstring_length(const llutf16string &utf16str, S32 len
LL_COMMON_API S32 wstring_utf16_length(const LLWString & wstr, S32 woffset, S32 wlen);
// Length in wstring (i.e., llwchar count) of a part of a wstring specified by utf16 length (i.e., utf16 units.)
-LL_COMMON_API S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, BOOL *unaligned = NULL);
+LL_COMMON_API S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, bool *unaligned = nullptr);
/**
* @brief Properly truncate a utf8 string to a maximum byte count.
@@ -1818,7 +1818,7 @@ auto LLStringUtilBase::getenv(const std::string& key, const string_type& dflt
}
template
-bool LLStringUtilBase::convertToBOOL(const string_type& string, BOOL& value)
+bool LLStringUtilBase::convertToBOOL(const string_type& string, bool& value)
{
if( string.empty() )
{
diff --git a/indra/llcommon/tests/llstring_test.cpp b/indra/llcommon/tests/llstring_test.cpp
index a7aa347222..3e31a5d667 100644
--- a/indra/llcommon/tests/llstring_test.cpp
+++ b/indra/llcommon/tests/llstring_test.cpp
@@ -231,7 +231,7 @@ namespace tut
template<> template<>
void string_index_object_t::test<17>()
{
- BOOL value;
+ bool value;
std::string str_val("1");
ensure("convertToBOOL 1 failed", LLStringUtil::convertToBOOL(str_val, value) && value);
str_val = "T";
diff --git a/indra/llcommon/threadpool.cpp b/indra/llcommon/threadpool.cpp
index ec5a69a7df..1a155879f7 100644
--- a/indra/llcommon/threadpool.cpp
+++ b/indra/llcommon/threadpool.cpp
@@ -100,6 +100,10 @@ void LL::ThreadPoolBase::start()
LL::ThreadPoolBase::~ThreadPoolBase()
{
close();
+ if (!LLEventPumps::wasDeleted())
+ {
+ LLEventPumps::instance().obtain("LLApp").stopListening(mName);
+ }
}
void LL::ThreadPoolBase::close()
diff --git a/indra/llfilesystem/lldir_linux.cpp b/indra/llfilesystem/lldir_linux.cpp
index 2e92e13bfd..21a31d73fc 100644
--- a/indra/llfilesystem/lldir_linux.cpp
+++ b/indra/llfilesystem/lldir_linux.cpp
@@ -308,11 +308,11 @@ bool LLDir_Linux::fileExists(const std::string &filename) const
int res = stat(filename.c_str(), &stat_data);
if (!res)
{
- return TRUE;
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
diff --git a/indra/llfilesystem/lldir_win32.cpp b/indra/llfilesystem/lldir_win32.cpp
index 699b6f5f83..2cc1f6a8fd 100644
--- a/indra/llfilesystem/lldir_win32.cpp
+++ b/indra/llfilesystem/lldir_win32.cpp
@@ -47,7 +47,9 @@ DWORD GetDllVersion(LPCTSTR lpszDllName);
namespace
{ // anonymous
- enum class prst { INIT, OPEN, SKIP } state = prst::INIT;
+ enum class prst { INIT, OPEN, SKIP };
+ prst state{ prst::INIT };
+
// This is called so early that we can't count on static objects being
// properly constructed yet, so declare a pointer instead of an instance.
std::ofstream* prelogf = nullptr;
@@ -75,6 +77,7 @@ namespace
(*prelogf) << "========================================================================"
<< std::endl;
// fall through, don't break
+ [[fallthrough]];
case prst::OPEN:
(*prelogf) << message << std::endl;
@@ -256,7 +259,7 @@ LLDir_Win32::LLDir_Win32()
#endif
- mAppRODataDir = mWorkingDir;
+ mAppRODataDir = mWorkingDir;
// if (mExecutableDir.find("indra") == std::string::npos)
@@ -444,11 +447,11 @@ bool LLDir_Win32::fileExists(const std::string &filename) const
int res = LLFile::stat(filename, &stat_data);
if (!res)
{
- return TRUE;
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
diff --git a/indra/llfilesystem/lldir_win32.h b/indra/llfilesystem/lldir_win32.h
index 23b8e6b5a4..d062dd655c 100644
--- a/indra/llfilesystem/lldir_win32.h
+++ b/indra/llfilesystem/lldir_win32.h
@@ -51,7 +51,7 @@ public:
private:
BOOL getNextFileInDir(const llutf16string &dirname, const std::string &mask, std::string &fname); //FS:LGG for LGG's particle beam
- void* mDirSearch_h;
+ void* mDirSearch_h{ nullptr };
llutf16string mCurrentDir;
};
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index 50e08b9c56..ad4f8760f2 100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -124,10 +124,10 @@ LLParcel::LLParcel()
LLParcel::LLParcel(const LLUUID &owner_id,
- BOOL modify, BOOL terraform, BOOL damage,
+ bool modify, bool terraform, bool damage,
time_t claim_date, S32 claim_price_per_meter,
S32 rent_price_per_meter, S32 area, S32 sim_object_limit, F32 parcel_object_bonus,
- BOOL is_group_owned)
+ bool is_group_owned)
{
init( owner_id, modify, terraform, damage, claim_date,
claim_price_per_meter, rent_price_per_meter, area, sim_object_limit, parcel_object_bonus,
@@ -142,10 +142,10 @@ LLParcel::~LLParcel()
}
void LLParcel::init(const LLUUID &owner_id,
- BOOL modify, BOOL terraform, BOOL damage,
+ bool modify, bool terraform, bool damage,
time_t claim_date, S32 claim_price_per_meter,
S32 rent_price_per_meter, S32 area, S32 sim_object_limit, F32 parcel_object_bonus,
- BOOL is_group_owned)
+ bool is_group_owned)
{
mID.setNull();
mOwnerID = owner_id;
@@ -172,7 +172,7 @@ void LLParcel::init(const LLUUID &owner_id,
mSaleTimerExpires.stop();
mGraceExtension = 0;
//mExpireAction = STEA_REVERT;
- //mRecordTransaction = FALSE;
+ //mRecordTransaction = false;
mAuctionID = 0;
mInEscrow = false;
@@ -238,7 +238,7 @@ void LLParcel::init(const LLUUID &owner_id,
setObscureMOAP(false);
}
-void LLParcel::overrideOwner(const LLUUID& owner_id, BOOL is_group_owned)
+void LLParcel::overrideOwner(const LLUUID& owner_id, bool is_group_owned)
{
// Override with system permission (LLUUID::null)
// Overridden parcels have no group
@@ -352,7 +352,7 @@ void LLParcel::setAllParcelFlags(U32 flags)
mParcelFlags = flags;
}
-void LLParcel::setParcelFlag(U32 flag, BOOL b)
+void LLParcel::setParcelFlag(U32 flag, bool b)
{
if (b)
{
@@ -365,7 +365,7 @@ void LLParcel::setParcelFlag(U32 flag, BOOL b)
}
-BOOL LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const
+bool LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const
{
if (agent_id == LLUUID::null)
{
@@ -394,7 +394,7 @@ BOOL LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) con
return false;
}
-BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const
+bool LLParcel::allowTerraformBy(const LLUUID &agent_id) const
{
if (agent_id == LLUUID::null)
{
@@ -441,7 +441,7 @@ void LLParcel::setDiscountRate(F32 rate)
// File input and output
//-----------------------------------------------------------
-BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entry)
+bool LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entry)
{
skip_to_end_of_next_keyword("{", input_stream);
while (input_stream.good())
@@ -561,9 +561,9 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer );
setMediaURL(buffer);
- BOOL see_avs = TRUE; // All default to true for legacy server behavior
- BOOL any_av_sounds = TRUE;
- BOOL group_av_sounds = TRUE;
+ bool see_avs = true; // All default to true for legacy server behavior
+ bool any_av_sounds = true;
+ bool group_av_sounds = true;
bool have_new_parcel_limit_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_SeeAVs) > 0); // New version of server should send all 3 of these values
have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds) > 0);
have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds) > 0);
@@ -787,7 +787,7 @@ void LLParcel::extendAABB(const LLVector3& box_min, const LLVector3& box_max)
}
}
-BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
+bool LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
{
if (mAccessList.size() >= (U32) PARCEL_MAX_ACCESS_LIST)
{
@@ -828,7 +828,7 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
return true;
}
-BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
+bool LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
{
if (mBanList.size() >= (U32) PARCEL_MAX_ACCESS_LIST)
{
@@ -871,11 +871,11 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
return true;
}
-BOOL remove_from_access_array(std::map* list, const LLUUID& agent_id); // Various missing prototypes
-BOOL remove_from_access_array(std::map* list,
+bool remove_from_access_array(std::map* list, const LLUUID& agent_id); // Various missing prototypes
+bool remove_from_access_array(std::map* list,
const LLUUID& agent_id)
{
- BOOL removed = FALSE;
+ bool removed = false;
LLAccessEntry::map::iterator itor = list->begin();
while (itor != list->end())
{
@@ -883,7 +883,7 @@ BOOL remove_from_access_array(std::map* list,
if (entry.mID == agent_id)
{
list->erase(itor++);
- removed = TRUE;
+ removed = true;
}
else
{
@@ -893,12 +893,12 @@ BOOL remove_from_access_array(std::map* list,
return removed;
}
-BOOL LLParcel::removeFromAccessList(const LLUUID& agent_id)
+bool LLParcel::removeFromAccessList(const LLUUID& agent_id)
{
return remove_from_access_array(&mAccessList, agent_id);
}
-BOOL LLParcel::removeFromBanList(const LLUUID& agent_id)
+bool LLParcel::removeFromBanList(const LLUUID& agent_id)
{
return remove_from_access_array(&mBanList, agent_id);
}
@@ -948,13 +948,13 @@ const std::string& LLParcel::getActionString(LLParcel::EAction action)
return PARCEL_ACTION_STRING[index];
}
-BOOL LLParcel::isSaleTimerExpired(const U64& time)
+bool LLParcel::isSaleTimerExpired(const U64& time)
{
if (mSaleTimerExpires.getStarted() == FALSE)
{
return false;
}
- BOOL expired = mSaleTimerExpires.checkExpirationAndReset(0.0f);
+ bool expired = mSaleTimerExpires.checkExpirationAndReset(0.0f);
if (expired)
{
mSaleTimerExpires.stop();
@@ -962,13 +962,13 @@ BOOL LLParcel::isSaleTimerExpired(const U64& time)
return expired;
}
-BOOL LLParcel::isMediaResetTimerExpired(const U64& time)
+bool LLParcel::isMediaResetTimerExpired(const U64& time)
{
- if (mMediaResetTimer.getStarted() == FALSE)
+ if (mMediaResetTimer.getStarted() == false)
{
return false;
}
- BOOL expired = mMediaResetTimer.checkExpirationAndReset(0.0f);
+ bool expired = mMediaResetTimer.checkExpirationAndReset(0.0f);
if (expired)
{
mMediaResetTimer.stop();
@@ -977,7 +977,7 @@ BOOL LLParcel::isMediaResetTimerExpired(const U64& time)
}
-void LLParcel::startSale(const LLUUID& buyer_id, BOOL is_buyer_group)
+void LLParcel::startSale(const LLUUID& buyer_id, bool is_buyer_group)
{
// TODO -- this and all Sale related methods need to move out of the LLParcel
// base class and into server-side-only LLSimParcel class
@@ -1043,7 +1043,7 @@ void LLParcel::completeSale(
// Turn off show directory, since it's a recurring fee that
// the buyer may not want.
- setParcelFlag(PF_SHOW_DIRECTORY, FALSE);
+ setParcelFlag(PF_SHOW_DIRECTORY, false);
//should be cleared on sale.
mAccessList.clear();
@@ -1070,12 +1070,12 @@ void LLParcel::clearSale()
setSellWithObjects(FALSE);
}
-BOOL LLParcel::isPublic() const
+bool LLParcel::isPublic() const
{
return (mOwnerID.isNull());
}
-BOOL LLParcel::isBuyerAuthorized(const LLUUID& buyer_id) const
+bool LLParcel::isBuyerAuthorized(const LLUUID& buyer_id) const
{
if(mAuthBuyerID.isNull())
{
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index f5ee1241ab..e3c27e7d73 100644
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -209,37 +209,37 @@ public:
LLParcel();
LLParcel(
const LLUUID &owner_id,
- BOOL modify,
- BOOL terraform,
- BOOL damage,
+ bool modify,
+ bool terraform,
+ bool damage,
time_t claim_date,
S32 claim_price,
S32 rent_price,
S32 area,
S32 sim_object_limit,
F32 parcel_object_bonus,
- BOOL is_group_owned = FALSE);
+ bool is_group_owned = false);
virtual ~LLParcel();
void init(
const LLUUID &owner_id,
- BOOL modify,
- BOOL terraform,
- BOOL damage,
+ bool modify,
+ bool terraform,
+ bool damage,
time_t claim_date,
S32 claim_price,
S32 rent_price,
S32 area,
S32 sim_object_limit,
F32 parcel_object_bonus,
- BOOL is_group_owned = FALSE);
+ bool is_group_owned = false);
// TODO: make an actual copy constructor for this
void overrideParcelFlags(U32 flags);
// if you specify an agent id here, the group id will be zeroed
void overrideOwner(
const LLUUID& owner_id,
- BOOL is_group_owned = FALSE);
+ bool is_group_owned = false);
void overrideSaleTimerExpires(F32 secs_left) { mSaleTimerExpires.setTimerExpirySec(secs_left); }
// MANIPULATORS
@@ -283,7 +283,7 @@ public:
void setAuctionID(U32 auction_id) { mAuctionID = auction_id;}
void setAllParcelFlags(U32 flags);
- void setParcelFlag(U32 flag, BOOL b);
+ void setParcelFlag(U32 flag, bool b);
virtual void setArea(S32 area, S32 sim_object_limit);
void setDiscountRate(F32 rate);
@@ -316,7 +316,7 @@ public:
void setPassHours(F32 hours) { mPassHours = hours; }
// BOOL importStream(std::istream& input_stream);
- BOOL importAccessEntry(std::istream& input_stream, LLAccessEntry* entry);
+ bool importAccessEntry(std::istream& input_stream, LLAccessEntry* entry);
// BOOL exportStream(std::ostream& output_stream);
void packMessage(LLMessageSystem* msg);
@@ -344,10 +344,10 @@ public:
void expirePasses(S32 now);
// Add to list, suppressing duplicates. Returns TRUE if added.
- BOOL addToAccessList(const LLUUID& agent_id, S32 time);
- BOOL addToBanList(const LLUUID& agent_id, S32 time);
- BOOL removeFromAccessList(const LLUUID& agent_id);
- BOOL removeFromBanList(const LLUUID& agent_id);
+ bool addToAccessList(const LLUUID& agent_id, S32 time);
+ bool addToBanList(const LLUUID& agent_id, S32 time);
+ bool removeFromAccessList(const LLUUID& agent_id);
+ bool removeFromBanList(const LLUUID& agent_id);
// ACCESSORS
const LLUUID& getID() const { return mID; }
@@ -377,14 +377,14 @@ public:
U32 getAuctionID() const { return mAuctionID; }
bool isInEscrow() const { return mInEscrow; }
- BOOL isPublic() const;
+ bool isPublic() const;
// Region-local user-specified position
const LLVector3& getUserLocation() const { return mUserLocation; }
const LLVector3& getUserLookAt() const { return mUserLookAt; }
ELandingType getLandingType() const { return mLandingType; }
- BOOL getSeeAVs() const { return mSeeAVs; }
- BOOL getHaveNewParcelLimitData() const { return mHaveNewParcelLimitData; }
+ bool getSeeAVs() const { return mSeeAVs; }
+ bool getHaveNewParcelLimitData() const { return mHaveNewParcelLimitData; }
// User-specified snapshot
const LLUUID& getSnapshotID() const { return mSnapshotID; }
@@ -395,7 +395,7 @@ public:
const LLUUID& getAuthorizedBuyerID() const { return mAuthBuyerID; }
// helper function
- BOOL isBuyerAuthorized(const LLUUID& buyer_id) const;
+ bool isBuyerAuthorized(const LLUUID& buyer_id) const;
// The buyer of a plot is set when someone indicates they want to
// buy the plot, and the system is simply waiting for tier-up
@@ -422,7 +422,7 @@ public:
// the isSaleTimerExpired will trivially return FALSE if there is
// no sale going on. Pass in the current time in usec which will
// be used for comparison.
- BOOL isSaleTimerExpired(const U64& time);
+ bool isSaleTimerExpired(const U64& time);
F32 getSaleTimerExpires() { return mSaleTimerExpires.getRemainingTimeF32(); }
@@ -431,7 +431,7 @@ public:
// need to record a few things with the parcel when a sale
// starts.
- void startSale(const LLUUID& buyer_id, BOOL is_buyer_group);
+ void startSale(const LLUUID& buyer_id, bool is_buyer_group);
// do the expiration logic, which needs to return values usable in
// a L$ transaction.
@@ -440,26 +440,26 @@ public:
void clearSale();
- BOOL isMediaResetTimerExpired(const U64& time);
+ bool isMediaResetTimerExpired(const U64& time);
// more accessors
U32 getParcelFlags() const { return mParcelFlags; }
- BOOL getParcelFlag(U32 flag) const
- { return (mParcelFlags & flag) ? TRUE : FALSE; }
+ bool getParcelFlag(U32 flag) const
+ { return (mParcelFlags & flag) ? true : false; }
// objects can be added or modified by anyone (only parcel owner if disabled)
- BOOL getAllowModify() const
- { return (mParcelFlags & PF_CREATE_OBJECTS) ? TRUE : FALSE; }
+ bool getAllowModify() const
+ { return (mParcelFlags & PF_CREATE_OBJECTS) ? true : false; }
// objects can be added or modified by group members
- BOOL getAllowGroupModify() const
- { return (mParcelFlags & PF_CREATE_GROUP_OBJECTS) ? TRUE : FALSE; }
+ bool getAllowGroupModify() const
+ { return (mParcelFlags & PF_CREATE_GROUP_OBJECTS) ? true : false; }
// the parcel can be deeded to the group
- BOOL getAllowDeedToGroup() const
- { return (mParcelFlags & PF_ALLOW_DEED_TO_GROUP) ? TRUE : FALSE; }
+ bool getAllowDeedToGroup() const
+ { return (mParcelFlags & PF_ALLOW_DEED_TO_GROUP) ? true : false; }
// Does the owner want to make a contribution along with the deed.
BOOL getContributeWithDeed() const
@@ -537,10 +537,10 @@ public:
S32 getClaimPrice() const { return mClaimPricePerMeter * mArea; }
// Can this agent create objects here?
- BOOL allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const;
+ bool allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const;
// Can this agent change the shape of the land?
- BOOL allowTerraformBy(const LLUUID &agent_id) const;
+ bool allowTerraformBy(const LLUUID &agent_id) const;
bool operator==(const LLParcel &rhs) const;
diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp
index d3b5734616..c6075134d2 100644
--- a/indra/llinventory/llpermissions.cpp
+++ b/indra/llinventory/llpermissions.cpp
@@ -87,21 +87,21 @@ void LLPermissions::initMasks(LLInventoryType::EType type)
}
}
-BOOL LLPermissions::getOwnership(LLUUID& owner_id, BOOL& is_group_owned) const
+bool LLPermissions::getOwnership(LLUUID& owner_id, bool& is_group_owned) const
{
if(mOwner.notNull())
{
owner_id = mOwner;
- is_group_owned = FALSE;
- return TRUE;
+ is_group_owned = false;
+ return true;
}
else if(mIsGroupOwned)
{
owner_id = mGroup;
- is_group_owned = TRUE;
- return TRUE;
+ is_group_owned = true;
+ return true;
}
- return FALSE;
+ return false;
}
LLUUID LLPermissions::getSafeOwner() const
@@ -232,13 +232,13 @@ void LLPermissions::accumulate(const LLPermissions& perm)
// saves last owner, sets current owner, and sets the group. note
// that this function has to more cleverly apply the fair use
// permissions.
-BOOL LLPermissions::setOwnerAndGroup(
+bool LLPermissions::setOwnerAndGroup(
const LLUUID& agent,
const LLUUID& owner,
const LLUUID& group,
bool is_atomic)
{
- BOOL allowed = FALSE;
+ bool allowed = false;
if( agent.isNull() || mOwner.isNull()
|| ((agent == mOwner) && ((owner == mOwner) || (mMaskOwner & PERM_TRANSFER)) ) )
@@ -246,7 +246,7 @@ BOOL LLPermissions::setOwnerAndGroup(
// ...system can alway set owner
// ...public objects can be claimed by anyone
// ...otherwise, agent must own it and have transfer ability
- allowed = TRUE;
+ allowed = true;
}
if (allowed)
@@ -301,7 +301,7 @@ void LLPermissions::yesReallySetOwner(const LLUUID& owner, bool group_owned)
mIsGroupOwned = group_owned;
}
-BOOL LLPermissions::deedToGroup(const LLUUID& agent, const LLUUID& group)
+bool LLPermissions::deedToGroup(const LLUUID& agent, const LLUUID& group)
{
if(group.notNull() && (agent.isNull() || ((group == mGroup)
&& (mMaskOwner & PERM_TRANSFER)
@@ -318,18 +318,18 @@ BOOL LLPermissions::deedToGroup(const LLUUID& agent, const LLUUID& group)
mIsGroupOwned = true;
fixFairUse();
fix();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLPermissions::setBaseBits(const LLUUID& agent, BOOL set, PermissionMask bits)
+bool LLPermissions::setBaseBits(const LLUUID& agent, bool set, PermissionMask bits)
{
- BOOL ownership = FALSE;
+ bool ownership = true;
if(agent.isNull())
{
// only the system is always allowed to change base bits
- ownership = TRUE;
+ ownership = true;
}
if (ownership)
@@ -351,19 +351,19 @@ BOOL LLPermissions::setBaseBits(const LLUUID& agent, BOOL set, PermissionMask bi
// Note: If you attempt to set bits that the base bits doesn't allow,
// the function will succeed, but those bits will not be set.
-BOOL LLPermissions::setOwnerBits(const LLUUID& agent, BOOL set, PermissionMask bits)
+bool LLPermissions::setOwnerBits(const LLUUID& agent, bool set, PermissionMask bits)
{
- BOOL ownership = FALSE;
+ bool ownership = false;
if(agent.isNull())
{
// ...system always allowed to change things
- ownership = TRUE;
+ ownership = true;
}
else if (agent == mOwner)
{
// ...owner bits can only be set by owner
- ownership = TRUE;
+ ownership = true;
}
// If we have correct ownership and
@@ -383,15 +383,15 @@ BOOL LLPermissions::setOwnerBits(const LLUUID& agent, BOOL set, PermissionMask b
return (ownership);
}
-BOOL LLPermissions::setGroupBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits)
+bool LLPermissions::setGroupBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits)
{
- BOOL ownership = FALSE;
+ bool ownership = false;
if((agent.isNull()) || (agent == mOwner)
|| ((group == mGroup) && (!mGroup.isNull())))
{
// The group bits can be set by the system, the owner, or a
// group member.
- ownership = TRUE;
+ ownership = true;
}
if (ownership)
@@ -412,15 +412,15 @@ BOOL LLPermissions::setGroupBits(const LLUUID& agent, const LLUUID& group, BOOL
// Note: If you attempt to set bits that the creator or owner doesn't allow,
// the function will succeed, but those bits will not be set.
-BOOL LLPermissions::setEveryoneBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits)
+bool LLPermissions::setEveryoneBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits)
{
- BOOL ownership = FALSE;
+ bool ownership = false;
if((agent.isNull()) || (agent == mOwner)
|| ((group == mGroup) && (!mGroup.isNull())))
{
// The everyone bits can be set by the system, the owner, or a
// group member.
- ownership = TRUE;
+ ownership = true;
}
if (ownership)
{
@@ -441,15 +441,15 @@ BOOL LLPermissions::setEveryoneBits(const LLUUID& agent, const LLUUID& group, BO
// Note: If you attempt to set bits that the creator or owner doesn't allow,
// the function will succeed, but those bits will not be set.
-BOOL LLPermissions::setNextOwnerBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits)
+bool LLPermissions::setNextOwnerBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits)
{
- BOOL ownership = FALSE;
+ bool ownership = false;
if((agent.isNull()) || (agent == mOwner)
|| ((group == mGroup) && (!mGroup.isNull())))
{
// The next owner bits can be set by the system, the owner, or
// a group member.
- ownership = TRUE;
+ ownership = true;
}
if (ownership)
{
@@ -478,7 +478,7 @@ bool LLPermissions::allowOperationBy(PermissionBit op, const LLUUID& requester,
{
// ...system making request
// ...not owned
- return TRUE;
+ return true;
}
else if (mIsGroupOwned && (mGroup == requester))
{
@@ -513,7 +513,7 @@ LLSD LLPermissions::packMessage() const
result["group-mask"] = (S32)mMaskGroup;
result["everyone-mask"] = (S32)mMaskEveryone;
result["next-owner-mask"]= (S32)mMaskNextOwner;
- result["group-owned"] = (BOOL)mIsGroupOwned;
+ result["group-owned"] = (bool)mIsGroupOwned;
return result;
}
@@ -531,7 +531,7 @@ void LLPermissions::packMessage(LLMessageSystem* msg) const
msg->addU32Fast(_PREHASH_GroupMask, mMaskGroup );
msg->addU32Fast(_PREHASH_EveryoneMask, mMaskEveryone );
msg->addU32Fast(_PREHASH_NextOwnerMask, mMaskNextOwner );
- msg->addBOOLFast(_PREHASH_GroupOwned, (BOOL)mIsGroupOwned);
+ msg->addBOOLFast(_PREHASH_GroupOwned, mIsGroupOwned);
}
void LLPermissions::unpackMessage(LLSD perms)
@@ -559,13 +559,13 @@ void LLPermissions::unpackMessage(LLMessageSystem* msg, const char* block, S32 b
msg->getU32Fast(block, _PREHASH_GroupMask, mMaskGroup, block_num );
msg->getU32Fast(block, _PREHASH_EveryoneMask, mMaskEveryone, block_num );
msg->getU32Fast(block, _PREHASH_NextOwnerMask, mMaskNextOwner, block_num );
- BOOL tmp;
+ bool tmp;
msg->getBOOLFast(block, _PREHASH_GroupOwned, tmp, block_num);
- mIsGroupOwned = (bool)tmp;
+ mIsGroupOwned = tmp;
}
-BOOL LLPermissions::importLegacyStream(std::istream& input_stream)
+bool LLPermissions::importLegacyStream(std::istream& input_stream)
{
init(LLUUID::null, LLUUID::null, LLUUID::null, LLUUID::null);
const S32 BUFSIZE = 16384;
@@ -661,11 +661,11 @@ BOOL LLPermissions::importLegacyStream(std::istream& input_stream)
}
}
fix();
- return TRUE;
+ return true;
}
-BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const
+bool LLPermissions::exportLegacyStream(std::ostream& output_stream) const
{
std::string uuid_str;
@@ -701,12 +701,9 @@ BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const
output_stream << "\t\tgroup_owned\t1\n";
}
output_stream << "\t}\n";
- return TRUE;
+ return true;
}
-// Deleted LLPermissions::exportFileXML() and LLPermissions::importXML()
-// because I can't find any non-test code references to it. 2009-05-04 JC
-
bool LLPermissions::operator==(const LLPermissions &rhs) const
{
return
@@ -791,21 +788,21 @@ U8 LLAggregatePermissions::getU8() const
return byte;
}
-BOOL LLAggregatePermissions::isEmpty() const
+bool LLAggregatePermissions::isEmpty() const
{
for(S32 i = 0; i < PI_END; ++i)
{
if(mBits[i] != AP_EMPTY)
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
void LLAggregatePermissions::aggregate(PermissionMask mask)
{
- BOOL is_allowed = mask & PERM_COPY;
+ bool is_allowed = mask & PERM_COPY;
aggregateBit(PI_COPY, is_allowed);
is_allowed = mask & PERM_MODIFY;
aggregateBit(PI_MODIFY, is_allowed);
@@ -821,7 +818,7 @@ void LLAggregatePermissions::aggregate(const LLAggregatePermissions& ag)
}
}
-void LLAggregatePermissions::aggregateBit(EPermIndex idx, BOOL allowed)
+void LLAggregatePermissions::aggregateBit(EPermIndex idx, bool allowed)
{
//if(AP_SOME == mBits[idx]) return; // P4 branch prediction optimization
switch(mBits[idx])
diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h
index bcf03b8e41..50326c61f4 100644
--- a/indra/llinventory/llpermissions.h
+++ b/indra/llinventory/llpermissions.h
@@ -162,7 +162,7 @@ public:
// either the owner id or the group id, and the is_group_owned
// parameter is appropriately filled. The values of owner_id and
// is_group_owned are not changed if the object is not owned.
- BOOL getOwnership(LLUUID& owner_id, BOOL& is_group_owned) const;
+ bool getOwnership(LLUUID& owner_id, bool& is_group_owned) const;
// Gets the 'safe' owner. This should never return LLUUID::null.
// If no group owned, return the agent owner id normally.
@@ -218,7 +218,7 @@ public:
// Currently, the only way to have a collection is when an object
// has inventory and is then itself rolled up into an inventory
// item.
- BOOL setOwnerAndGroup(const LLUUID& agent, const LLUUID& owner, const LLUUID& group, bool is_atomic);
+ bool setOwnerAndGroup(const LLUUID& agent, const LLUUID& owner, const LLUUID& group, bool is_atomic);
// only call this if you know what you're doing
// there are usually perm-bit consequences when the
@@ -239,16 +239,16 @@ public:
// owner transfer) then this function will deed the permissions,
// set the next owner mask, and return TRUE. Otherwise, no change
// is effected, and the function returns FALSE.
- BOOL deedToGroup(const LLUUID& agent, const LLUUID& group);
+ bool deedToGroup(const LLUUID& agent, const LLUUID& group);
// Attempt to set or clear the given bitmask. Returns TRUE if you
// are allowed to modify the permissions. If you attempt to turn
// on bits not allowed by the base bits, the function will return
// TRUE, but those bits will not be set.
- BOOL setBaseBits( const LLUUID& agent, BOOL set, PermissionMask bits);
- BOOL setOwnerBits( const LLUUID& agent, BOOL set, PermissionMask bits);
- BOOL setGroupBits( const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
- BOOL setEveryoneBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
- BOOL setNextOwnerBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
+ bool setBaseBits( const LLUUID& agent, bool set, PermissionMask bits);
+ bool setOwnerBits( const LLUUID& agent, bool set, PermissionMask bits);
+ bool setGroupBits( const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits);
+ bool setEveryoneBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits);
+ bool setNextOwnerBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits);
// This is currently only used in the Viewer to handle calling cards
// where the creator is actually used to store the target. Use with care.
@@ -312,8 +312,8 @@ public:
void packMessage(LLMessageSystem* msg) const;
void unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
- BOOL importLegacyStream(std::istream& input_stream);
- BOOL exportLegacyStream(std::ostream& output_stream) const;
+ bool importLegacyStream(std::istream& input_stream);
+ bool exportLegacyStream(std::ostream& output_stream) const;
bool operator==(const LLPermissions &rhs) const;
bool operator!=(const LLPermissions &rhs) const;
@@ -409,8 +409,8 @@ public:
// LSB is to the right
U8 getU8() const;
- // return TRUE is the aggregate permissions are empty, otherwise FALSE.
- BOOL isEmpty() const ;
+ // return true is the aggregate permissions are empty, otherwise false.
+ bool isEmpty() const ;
// pass in a PERM_COPY, PERM_TRANSFER, etc, and an EValue
// enumeration to specifically set that value. Not implemented
@@ -440,7 +440,7 @@ protected:
PI_END = 3,
PI_COUNT = 3
};
- void aggregateBit(EPermIndex idx, BOOL allowed);
+ void aggregateBit(EPermIndex idx, bool allowed);
void aggregateIndex(EPermIndex idx, U8 bits);
static EPermIndex perm2PermIndex(PermissionBit bit);
diff --git a/indra/llmath/llcoordframe.h b/indra/llmath/llcoordframe.h
index 909adf260c..1d3f4f7e3e 100644
--- a/indra/llmath/llcoordframe.h
+++ b/indra/llmath/llcoordframe.h
@@ -61,7 +61,7 @@ public:
//LLCoordFrame(const F32 *origin, const F32 *rotation); // Assumes "origin" is 1x3 and "rotation" is 1x9 array
//LLCoordFrame(const F32 *origin_and_rotation); // Assumes "origin_and_rotation" is 1x12 array
- BOOL isFinite() { return mOrigin.isFinite() && mXAxis.isFinite() && mYAxis.isFinite() && mZAxis.isFinite(); }
+ bool isFinite() { return mOrigin.isFinite() && mXAxis.isFinite() && mYAxis.isFinite() && mZAxis.isFinite(); }
void reset();
void resetAxes();
diff --git a/indra/llmath/llinterp.h b/indra/llmath/llinterp.h
index 5187646179..a107d301d8 100644
--- a/indra/llmath/llinterp.h
+++ b/indra/llmath/llinterp.h
@@ -41,7 +41,6 @@ class LLInterpVal
{
public:
virtual ~LLInterpVal() {}
- virtual void interp(LLInterpVal &target, const F32 frac); // Linear interpolation for each type
};
template
@@ -52,7 +51,7 @@ public:
virtual ~LLInterp() {}
virtual void start();
- void update(const F32 time);
+ virtual void update(const F32 time) = 0;
const Type &getCurVal() const;
void setStartVal(const Type &start_val);
@@ -67,15 +66,15 @@ public:
void setEndTime(const F32 time);
F32 getEndTime() const;
- BOOL isActive() const;
- BOOL isDone() const;
+ bool isActive() const;
+ bool isDone() const;
protected:
F32 mStartTime;
F32 mEndTime;
F32 mDuration;
- BOOL mActive;
- BOOL mDone;
+ bool mActive;
+ bool mDone;
Type mStartVal;
Type mEndVal;
@@ -88,8 +87,8 @@ template
class LLInterpLinear : public LLInterp
{
public:
- /*virtual*/ void start();
- void update(const F32 time);
+ void start() override;
+ void update(const F32 time) override;
F32 getCurFrac() const;
protected:
F32 mCurFrac;
@@ -108,10 +107,10 @@ class LLInterpAttractor : public LLInterp
{
public:
LLInterpAttractor();
- /*virtual*/ void start();
+ void start() override;
void setStartVel(const Type &vel);
void setForce(const F32 force);
- void update(const F32 time);
+ void update(const F32 time) override;
protected:
F32 mForce;
Type mStartVel;
@@ -123,7 +122,7 @@ class LLInterpFunc : public LLInterp
{
public:
LLInterpFunc();
- void update(const F32 time);
+ void update(const F32 time) override;
void setFunc(Type (*)(const F32, void *data), void *data);
protected:
@@ -151,8 +150,8 @@ LLInterp::LLInterp()
mEndTime = 1.f;
mDuration = 1.f;
mCurTime = 0.f;
- mDone = FALSE;
- mActive = FALSE;
+ mDone = false;
+ mActive = false;
}
template
@@ -166,8 +165,8 @@ void LLInterp::start()
{
mCurVal = mStartVal;
mCurTime = mStartTime;
- mDone = FALSE;
- mActive = FALSE;
+ mDone = false;
+ mActive = false;
}
template
@@ -225,13 +224,13 @@ F32 LLInterp::getEndTime() const
template
-BOOL LLInterp::isDone() const
+bool LLInterp::isDone() const
{
return mDone;
}
template
-BOOL LLInterp::isActive() const
+bool LLInterp::isActive() const
{
return mActive;
}
@@ -254,7 +253,7 @@ void LLInterpLinear::update(const F32 time)
F32 dfrac = target_frac - this->mCurFrac;
if (target_frac >= 0.f)
{
- this->mActive = TRUE;
+ this->mActive = true;
}
if (target_frac > 1.f)
@@ -262,7 +261,7 @@ void LLInterpLinear::update(const F32 time)
this->mCurVal = this->mEndVal;
this->mCurFrac = 1.f;
this->mCurTime = time;
- this->mDone = TRUE;
+ this->mDone = true;
return;
}
@@ -332,7 +331,7 @@ void LLInterpAttractor::update(const F32 time)
{
if (time > this->mStartTime)
{
- this->mActive = TRUE;
+ this->mActive = true;
}
else
{
@@ -340,7 +339,7 @@ void LLInterpAttractor::update(const F32 time)
}
if (time > this->mEndTime)
{
- this->mDone = TRUE;
+ this->mDone = true;
return;
}
@@ -362,8 +361,8 @@ void LLInterpAttractor::update(const F32 time)
template
LLInterpFunc::LLInterpFunc() : LLInterp()
{
- mFunc = NULL;
- mData = NULL;
+ mFunc = nullptr;
+ mData = nullptr;
}
template
@@ -378,7 +377,7 @@ void LLInterpFunc::update(const F32 time)
{
if (time > this->mStartTime)
{
- this->mActive = TRUE;
+ this->mActive = true;
}
else
{
@@ -386,7 +385,7 @@ void LLInterpFunc::update(const F32 time)
}
if (time > this->mEndTime)
{
- this->mDone = TRUE;
+ this->mDone = true;
return;
}
@@ -405,7 +404,7 @@ void LLInterpExp::update(const F32 time)
F32 target_frac = (time - this->mStartTime) / this->mDuration;
if (target_frac >= 0.f)
{
- this->mActive = TRUE;
+ this->mActive = true;
}
if (target_frac > 1.f)
@@ -413,7 +412,7 @@ void LLInterpExp::update(const F32 time)
this->mCurVal = this->mEndVal;
this->mCurFrac = 1.f;
this->mCurTime = time;
- this->mDone = TRUE;
+ this->mDone = true;
return;
}
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index 9a278c580b..604c6ed348 100644
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
@@ -59,34 +59,34 @@
#define tanf(x) ((F32)tan((F64)(x)))
#endif*/
-const F32 GRAVITY = -9.8f;
+constexpr F32 GRAVITY = -9.8f;
// mathematical constants
-const F32 F_PI = 3.1415926535897932384626433832795f;
-const F32 F_TWO_PI = 6.283185307179586476925286766559f;
-const F32 F_PI_BY_TWO = 1.5707963267948966192313216916398f;
-const F32 F_SQRT_TWO_PI = 2.506628274631000502415765284811f;
-const F32 F_E = 2.71828182845904523536f;
-const F32 F_SQRT2 = 1.4142135623730950488016887242097f;
-const F32 F_SQRT3 = 1.73205080756888288657986402541f;
-const F32 OO_SQRT2 = 0.7071067811865475244008443621049f;
-const F32 OO_SQRT3 = 0.577350269189625764509f;
-const F32 DEG_TO_RAD = 0.017453292519943295769236907684886f;
-const F32 RAD_TO_DEG = 57.295779513082320876798154814105f;
-const F32 F_APPROXIMATELY_ZERO = 0.00001f;
-const F32 F_LN10 = 2.3025850929940456840179914546844f;
-const F32 OO_LN10 = 0.43429448190325182765112891891661f;
-const F32 F_LN2 = 0.69314718056f;
-const F32 OO_LN2 = 1.4426950408889634073599246810019f;
+constexpr F32 F_PI = 3.1415926535897932384626433832795f;
+constexpr F32 F_TWO_PI = 6.283185307179586476925286766559f;
+constexpr F32 F_PI_BY_TWO = 1.5707963267948966192313216916398f;
+constexpr F32 F_SQRT_TWO_PI = 2.506628274631000502415765284811f;
+constexpr F32 F_E = 2.71828182845904523536f;
+constexpr F32 F_SQRT2 = 1.4142135623730950488016887242097f;
+constexpr F32 F_SQRT3 = 1.73205080756888288657986402541f;
+constexpr F32 OO_SQRT2 = 0.7071067811865475244008443621049f;
+constexpr F32 OO_SQRT3 = 0.577350269189625764509f;
+constexpr F32 DEG_TO_RAD = 0.017453292519943295769236907684886f;
+constexpr F32 RAD_TO_DEG = 57.295779513082320876798154814105f;
+constexpr F32 F_APPROXIMATELY_ZERO = 0.00001f;
+constexpr F32 F_LN10 = 2.3025850929940456840179914546844f;
+constexpr F32 OO_LN10 = 0.43429448190325182765112891891661f;
+constexpr F32 F_LN2 = 0.69314718056f;
+constexpr F32 OO_LN2 = 1.4426950408889634073599246810019f;
-const F32 F_ALMOST_ZERO = 0.0001f;
-const F32 F_ALMOST_ONE = 1.0f - F_ALMOST_ZERO;
+constexpr F32 F_ALMOST_ZERO = 0.0001f;
+constexpr F32 F_ALMOST_ONE = 1.0f - F_ALMOST_ZERO;
-const F32 GIMBAL_THRESHOLD = 0.000436f; // sets the gimballock threshold 0.025 away from +/-90 degrees
+constexpr F32 GIMBAL_THRESHOLD = 0.000436f; // sets the gimballock threshold 0.025 away from +/-90 degrees
// formula: GIMBAL_THRESHOLD = sin(DEG_TO_RAD * gimbal_threshold_angle);
// BUG: Eliminate in favor of F_APPROXIMATELY_ZERO above?
-const F32 FP_MAG_THRESHOLD = 0.0000001f;
+constexpr F32 FP_MAG_THRESHOLD = 0.0000001f;
// TODO: Replace with logic like is_approx_equal
inline bool is_approx_zero( F32 f ) { return (-F_APPROXIMATELY_ZERO < f) && (f < F_APPROXIMATELY_ZERO); }
@@ -123,13 +123,13 @@ inline bool is_zero(F32 x)
inline bool is_approx_equal(F32 x, F32 y)
{
- const S32 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
+ constexpr S32 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
return (std::abs((S32) ((U32&)x - (U32&)y) ) < COMPARE_MANTISSA_UP_TO_BIT);
}
inline bool is_approx_equal(F64 x, F64 y)
{
- const S64 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
+ constexpr S64 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
return (std::abs((S32) ((U64&)x - (U64&)y) ) < COMPARE_MANTISSA_UP_TO_BIT);
}
@@ -272,8 +272,8 @@ inline F64 ll_round( F64 val, F64 nearest )
// peak error = -31.4 dB
// RMS error = -28.1 dB
-const F32 FAST_MAG_ALPHA = 0.960433870103f;
-const F32 FAST_MAG_BETA = 0.397824734759f;
+constexpr F32 FAST_MAG_ALPHA = 0.960433870103f;
+constexpr F32 FAST_MAG_BETA = 0.397824734759f;
// these provide minimum RMS error
//
@@ -281,8 +281,8 @@ const F32 FAST_MAG_BETA = 0.397824734759f;
// peak error = -32.6 dB
// RMS error = -25.7 dB
//
-//const F32 FAST_MAG_ALPHA = 0.948059448969f;
-//const F32 FAST_MAG_BETA = 0.392699081699f;
+//constexpr F32 FAST_MAG_ALPHA = 0.948059448969f;
+//constexpr F32 FAST_MAG_BETA = 0.392699081699f;
inline F32 fastMagnitude(F32 a, F32 b)
{
@@ -299,8 +299,8 @@ inline F32 fastMagnitude(F32 a, F32 b)
//
// Culled from www.stereopsis.com/FPU.html
-const F64 LL_DOUBLE_TO_FIX_MAGIC = 68719476736.0*1.5; //2^36 * 1.5, (52-_shiftamt=36) uses limited precisicion to floor
-const S32 LL_SHIFT_AMOUNT = 16; //16.16 fixed point representation,
+constexpr F64 LL_DOUBLE_TO_FIX_MAGIC = 68719476736.0*1.5; //2^36 * 1.5, (52-_shiftamt=36) uses limited precisicion to floor
+constexpr S32 LL_SHIFT_AMOUNT = 16; //16.16 fixed point representation,
// Endian dependent code
#ifdef LL_LITTLE_ENDIAN
diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h
index e562ef4e66..77034c2468 100644
--- a/indra/llmath/lloctree.h
+++ b/indra/llmath/lloctree.h
@@ -579,7 +579,7 @@ public:
}
}
- void addChild(oct_node* child, BOOL silent = FALSE)
+ void addChild(oct_node* child, bool silent = false)
{
#if LL_OCTREE_PARANOIA_CHECK
@@ -626,7 +626,7 @@ public:
}
}
- void removeChild(S32 index, BOOL destroy = FALSE)
+ void removeChild(S32 index, bool destroy = false)
{
for (U32 i = 0; i < this->getListenerCount(); i++)
{
@@ -673,7 +673,7 @@ public:
{
if (getChild(i) == node)
{
- removeChild(i, TRUE);
+ removeChild(i, true);
return;
}
}
@@ -742,7 +742,7 @@ public:
//(don't notify listeners of addition)
for (U32 i = 0; i < child->getChildCount(); i++)
{
- this->addChild(child->getChild(i), TRUE);
+ this->addChild(child->getChild(i), true);
}
//destroy child
@@ -758,7 +758,7 @@ public:
// LLOctreeRoot::insert
bool insert(T* data) override
{
- if (data == NULL)
+ if (data == nullptr)
{
OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE ROOT !!!" << LL_ENDL;
return false;
diff --git a/indra/llmath/llquaternion.cpp b/indra/llmath/llquaternion.cpp
index 1e7c39df65..0d1ffa5857 100644
--- a/indra/llmath/llquaternion.cpp
+++ b/indra/llmath/llquaternion.cpp
@@ -959,7 +959,7 @@ void LLQuaternion::unpackFromVector3( const LLVector3& vec )
}
}
-BOOL LLQuaternion::parseQuat(const std::string& buf, LLQuaternion* value)
+bool LLQuaternion::parseQuat(const std::string& buf, LLQuaternion* value)
{
if( buf.empty() || value == NULL)
{
diff --git a/indra/llmath/llquaternion.h b/indra/llmath/llquaternion.h
index 51ce163b4e..1c9da7c342 100644
--- a/indra/llmath/llquaternion.h
+++ b/indra/llmath/llquaternion.h
@@ -69,9 +69,9 @@ public:
LLSD getValue() const;
void setValue(const LLSD& sd);
- BOOL isIdentity() const;
- BOOL isNotIdentity() const;
- BOOL isFinite() const; // checks to see if all values of LLQuaternion are finite
+ bool isIdentity() const;
+ bool isNotIdentity() const;
+ bool isFinite() const; // checks to see if all values of LLQuaternion are finite
void quantize16(F32 lower, F32 upper); // changes the vector to reflect quatization
void quantize8(F32 lower, F32 upper); // changes the vector to reflect quatization
void loadIdentity(); // Loads the quaternion that represents the identity rotation
@@ -167,7 +167,7 @@ public:
friend const char *OrderToString( const Order order );
friend Order StringToOrder( const char *str );
- static BOOL parseQuat(const std::string& buf, LLQuaternion* value);
+ static bool parseQuat(const std::string& buf, LLQuaternion* value);
// For debugging, only
//static U32 mMultCount;
@@ -192,12 +192,12 @@ inline void LLQuaternion::setValue(const LLSD& sd)
}
// checker
-inline BOOL LLQuaternion::isFinite() const
+inline bool LLQuaternion::isFinite() const
{
return (llfinite(mQ[VX]) && llfinite(mQ[VY]) && llfinite(mQ[VZ]) && llfinite(mQ[VS]));
}
-inline BOOL LLQuaternion::isIdentity() const
+inline bool LLQuaternion::isIdentity() const
{
return
( mQ[VX] == 0.f ) &&
@@ -206,7 +206,7 @@ inline BOOL LLQuaternion::isIdentity() const
( mQ[VS] == 1.f );
}
-inline BOOL LLQuaternion::isNotIdentity() const
+inline bool LLQuaternion::isNotIdentity() const
{
return
( mQ[VX] != 0.f ) ||
diff --git a/indra/llmath/llrect.h b/indra/llmath/llrect.h
index 58f02d4d2b..4da29482fd 100644
--- a/indra/llmath/llrect.h
+++ b/indra/llmath/llrect.h
@@ -83,14 +83,14 @@ public:
}
// Note: follows GL_QUAD conventions: the top and right edges are not considered part of the rect
- BOOL pointInRect(const Type x, const Type y) const
+ bool pointInRect(const Type x, const Type y) const
{
return mLeft <= x && x < mRight &&
mBottom <= y && y < mTop;
}
//// Note: follows GL_QUAD conventions: the top and right edges are not considered part of the rect
- BOOL localPointInRect(const Type x, const Type y) const
+ bool localPointInRect(const Type x, const Type y) const
{
return 0 <= x && x < getWidth() &&
0 <= y && y < getHeight();
@@ -138,7 +138,7 @@ public:
// Note: Does NOT follow GL_QUAD conventions: the top and right edges ARE considered part of the rect
// returns TRUE if any part of rect is is inside this LLRect
- BOOL overlaps(const LLRectBase& rect) const
+ bool overlaps(const LLRectBase& rect) const
{
return !(mLeft > rect.mRight
|| mRight < rect.mLeft
@@ -146,7 +146,7 @@ public:
|| mTop < rect.mBottom);
}
- BOOL contains(const LLRectBase& rect) const
+ bool contains(const LLRectBase& rect) const
{
return mLeft <= rect.mLeft
&& mRight >= rect.mRight
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 020f1c6891..f6de76a1c1 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -114,31 +114,31 @@ struct TrianglesPerLODCache
};
//
-BOOL check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm)
-{
+bool check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm)
+{
LLVector3 test = (pt2-pt1)%(pt3-pt2);
//answer
if(test * norm < 0)
{
- return FALSE;
+ return false;
}
else
{
- return TRUE;
+ return true;
}
}
-BOOL LLLineSegmentBoxIntersect(const LLVector3& start, const LLVector3& end, const LLVector3& center, const LLVector3& size)
+bool LLLineSegmentBoxIntersect(const LLVector3& start, const LLVector3& end, const LLVector3& center, const LLVector3& size)
{
return LLLineSegmentBoxIntersect(start.mV, end.mV, center.mV, size.mV);
}
-BOOL LLLineSegmentBoxIntersect(const F32* start, const F32* end, const F32* center, const F32* size)
+bool LLLineSegmentBoxIntersect(const F32* start, const F32* end, const F32* center, const F32* size)
{
- F32 fAWdU[3];
- F32 dir[3];
- F32 diff[3];
+ F32 fAWdU[3]{};
+ F32 dir[3]{};
+ F32 diff[3]{};
for (U32 i = 0; i < 3; i++)
{
@@ -240,7 +240,7 @@ void calc_tangent_from_triangle(
// and returns the intersection point along dir in intersection_t.
// Moller-Trumbore algorithm
-BOOL LLTriangleRayIntersect(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
+bool LLTriangleRayIntersect(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
F32& intersection_a, F32& intersection_b, F32& intersection_t)
{
@@ -302,15 +302,15 @@ BOOL LLTriangleRayIntersect(const LLVector4a& vert0, const LLVector4a& vert1, co
intersection_a = u[0];
intersection_b = v[0];
intersection_t = t[0];
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
-BOOL LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
+bool LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
F32& intersection_a, F32& intersection_b, F32& intersection_t)
{
F32 u, v, t;
@@ -333,7 +333,7 @@ BOOL LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& v
if (det > -F_APPROXIMATELY_ZERO && det < F_APPROXIMATELY_ZERO)
{
- return FALSE;
+ return false;
}
F32 inv_det = 1.f / det;
@@ -346,7 +346,7 @@ BOOL LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& v
u = (tvec.dot3(pvec).getF32()) * inv_det;
if (u < 0.f || u > 1.f)
{
- return FALSE;
+ return false;
}
/* prepare to test V parameter */
@@ -357,7 +357,7 @@ BOOL LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& v
if (v < 0.f || u + v > 1.f)
{
- return FALSE;
+ return false;
}
/* calculate t, ray intersects triangle */
@@ -368,32 +368,9 @@ BOOL LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& v
intersection_t = t;
- return TRUE;
+ return true;
}
-//helper for non-aligned vectors
-BOOL LLTriangleRayIntersect(const LLVector3& vert0, const LLVector3& vert1, const LLVector3& vert2, const LLVector3& orig, const LLVector3& dir,
- F32& intersection_a, F32& intersection_b, F32& intersection_t, BOOL two_sided)
-{
- LLVector4a vert0a, vert1a, vert2a, origa, dira;
- vert0a.load3(vert0.mV);
- vert1a.load3(vert1.mV);
- vert2a.load3(vert2.mV);
- origa.load3(orig.mV);
- dira.load3(dir.mV);
-
- if (two_sided)
- {
- return LLTriangleRayIntersectTwoSided(vert0a, vert1a, vert2a, origa, dira,
- intersection_a, intersection_b, intersection_t);
- }
- else
- {
- return LLTriangleRayIntersect(vert0a, vert1a, vert2a, origa, dira,
- intersection_a, intersection_b, intersection_t);
- }
-}
-
class LLVolumeOctreeRebound : public LLOctreeTravelerDepthFirst
{
public:
@@ -843,16 +820,16 @@ S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 de
}
-BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
- BOOL is_sculpted, S32 sculpt_size)
+bool LLProfile::generate(const LLProfileParams& params, bool path_open,F32 detail, S32 split,
+ bool is_sculpted, S32 sculpt_size)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
if ((!mDirty) && (!is_sculpted))
{
- return FALSE;
+ return false;
}
- mDirty = FALSE;
+ mDirty = false;
if (detail < MIN_LOD)
{
@@ -873,7 +850,7 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
if (begin > end - 0.01f)
{
LL_WARNS() << "LLProfile::generate() assertion failed (begin >= end)" << LL_ENDL;
- return FALSE;
+ return false;
}
S32 face_num = 0;
@@ -1054,11 +1031,11 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
}
if (mOpen && !params.getHollow())
{
- addFace(0,mTotal-1,0,LL_FACE_OUTER_SIDE_0, FALSE);
+ addFace(0,mTotal-1,0,LL_FACE_OUTER_SIDE_0, false);
}
else
{
- addFace(0,mTotal,0,LL_FACE_OUTER_SIDE_0, FALSE);
+ addFace(0,mTotal,0,LL_FACE_OUTER_SIDE_0, false);
}
if (hollow)
@@ -1066,15 +1043,15 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
switch (hole_type)
{
case LL_PCODE_HOLE_SQUARE:
- addHole(params, TRUE, 2, 0.5f, hollow, 0.5f, split);
+ addHole(params, true, 2, 0.5f, hollow, 0.5f, split);
break;
case LL_PCODE_HOLE_TRIANGLE:
- addHole(params, TRUE, 3, 0.5f, hollow, 0.5f, split);
+ addHole(params, true, 3, 0.5f, hollow, 0.5f, split);
break;
case LL_PCODE_HOLE_CIRCLE:
case LL_PCODE_HOLE_SAME:
default:
- addHole(params, FALSE, circle_detail, 0.5f, hollow, 0.5f);
+ addHole(params, false, circle_detail, 0.5f, hollow, 0.5f);
break;
}
}
@@ -1082,11 +1059,11 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
// Special case for openness of sphere
if ((params.getEnd() - params.getBegin()) < 1.f)
{
- mOpen = TRUE;
+ mOpen = true;
}
else if (!hollow)
{
- mOpen = FALSE;
+ mOpen = false;
mProfile.push_back(mProfile[0]);
mTotal++;
}
@@ -1104,19 +1081,19 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
if ( mOpen) // interior edge caps
{
- addFace(mTotal-1, 2,0.5,LL_FACE_PROFILE_BEGIN, TRUE);
+ addFace(mTotal-1, 2,0.5,LL_FACE_PROFILE_BEGIN, true);
if (hollow)
{
- addFace(mTotalOut-1, 2,0.5,LL_FACE_PROFILE_END, TRUE);
+ addFace(mTotalOut-1, 2,0.5,LL_FACE_PROFILE_END, true);
}
else
{
- addFace(mTotal-2, 2,0.5,LL_FACE_PROFILE_END, TRUE);
+ addFace(mTotal-2, 2,0.5,LL_FACE_PROFILE_END, true);
}
}
- return TRUE;
+ return true;
}
@@ -1561,14 +1538,14 @@ S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
return np;
}
-BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
- BOOL is_sculpted, S32 sculpt_size)
+bool LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
+ bool is_sculpted, S32 sculpt_size)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
if ((!mDirty) && (!is_sculpted))
{
- return FALSE;
+ return false;
}
if (detail < MIN_LOD)
@@ -1577,11 +1554,11 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
detail = MIN_LOD;
}
- mDirty = FALSE;
+ mDirty = false;
S32 np = 2; // hardcode for line
mPath.resize(0);
- mOpen = TRUE;
+ mOpen = true;
// Is this 0xf0 mask really necessary? DK 03/02/05
switch (params.getCurveType() & 0xf0)
@@ -1641,7 +1618,7 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
if (params.getEnd() - params.getBegin() >= 0.99f &&
params.getScaleX() >= .99f)
{
- mOpen = FALSE;
+ mOpen = false;
}
//genNGon(params, llfloor(MIN_DETAIL_FACES * detail), 4.f, 0.f);
@@ -1685,19 +1662,19 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
break;
};
- if (params.getTwist() != params.getTwistBegin()) mOpen = TRUE;
+ if (params.getTwist() != params.getTwistBegin()) mOpen = true;
//if ((int(fabsf(params.getTwist() - params.getTwistBegin())*100))%100 != 0) {
- // mOpen = TRUE;
+ // mOpen = true;
//}
- return TRUE;
+ return true;
}
-BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
- BOOL is_sculpted, S32 sculpt_size)
+bool LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
+ bool is_sculpted, S32 sculpt_size)
{
- mOpen = TRUE; // Draw end caps
+ mOpen = true; // Draw end caps
if (getPathLength() == 0)
{
// Path hasn't been generated yet.
@@ -1716,7 +1693,7 @@ BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
}
}
- return TRUE;
+ return true;
}
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 7bed7bff17..de4af4a82e 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -706,9 +706,9 @@ public:
static S32 getNumPoints(const LLProfileParams& params, BOOL path_open, F32 detail = 1.0f, S32 split = 0,
BOOL is_sculpted = FALSE, S32 sculpt_size = 0);
- BOOL generate(const LLProfileParams& params, BOOL path_open, F32 detail = 1.0f, S32 split = 0,
- BOOL is_sculpted = FALSE, S32 sculpt_size = 0);
- BOOL isConcave() const { return mConcave; }
+ bool generate(const LLProfileParams& params, bool path_open, F32 detail = 1.0f, S32 split = 0,
+ bool is_sculpted = false, S32 sculpt_size = 0);
+ bool isConcave() const { return mConcave; }
public:
struct Face
{
@@ -795,8 +795,8 @@ public:
static S32 getNumNGonPoints(const LLPathParams& params, S32 sides, F32 offset=0.0f, F32 end_scale = 1.f, F32 twist_scale = 1.f);
void genNGon(const LLPathParams& params, S32 sides, F32 offset=0.0f, F32 end_scale = 1.f, F32 twist_scale = 1.f);
- virtual BOOL generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0,
- BOOL is_sculpted = FALSE, S32 sculpt_size = 0);
+ virtual bool generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0,
+ bool is_sculpted = false, S32 sculpt_size = 0);
BOOL isOpen() const { return mOpen; }
F32 getStep() const { return mStep; }
@@ -822,8 +822,8 @@ class LLDynamicPath : public LLPath
{
public:
LLDynamicPath() : LLPath() { }
- /*virtual*/ BOOL generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0,
- BOOL is_sculpted = FALSE, S32 sculpt_size = 0);
+ /*virtual*/ bool generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0,
+ bool is_sculpted = false, S32 sculpt_size = 0);
};
// Yet another "face" class - caches volume-specific, but not instance-specific data for faces)
@@ -1110,9 +1110,7 @@ private:
F32 sculptGetSurfaceArea();
void sculptGenerateEmptyPlaceholder();
void sculptGenerateSpherePlaceholder();
- void sculptCalcMeshResolution(U16 width, U16 height, U8 type, S32& s, S32& t);
-
protected:
BOOL generate();
void createVolumeFaces();
@@ -1157,18 +1155,13 @@ private:
std::ostream& operator<<(std::ostream &s, const LLVolumeParams &volume_params);
-BOOL LLLineSegmentBoxIntersect(const F32* start, const F32* end, const F32* center, const F32* size);
-BOOL LLLineSegmentBoxIntersect(const LLVector3& start, const LLVector3& end, const LLVector3& center, const LLVector3& size);
-BOOL LLLineSegmentBoxIntersect(const LLVector4a& start, const LLVector4a& end, const LLVector4a& center, const LLVector4a& size);
+bool LLLineSegmentBoxIntersect(const F32* start, const F32* end, const F32* center, const F32* size);
+bool LLLineSegmentBoxIntersect(const LLVector3& start, const LLVector3& end, const LLVector3& center, const LLVector3& size);
+bool LLLineSegmentBoxIntersect(const LLVector4a& start, const LLVector4a& end, const LLVector4a& center, const LLVector4a& size);
-//BOOL LLTriangleRayIntersect(const LLVector3& vert0, const LLVector3& vert1, const LLVector3& vert2, const LLVector3& orig, const LLVector3& dir,
-// F32& intersection_a, F32& intersection_b, F32& intersection_t, BOOL two_sided);
-
-BOOL LLTriangleRayIntersect(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
+bool LLTriangleRayIntersect(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
F32& intersection_a, F32& intersection_b, F32& intersection_t);
-BOOL LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
+bool LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
F32& intersection_a, F32& intersection_b, F32& intersection_t);
-
-
#endif
diff --git a/indra/llmath/llvolumeoctree.cpp b/indra/llmath/llvolumeoctree.cpp
index 6894d04d3c..cef4d66c04 100644
--- a/indra/llmath/llvolumeoctree.cpp
+++ b/indra/llmath/llvolumeoctree.cpp
@@ -27,7 +27,7 @@
#include "llvolumeoctree.h"
#include "llvector4a.h"
-BOOL LLLineSegmentBoxIntersect(const LLVector4a& start, const LLVector4a& end, const LLVector4a& center, const LLVector4a& size)
+bool LLLineSegmentBoxIntersect(const LLVector4a& start, const LLVector4a& end, const LLVector4a& center, const LLVector4a& size)
{
LLVector4a fAWdU;
LLVector4a dir;
diff --git a/indra/llmath/raytrace.cpp b/indra/llmath/raytrace.cpp
index 314255374a..c3956e9995 100644
--- a/indra/llmath/raytrace.cpp
+++ b/indra/llmath/raytrace.cpp
@@ -710,7 +710,7 @@ U32 ray_box(const LLVector3 &ray_point, const LLVector3 &ray_direction,
}
-BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &prism_center, const LLVector3 &prism_scale, const LLQuaternion &prism_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@@ -751,7 +751,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
point5 = (point5 * prism_rotation) + prism_center;
// test ray intersection for each face
- BOOL b_hit = FALSE;
+ bool b_hit = false;
LLVector3 face_intersection, face_normal;
F32 distance_squared = 0.0f;
F32 temp;
@@ -761,14 +761,14 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
ray_quadrangle(ray_point, ray_direction, point5, point2, point0, intersection, intersection_normal))
{
distance_squared = (ray_point - intersection).magVecSquared();
- b_hit = TRUE;
+ b_hit = true;
}
// face 1
if (ray_direction * ( (point0 - point3) % (point2 - point3)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point2, point3, point0, face_intersection, face_normal))
{
- if (TRUE == b_hit)
+ if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@@ -783,7 +783,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
- b_hit = TRUE;
+ b_hit = true;
}
}
@@ -791,7 +791,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point1 - point4) % (point3 - point4)) < 0.0f &&
ray_quadrangle(ray_point, ray_direction, point3, point4, point1, face_intersection, face_normal))
{
- if (TRUE == b_hit)
+ if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@@ -806,7 +806,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
- b_hit = TRUE;
+ b_hit = true;
}
}
@@ -814,7 +814,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point5 - point4) % (point1 - point4)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point1, point4, point5, face_intersection, face_normal))
{
- if (TRUE == b_hit)
+ if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@@ -829,7 +829,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
- b_hit = TRUE;
+ b_hit = true;
}
}
@@ -837,7 +837,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point4 - point5) % (point2 - point5)) < 0.0f &&
ray_quadrangle(ray_point, ray_direction, point2, point5, point4, face_intersection, face_normal))
{
- if (TRUE == b_hit)
+ if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@@ -852,7 +852,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
- b_hit = TRUE;
+ b_hit = true;
}
}
@@ -860,7 +860,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
}
-BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &t_center, const LLVector3 &t_scale, const LLQuaternion &t_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@@ -890,7 +890,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
point3 = (point3 * t_rotation) + t_center;
// test ray intersection for each face
- BOOL b_hit = FALSE;
+ bool b_hit = false;
LLVector3 face_intersection, face_normal;
F32 distance_squared = 1.0e12f;
F32 temp;
@@ -900,14 +900,14 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
ray_triangle(ray_point, ray_direction, point1, point2, point0, intersection, intersection_normal))
{
distance_squared = (ray_point - intersection).magVecSquared();
- b_hit = TRUE;
+ b_hit = true;
}
// face 1
if (ray_direction * ( (point3 - point2) % (point0 - point2)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point2, point3, point0, face_intersection, face_normal))
{
- if (TRUE == b_hit)
+ if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@@ -922,7 +922,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
- b_hit = TRUE;
+ b_hit = true;
}
}
@@ -930,7 +930,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point1 - point3) % (point0 - point3)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point3, point1, point0, face_intersection, face_normal))
{
- if (TRUE == b_hit)
+ if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@@ -945,7 +945,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
- b_hit = TRUE;
+ b_hit = true;
}
}
@@ -953,7 +953,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point2 - point3) % (point1 - point3)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point3, point2, point1, face_intersection, face_normal))
{
- if (TRUE == b_hit)
+ if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@@ -966,7 +966,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
{
intersection = face_intersection;
intersection_normal = face_normal;
- b_hit = TRUE;
+ b_hit = true;
}
}
@@ -974,7 +974,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
}
-BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &p_center, const LLVector3 &p_scale, const LLQuaternion &p_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@@ -997,7 +997,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
point4 = (point4 * p_rotation) + p_center;
// test ray intersection for each face
- BOOL b_hit = FALSE;
+ bool b_hit = false;
LLVector3 face_intersection, face_normal;
F32 distance_squared = 1.0e12f;
F32 temp;
@@ -1007,14 +1007,14 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
ray_triangle(ray_point, ray_direction, point4, point1, point0, intersection, intersection_normal))
{
distance_squared = (ray_point - intersection).magVecSquared();
- b_hit = TRUE;
+ b_hit = true;
}
// face 1
if (ray_direction * ( (point2 - point1) % (point0 - point1)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point1, point2, point0, face_intersection, face_normal))
{
- if (TRUE == b_hit)
+ if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@@ -1029,7 +1029,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
- b_hit = TRUE;
+ b_hit = true;
}
}
@@ -1037,7 +1037,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point3 - point2) % (point0 - point2)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point2, point3, point0, face_intersection, face_normal))
{
- if (TRUE == b_hit)
+ if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@@ -1052,7 +1052,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
- b_hit = TRUE;
+ b_hit = true;
}
}
@@ -1060,7 +1060,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point4 - point3) % (point0 - point3)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point3, point4, point0, face_intersection, face_normal))
{
- if (TRUE == b_hit)
+ if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@@ -1075,7 +1075,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
- b_hit = TRUE;
+ b_hit = true;
}
}
@@ -1083,7 +1083,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point3 - point4) % (point2 - point4)) < 0.0f &&
ray_quadrangle(ray_point, ray_direction, point4, point3, point2, face_intersection, face_normal))
{
- if (TRUE == b_hit)
+ if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@@ -1096,7 +1096,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
{
intersection = face_intersection;
intersection_normal = face_normal;
- b_hit = TRUE;
+ b_hit = true;
}
}
@@ -1104,7 +1104,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
}
-BOOL linesegment_circle(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_circle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &circle_center, const LLVector3 plane_normal, F32 circle_radius,
LLVector3 &intersection)
{
@@ -1115,14 +1115,14 @@ BOOL linesegment_circle(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@@ -1133,14 +1133,14 @@ BOOL linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL linesegment_quadrangle(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_quadrangle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@@ -1151,14 +1151,14 @@ BOOL linesegment_quadrangle(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL linesegment_sphere(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_sphere(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &sphere_center, F32 sphere_radius,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@@ -1169,14 +1169,14 @@ BOOL linesegment_sphere(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &cyl_center, const LLVector3 &cyl_scale, const LLQuaternion &cyl_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@@ -1187,10 +1187,10 @@ BOOL linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
@@ -1215,7 +1215,7 @@ U32 linesegment_box(const LLVector3 &point_a, const LLVector3 &point_b,
}
-BOOL linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &prism_center, const LLVector3 &prism_scale, const LLQuaternion &prism_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@@ -1229,11 +1229,11 @@ BOOL linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
return true;
}
}
- return FALSE;
+ return false;
}
-BOOL linesegment_tetrahedron(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_tetrahedron(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &t_center, const LLVector3 &t_scale, const LLQuaternion &t_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@@ -1244,14 +1244,14 @@ BOOL linesegment_tetrahedron(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL linesegment_pyramid(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_pyramid(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &p_center, const LLVector3 &p_scale, const LLQuaternion &p_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@@ -1262,13 +1262,8 @@ BOOL linesegment_pyramid(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-
-
-
-
-
diff --git a/indra/llmath/raytrace.h b/indra/llmath/raytrace.h
index 92bca45566..3f7014c1b9 100644
--- a/indra/llmath/raytrace.h
+++ b/indra/llmath/raytrace.h
@@ -129,17 +129,17 @@ BOOL ray_cone(const LLVector3 &ray_point, const LLVector3 &ray_direction,
*/
-BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &prism_center, const LLVector3 &prism_scale, const LLQuaternion &prism_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &t_center, const LLVector3 &t_scale, const LLQuaternion &t_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &p_center, const LLVector3 &p_scale, const LLQuaternion &p_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
@@ -170,13 +170,13 @@ BOOL ray_hemicone(const LLVector3 &ray_point, const LLVector3 &ray_direction,
*/
-BOOL linesegment_circle(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_circle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &circle_center, const LLVector3 plane_normal, F32 circle_radius,
LLVector3 &intersection);
// point_0 through point_2 define the plane_normal via the right-hand rule:
// circle from point_0 to point_2 with fingers ==> thumb points in direction of normal
-BOOL linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
LLVector3 &intersection, LLVector3 &intersection_normal);
@@ -185,19 +185,19 @@ BOOL linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
// right-hand-rule... curl fingers from lower-left toward lower-right then toward upper-right
// ==> thumb points in direction of normal
// assumes a parallelogram, so point_3 is determined by the other points
-BOOL linesegment_quadrangle(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_quadrangle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL linesegment_sphere(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_sphere(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &sphere_center, F32 sphere_radius,
LLVector3 &intersection, LLVector3 &intersection_normal);
// finite right cylinder is defined by end centers: "cyl_top", "cyl_bottom",
// and by the cylinder radius "cyl_radius"
-BOOL linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &cyl_center, const LLVector3 &cyl_scale, const LLQuaternion &cyl_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
@@ -213,20 +213,17 @@ U32 linesegment_box(const LLVector3 &point_a, const LLVector3 &point_b,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &prism_center, const LLVector3 &prism_scale, const LLQuaternion &prism_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL linesegment_tetrahedron(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_tetrahedron(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &t_center, const LLVector3 &t_scale, const LLQuaternion &t_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL linesegment_pyramid(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_pyramid(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &p_center, const LLVector3 &p_scale, const LLQuaternion &p_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-
-
#endif
-
diff --git a/indra/llmath/v2math.cpp b/indra/llmath/v2math.cpp
index a24571f2c8..e86d8723a3 100644
--- a/indra/llmath/v2math.cpp
+++ b/indra/llmath/v2math.cpp
@@ -43,12 +43,12 @@ LLVector2 LLVector2::zero(0,0);
// Sets all values to absolute value of their original values
// Returns TRUE if data changed
-BOOL LLVector2::abs()
+bool LLVector2::abs()
{
- BOOL ret = FALSE;
+ bool ret{ false };
- if (mV[0] < 0.f) { mV[0] = -mV[0]; ret = TRUE; }
- if (mV[1] < 0.f) { mV[1] = -mV[1]; ret = TRUE; }
+ if (mV[0] < 0.f) { mV[0] = -mV[0]; ret = true; }
+ if (mV[1] < 0.f) { mV[1] = -mV[1]; ret = true; }
return ret;
}
@@ -67,7 +67,7 @@ F32 angle_between(const LLVector2& a, const LLVector2& b)
return angle;
}
-BOOL are_parallel(const LLVector2 &a, const LLVector2 &b, float epsilon)
+bool are_parallel(const LLVector2 &a, const LLVector2 &b, float epsilon)
{
LLVector2 an = a;
LLVector2 bn = b;
@@ -76,9 +76,9 @@ BOOL are_parallel(const LLVector2 &a, const LLVector2 &b, float epsilon)
F32 dot = an * bn;
if ( (1.0f - fabs(dot)) < epsilon)
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/indra/llmath/v2math.h b/indra/llmath/v2math.h
index 2335a2e327..e455b8742c 100644
--- a/indra/llmath/v2math.h
+++ b/indra/llmath/v2math.h
@@ -78,12 +78,12 @@ class LLVector2
F32 magVecSquared() const; // deprecated
F32 normVec(); // deprecated
- BOOL abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed
+ bool abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed
const LLVector2& scaleVec(const LLVector2& vec); // scales per component by vec
- BOOL isNull(); // Returns TRUE if vector has a _very_small_ length
- BOOL isExactlyZero() const { return !mV[VX] && !mV[VY]; }
+ bool isNull(); // Returns TRUE if vector has a _very_small_ length
+ bool isExactlyZero() const { return !mV[VX] && !mV[VY]; }
F32 operator[](int idx) const { return mV[idx]; }
F32 &operator[](int idx) { return mV[idx]; }
@@ -114,7 +114,7 @@ class LLVector2
// Non-member functions
F32 angle_between(const LLVector2 &a, const LLVector2 &b); // Returns angle (radians) between a and b
-BOOL are_parallel(const LLVector2 &a, const LLVector2 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel
+bool are_parallel(const LLVector2 &a, const LLVector2 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel
F32 dist_vec(const LLVector2 &a, const LLVector2 &b); // Returns distance between a and b
F32 dist_vec_squared(const LLVector2 &a, const LLVector2 &b);// Returns distance squared between a and b
F32 dist_vec_squared2D(const LLVector2 &a, const LLVector2 &b);// Returns distance squared between a and b ignoring Z component
@@ -232,7 +232,7 @@ inline F32 LLVector2::lengthSquared(void) const
return mV[0]*mV[0] + mV[1]*mV[1];
}
-inline F32 LLVector2::normalize(void)
+inline F32 LLVector2::normalize(void)
{
F32 mag = (F32) sqrt(mV[0]*mV[0] + mV[1]*mV[1]);
F32 oomag;
@@ -299,13 +299,13 @@ inline const LLVector2& LLVector2::scaleVec(const LLVector2& vec)
return *this;
}
-inline BOOL LLVector2::isNull()
+inline bool LLVector2::isNull()
{
if ( F_APPROXIMATELY_ZERO > mV[VX]*mV[VX] + mV[VY]*mV[VY] )
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/indra/llmath/v3dmath.cpp b/indra/llmath/v3dmath.cpp
index a50cb3c6ca..1be989d991 100644
--- a/indra/llmath/v3dmath.cpp
+++ b/indra/llmath/v3dmath.cpp
@@ -53,30 +53,30 @@ const LLVector3d LLVector3d::z_axis_neg(0, 0, -1);
// Clamps each values to range (min,max).
// Returns TRUE if data changed.
-BOOL LLVector3d::clamp(F64 min, F64 max)
+bool LLVector3d::clamp(F64 min, F64 max)
{
- BOOL ret = FALSE;
+ bool ret{ false };
- if (mdV[0] < min) { mdV[0] = min; ret = TRUE; }
- if (mdV[1] < min) { mdV[1] = min; ret = TRUE; }
- if (mdV[2] < min) { mdV[2] = min; ret = TRUE; }
+ if (mdV[0] < min) { mdV[0] = min; ret = true; }
+ if (mdV[1] < min) { mdV[1] = min; ret = true; }
+ if (mdV[2] < min) { mdV[2] = min; ret = true; }
- if (mdV[0] > max) { mdV[0] = max; ret = TRUE; }
- if (mdV[1] > max) { mdV[1] = max; ret = TRUE; }
- if (mdV[2] > max) { mdV[2] = max; ret = TRUE; }
+ if (mdV[0] > max) { mdV[0] = max; ret = true; }
+ if (mdV[1] > max) { mdV[1] = max; ret = true; }
+ if (mdV[2] > max) { mdV[2] = max; ret = true; }
return ret;
}
// Sets all values to absolute value of their original values
// Returns TRUE if data changed
-BOOL LLVector3d::abs()
+bool LLVector3d::abs()
{
- BOOL ret = FALSE;
+ bool ret{ false };
- if (mdV[0] < 0.0) { mdV[0] = -mdV[0]; ret = TRUE; }
- if (mdV[1] < 0.0) { mdV[1] = -mdV[1]; ret = TRUE; }
- if (mdV[2] < 0.0) { mdV[2] = -mdV[2]; ret = TRUE; }
+ if (mdV[0] < 0.0) { mdV[0] = -mdV[0]; ret = true; }
+ if (mdV[1] < 0.0) { mdV[1] = -mdV[1]; ret = true; }
+ if (mdV[2] < 0.0) { mdV[2] = -mdV[2]; ret = true; }
return ret;
}
@@ -127,11 +127,11 @@ const LLVector3d& LLVector3d::rotVec(F64 angle, F64 x, F64 y, F64 z)
}
-BOOL LLVector3d::parseVector3d(const std::string& buf, LLVector3d* value)
+bool LLVector3d::parseVector3d(const std::string& buf, LLVector3d* value)
{
- if( buf.empty() || value == NULL)
+ if( buf.empty() || value == nullptr)
{
- return FALSE;
+ return false;
}
LLVector3d v;
@@ -139,9 +139,9 @@ BOOL LLVector3d::parseVector3d(const std::string& buf, LLVector3d* value)
if( 3 == count )
{
value->setVec( v );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/indra/llmath/v3dmath.h b/indra/llmath/v3dmath.h
index 7b98ee3edf..2c111ca963 100644
--- a/indra/llmath/v3dmath.h
+++ b/indra/llmath/v3dmath.h
@@ -68,9 +68,9 @@ class LLVector3d
return ret;
}
- inline BOOL isFinite() const; // checks to see if all values of LLVector3d are finite
- BOOL clamp(const F64 min, const F64 max); // Clamps all values to (min,max), returns TRUE if data changed
- BOOL abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed
+ inline bool isFinite() const; // checks to see if all values of LLVector3d are finite
+ bool clamp(const F64 min, const F64 max); // Clamps all values to (min,max), returns TRUE if data changed
+ bool abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed
inline const LLVector3d& clear(); // Clears LLVector3d to (0, 0, 0, 1)
inline const LLVector3d& clearVec(); // deprecated
@@ -98,8 +98,8 @@ class LLVector3d
const LLVector3d& rotVec(const LLMatrix3 &mat); // Rotates by LLMatrix4 mat
const LLVector3d& rotVec(const LLQuaternion &q); // Rotates by LLQuaternion q
- BOOL isNull() const; // Returns TRUE if vector has a _very_small_ length
- BOOL isExactlyZero() const { return !mdV[VX] && !mdV[VY] && !mdV[VZ]; }
+ bool isNull() const; // Returns TRUE if vector has a _very_small_ length
+ bool isExactlyZero() const { return !mdV[VX] && !mdV[VY] && !mdV[VZ]; }
const LLVector3d& operator=(const LLVector4 &a);
@@ -129,7 +129,7 @@ class LLVector3d
friend std::ostream& operator<<(std::ostream& s, const LLVector3d& a); // Stream a
- static BOOL parseVector3d(const std::string& buf, LLVector3d* value);
+ static bool parseVector3d(const std::string& buf, LLVector3d* value);
};
@@ -192,7 +192,7 @@ inline LLVector3d::LLVector3d(const LLVector3d ©)
// Destructors
// checker
-inline BOOL LLVector3d::isFinite() const
+inline bool LLVector3d::isFinite() const
{
return (llfinite(mdV[VX]) && llfinite(mdV[VY]) && llfinite(mdV[VZ]));
}
@@ -482,13 +482,13 @@ inline LLVector3d lerp(const LLVector3d& a, const LLVector3d& b, const F64 u)
}
-inline BOOL LLVector3d::isNull() const
+inline bool LLVector3d::isNull() const
{
if ( F_APPROXIMATELY_ZERO > mdV[VX]*mdV[VX] + mdV[VY]*mdV[VY] + mdV[VZ]*mdV[VZ] )
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -505,7 +505,7 @@ inline F64 angle_between(const LLVector3d& a, const LLVector3d& b)
return angle;
}
-inline BOOL are_parallel(const LLVector3d& a, const LLVector3d& b, const F64 epsilon)
+inline bool are_parallel(const LLVector3d& a, const LLVector3d& b, const F64 epsilon)
{
LLVector3d an = a;
LLVector3d bn = b;
@@ -514,10 +514,9 @@ inline BOOL are_parallel(const LLVector3d& a, const LLVector3d& b, const F64 eps
F64 dot = an * bn;
if ( (1.0f - fabs(dot)) < epsilon)
{
- return TRUE;
+ return true;
}
- return FALSE;
-
+ return false;
}
inline LLVector3d projected_vec(const LLVector3d& a, const LLVector3d& b)
diff --git a/indra/llmath/v3math.cpp b/indra/llmath/v3math.cpp
index 93010d2250..4a82051f2e 100644
--- a/indra/llmath/v3math.cpp
+++ b/indra/llmath/v3math.cpp
@@ -54,26 +54,26 @@ const LLVector3 LLVector3::all_one(1.f,1.f,1.f);
// Clamps each values to range (min,max).
// Returns TRUE if data changed.
-BOOL LLVector3::clamp(F32 min, F32 max)
+bool LLVector3::clamp(F32 min, F32 max)
{
- BOOL ret = FALSE;
+ bool ret{ false };
- if (mV[0] < min) { mV[0] = min; ret = TRUE; }
- if (mV[1] < min) { mV[1] = min; ret = TRUE; }
- if (mV[2] < min) { mV[2] = min; ret = TRUE; }
+ if (mV[0] < min) { mV[0] = min; ret = true; }
+ if (mV[1] < min) { mV[1] = min; ret = true; }
+ if (mV[2] < min) { mV[2] = min; ret = true; }
- if (mV[0] > max) { mV[0] = max; ret = TRUE; }
- if (mV[1] > max) { mV[1] = max; ret = TRUE; }
- if (mV[2] > max) { mV[2] = max; ret = TRUE; }
+ if (mV[0] > max) { mV[0] = max; ret = true; }
+ if (mV[1] > max) { mV[1] = max; ret = true; }
+ if (mV[2] > max) { mV[2] = max; ret = true; }
return ret;
}
// Clamps length to an upper limit.
// Returns TRUE if the data changed
-BOOL LLVector3::clampLength( F32 length_limit )
+bool LLVector3::clampLength( F32 length_limit )
{
- BOOL changed = FALSE;
+ bool changed{ false };
F32 len = length();
if (llfinite(len))
@@ -88,7 +88,7 @@ BOOL LLVector3::clampLength( F32 length_limit )
mV[0] *= length_limit;
mV[1] *= length_limit;
mV[2] *= length_limit;
- changed = TRUE;
+ changed = true;
}
}
else
@@ -108,7 +108,7 @@ BOOL LLVector3::clampLength( F32 length_limit )
{
// no it can't be salvaged --> clear it
clear();
- changed = TRUE;
+ changed = true;
break;
}
}
@@ -134,17 +134,17 @@ BOOL LLVector3::clampLength( F32 length_limit )
return changed;
}
-BOOL LLVector3::clamp(const LLVector3 &min_vec, const LLVector3 &max_vec)
+bool LLVector3::clamp(const LLVector3 &min_vec, const LLVector3 &max_vec)
{
- BOOL ret = FALSE;
+ bool ret{ false };
- if (mV[0] < min_vec[0]) { mV[0] = min_vec[0]; ret = TRUE; }
- if (mV[1] < min_vec[1]) { mV[1] = min_vec[1]; ret = TRUE; }
- if (mV[2] < min_vec[2]) { mV[2] = min_vec[2]; ret = TRUE; }
+ if (mV[0] < min_vec[0]) { mV[0] = min_vec[0]; ret = true; }
+ if (mV[1] < min_vec[1]) { mV[1] = min_vec[1]; ret = true; }
+ if (mV[2] < min_vec[2]) { mV[2] = min_vec[2]; ret = true; }
- if (mV[0] > max_vec[0]) { mV[0] = max_vec[0]; ret = TRUE; }
- if (mV[1] > max_vec[1]) { mV[1] = max_vec[1]; ret = TRUE; }
- if (mV[2] > max_vec[2]) { mV[2] = max_vec[2]; ret = TRUE; }
+ if (mV[0] > max_vec[0]) { mV[0] = max_vec[0]; ret = true; }
+ if (mV[1] > max_vec[1]) { mV[1] = max_vec[1]; ret = true; }
+ if (mV[2] > max_vec[2]) { mV[2] = max_vec[2]; ret = true; }
return ret;
}
@@ -152,13 +152,13 @@ BOOL LLVector3::clamp(const LLVector3 &min_vec, const LLVector3 &max_vec)
// Sets all values to absolute value of their original values
// Returns TRUE if data changed
-BOOL LLVector3::abs()
+bool LLVector3::abs()
{
- BOOL ret = FALSE;
+ bool ret{ false };
- if (mV[0] < 0.f) { mV[0] = -mV[0]; ret = TRUE; }
- if (mV[1] < 0.f) { mV[1] = -mV[1]; ret = TRUE; }
- if (mV[2] < 0.f) { mV[2] = -mV[2]; ret = TRUE; }
+ if (mV[0] < 0.f) { mV[0] = -mV[0]; ret = true; }
+ if (mV[1] < 0.f) { mV[1] = -mV[1]; ret = true; }
+ if (mV[2] < 0.f) { mV[2] = -mV[2]; ret = true; }
return ret;
}
@@ -358,11 +358,11 @@ const LLVector3& operator*=(LLVector3 &a, const LLQuaternion &rot)
}
// static
-BOOL LLVector3::parseVector3(const std::string& buf, LLVector3* value)
+bool LLVector3::parseVector3(const std::string& buf, LLVector3* value)
{
- if( buf.empty() || value == NULL)
+ if( buf.empty() || value == nullptr)
{
- return FALSE;
+ return false;
}
LLVector3 v;
@@ -370,10 +370,10 @@ BOOL LLVector3::parseVector3(const std::string& buf, LLVector3* value)
if( 3 == count )
{
value->setVec( v );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// Displacement from query point to nearest neighbor point on bounding box.
diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h
index 31abf433a0..3d2365e04b 100644
--- a/indra/llmath/v3math.h
+++ b/indra/llmath/v3math.h
@@ -71,16 +71,16 @@ class LLVector3
void setValue(const LLSD& sd);
- inline BOOL isFinite() const; // checks to see if all values of LLVector3 are finite
- BOOL clamp(F32 min, F32 max); // Clamps all values to (min,max), returns TRUE if data changed
- BOOL clamp(const LLVector3 &min_vec, const LLVector3 &max_vec); // Scales vector by another vector
- BOOL clampLength( F32 length_limit ); // Scales vector to limit length to a value
+ inline bool isFinite() const; // checks to see if all values of LLVector3 are finite
+ bool clamp(F32 min, F32 max); // Clamps all values to (min,max), returns TRUE if data changed
+ bool clamp(const LLVector3 &min_vec, const LLVector3 &max_vec); // Scales vector by another vector
+ bool clampLength( F32 length_limit ); // Scales vector to limit length to a value
void quantize16(F32 lowerxy, F32 upperxy, F32 lowerz, F32 upperz); // changes the vector to reflect quatization
void quantize8(F32 lowerxy, F32 upperxy, F32 lowerz, F32 upperz); // changes the vector to reflect quatization
void snap(S32 sig_digits); // snaps x,y,z to sig_digits decimal places
- BOOL abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed
+ bool abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed
inline void clear(); // Clears LLVector3 to (0, 0, 0)
inline void setZero(); // Clears LLVector3 to (0, 0, 0)
@@ -108,7 +108,7 @@ class LLVector3
inline F32 normalize(); // Normalizes and returns the magnitude of LLVector3
inline F32 normVec(); // deprecated
- inline BOOL inRange( F32 min, F32 max ) const; // Returns true if all values of the vector are between min and max
+ inline bool inRange( F32 min, F32 max ) const; // Returns true if all values of the vector are between min and max
const LLVector3& rotVec(F32 angle, const LLVector3 &vec); // Rotates about vec by angle radians
const LLVector3& rotVec(F32 angle, F32 x, F32 y, F32 z); // Rotates about x,y,z by angle radians
@@ -120,7 +120,7 @@ class LLVector3
LLVector3 scaledVec(const LLVector3& vec) const; // get a copy of this vector scaled by vec
bool isNull() const; // Returns TRUE if vector has a _very_small_ length
- BOOL isExactlyZero() const { return !mV[VX] && !mV[VY] && !mV[VZ]; }
+ bool isExactlyZero() const { return !mV[VX] && !mV[VY] && !mV[VZ]; }
F32 operator[](int idx) const { return mV[idx]; }
F32 &operator[](int idx) { return mV[idx]; }
@@ -149,7 +149,7 @@ class LLVector3
friend std::ostream& operator<<(std::ostream& s, const LLVector3 &a); // Stream a
- static BOOL parseVector3(const std::string& buf, LLVector3* value);
+ static bool parseVector3(const std::string& buf, LLVector3* value);
};
typedef LLVector3 LLSimLocalVec;
@@ -157,7 +157,7 @@ typedef LLVector3 LLSimLocalVec;
// Non-member functions
F32 angle_between(const LLVector3 &a, const LLVector3 &b); // Returns angle (radians) between a and b
-BOOL are_parallel(const LLVector3 &a, const LLVector3 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel
+bool are_parallel(const LLVector3 &a, const LLVector3 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel
F32 dist_vec(const LLVector3 &a, const LLVector3 &b); // Returns distance between a and b
F32 dist_vec_squared(const LLVector3 &a, const LLVector3 &b);// Returns distance squared between a and b
F32 dist_vec_squared2D(const LLVector3 &a, const LLVector3 &b);// Returns distance squared between a and b ignoring Z component
@@ -202,7 +202,7 @@ inline LLVector3::LLVector3(const LLVector3 ©)
// Destructors
// checker
-inline BOOL LLVector3::isFinite() const
+inline bool LLVector3::isFinite() const
{
return (llfinite(mV[VX]) && llfinite(mV[VY]) && llfinite(mV[VZ]));
}
@@ -350,7 +350,7 @@ inline F32 LLVector3::magVecSquared(void) const
return mV[0]*mV[0] + mV[1]*mV[1] + mV[2]*mV[2];
}
-inline BOOL LLVector3::inRange( F32 min, F32 max ) const
+inline bool LLVector3::inRange( F32 min, F32 max ) const
{
return mV[0] >= min && mV[0] <= max &&
mV[1] >= min && mV[1] <= max &&
@@ -589,7 +589,7 @@ inline F32 angle_between(const LLVector3& a, const LLVector3& b)
return atan2f(sqrtf(c * c), ab); // return the angle
}
-inline BOOL are_parallel(const LLVector3 &a, const LLVector3 &b, F32 epsilon)
+inline bool are_parallel(const LLVector3 &a, const LLVector3 &b, F32 epsilon)
{
LLVector3 an = a;
LLVector3 bn = b;
diff --git a/indra/llmath/v4color.cpp b/indra/llmath/v4color.cpp
index 1f3d9b7d21..38f5e9b049 100644
--- a/indra/llmath/v4color.cpp
+++ b/indra/llmath/v4color.cpp
@@ -388,18 +388,18 @@ void LLColor4::calcHSL(F32* hue, F32* saturation, F32* luminance) const
}
// static
-BOOL LLColor4::parseColor(const std::string& buf, LLColor4* color)
+bool LLColor4::parseColor(const std::string& buf, LLColor4* color)
{
- if( buf.empty() || color == NULL)
+ if( buf.empty() || color == nullptr)
{
- return FALSE;
+ return false;
}
boost_tokenizer tokens(buf, boost::char_separator(", "));
boost_tokenizer::iterator token_iter = tokens.begin();
if (token_iter == tokens.end())
{
- return FALSE;
+ return false;
}
// Grab the first token into a string, since we don't know
@@ -711,15 +711,15 @@ BOOL LLColor4::parseColor(const std::string& buf, LLColor4* color)
}
}
- return TRUE;
+ return true;
}
// static
-BOOL LLColor4::parseColor4(const std::string& buf, LLColor4* value)
+bool LLColor4::parseColor4(const std::string& buf, LLColor4* value)
{
- if( buf.empty() || value == NULL)
+ if( buf.empty() || value == nullptr)
{
- return FALSE;
+ return false;
}
LLColor4 v;
@@ -732,10 +732,10 @@ BOOL LLColor4::parseColor4(const std::string& buf, LLColor4* value)
if( 4 == count )
{
value->setVec( v );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// EOF
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index 6b65d1a912..f0ab7eef69 100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -111,7 +111,7 @@ class LLColor4
F32 lengthSquared() const; // Returns magnitude squared of LLColor4
F32 normalize(); // deprecated -- use normalize()
- BOOL isOpaque() { return mV[VALPHA] == 1.f; }
+ bool isOpaque() { return mV[VALPHA] == 1.f; }
F32 operator[](int idx) const { return mV[idx]; }
F32 &operator[](int idx) { return mV[idx]; }
@@ -229,8 +229,8 @@ class LLColor4
static LLColor4 cyan5;
static LLColor4 cyan6;
- static BOOL parseColor(const std::string& buf, LLColor4* color);
- static BOOL parseColor4(const std::string& buf, LLColor4* color);
+ static bool parseColor(const std::string& buf, LLColor4* color);
+ static bool parseColor4(const std::string& buf, LLColor4* color);
inline void clamp();
};
diff --git a/indra/llmath/v4coloru.cpp b/indra/llmath/v4coloru.cpp
index f1a2518cf3..d238d609b4 100644
--- a/indra/llmath/v4coloru.cpp
+++ b/indra/llmath/v4coloru.cpp
@@ -88,11 +88,11 @@ std::ostream& operator<<(std::ostream& s, const LLColor4U &a)
}
// static
-BOOL LLColor4U::parseColor4U(const std::string& buf, LLColor4U* value)
+bool LLColor4U::parseColor4U(const std::string& buf, LLColor4U* value)
{
- if( buf.empty() || value == NULL)
+ if( buf.empty() || value == nullptr)
{
- return FALSE;
+ return false;
}
U32 v[4];
@@ -104,17 +104,17 @@ BOOL LLColor4U::parseColor4U(const std::string& buf, LLColor4U* value)
}
if( 4 != count )
{
- return FALSE;
+ return false;
}
for( S32 i = 0; i < 4; i++ )
{
if( v[i] > U8_MAX )
{
- return FALSE;
+ return false;
}
}
value->set( U8(v[0]), U8(v[1]), U8(v[2]), U8(v[3]) );
- return TRUE;
+ return true;
}
diff --git a/indra/llmath/v4coloru.h b/indra/llmath/v4coloru.h
index 0f2eff3d14..ca6a5425f9 100644
--- a/indra/llmath/v4coloru.h
+++ b/indra/llmath/v4coloru.h
@@ -112,12 +112,11 @@ public:
LLColor4U addClampMax(const LLColor4U &color); // Add and clamp the max
LLColor4U multAll(const F32 k); // Multiply ALL channels by scalar k
- const LLColor4U& combine();
inline void setVecScaleClamp(const LLColor3 &color);
inline void setVecScaleClamp(const LLColor4 &color);
- static BOOL parseColor4U(const std::string& buf, LLColor4U* value);
+ static bool parseColor4U(const std::string& buf, LLColor4U* value);
// conversion
operator LLColor4() const
diff --git a/indra/llmath/v4math.cpp b/indra/llmath/v4math.cpp
index 2782cf2966..8388fbdbc4 100644
--- a/indra/llmath/v4math.cpp
+++ b/indra/llmath/v4math.cpp
@@ -36,28 +36,6 @@
// LLVector4
// Axis-Angle rotations
-
-/*
-const LLVector4& LLVector4::rotVec(F32 angle, const LLVector4 &vec)
-{
- if ( !vec.isExactlyZero() && angle )
- {
- *this = *this * LLMatrix4(angle, vec);
- }
- return *this;
-}
-
-const LLVector4& LLVector4::rotVec(F32 angle, F32 x, F32 y, F32 z)
-{
- LLVector3 vec(x, y, z);
- if ( !vec.isExactlyZero() && angle )
- {
- *this = *this * LLMatrix4(angle, vec);
- }
- return *this;
-}
-*/
-
const LLVector4& LLVector4::rotVec(const LLMatrix4 &mat)
{
*this = *this * mat;
@@ -82,14 +60,14 @@ const LLVector4& LLVector4::scaleVec(const LLVector4& vec)
// Sets all values to absolute value of their original values
// Returns TRUE if data changed
-BOOL LLVector4::abs()
+bool LLVector4::abs()
{
- BOOL ret = FALSE;
+ bool ret{ false };
- if (mV[0] < 0.f) { mV[0] = -mV[0]; ret = TRUE; }
- if (mV[1] < 0.f) { mV[1] = -mV[1]; ret = TRUE; }
- if (mV[2] < 0.f) { mV[2] = -mV[2]; ret = TRUE; }
- if (mV[3] < 0.f) { mV[3] = -mV[3]; ret = TRUE; }
+ if (mV[0] < 0.f) { mV[0] = -mV[0]; ret = true; }
+ if (mV[1] < 0.f) { mV[1] = -mV[1]; ret = true; }
+ if (mV[2] < 0.f) { mV[2] = -mV[2]; ret = true; }
+ if (mV[3] < 0.f) { mV[3] = -mV[3]; ret = true; }
return ret;
}
@@ -117,7 +95,7 @@ F32 angle_between( const LLVector4& a, const LLVector4& b )
return angle;
}
-BOOL are_parallel(const LLVector4 &a, const LLVector4 &b, F32 epsilon)
+bool are_parallel(const LLVector4 &a, const LLVector4 &b, F32 epsilon)
{
LLVector4 an = a;
LLVector4 bn = b;
@@ -125,8 +103,8 @@ BOOL are_parallel(const LLVector4 &a, const LLVector4 &b, F32 epsilon)
bn.normalize();
F32 dot = an * bn;
if ( (1.0f - fabs(dot)) < epsilon)
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h
index bee3d8140b..f7efb1dae3 100644
--- a/indra/llmath/v4math.h
+++ b/indra/llmath/v4math.h
@@ -74,7 +74,7 @@ class LLVector4
}
- inline BOOL isFinite() const; // checks to see if all values of LLVector3 are finite
+ inline bool isFinite() const; // checks to see if all values of LLVector3 are finite
inline void clear(); // Clears LLVector4 to (0, 0, 0, 1)
inline void clearVec(); // deprecated
@@ -102,13 +102,11 @@ class LLVector4
// Sets all values to absolute value of their original values
// Returns TRUE if data changed
- BOOL abs();
+ bool abs();
- BOOL isExactlyClear() const { return (mV[VW] == 1.0f) && !mV[VX] && !mV[VY] && !mV[VZ]; }
- BOOL isExactlyZero() const { return !mV[VW] && !mV[VX] && !mV[VY] && !mV[VZ]; }
+ bool isExactlyClear() const { return (mV[VW] == 1.0f) && !mV[VX] && !mV[VY] && !mV[VZ]; }
+ bool isExactlyZero() const { return !mV[VW] && !mV[VX] && !mV[VY] && !mV[VZ]; }
- const LLVector4& rotVec(F32 angle, const LLVector4 &vec); // Rotates about vec by angle radians
- const LLVector4& rotVec(F32 angle, F32 x, F32 y, F32 z); // Rotates about x,y,z by angle radians
const LLVector4& rotVec(const LLMatrix4 &mat); // Rotates by MAT4 mat
const LLVector4& rotVec(const LLQuaternion &q); // Rotates by QUAT q
@@ -139,7 +137,7 @@ class LLVector4
// Non-member functions
F32 angle_between(const LLVector4 &a, const LLVector4 &b); // Returns angle (radians) between a and b
-BOOL are_parallel(const LLVector4 &a, const LLVector4 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel
+bool are_parallel(const LLVector4 &a, const LLVector4 &b, F32 epsilon = F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel
F32 dist_vec(const LLVector4 &a, const LLVector4 &b); // Returns distance between a and b
F32 dist_vec_squared(const LLVector4 &a, const LLVector4 &b); // Returns distance squared between a and b
LLVector3 vec4to3(const LLVector4 &vec);
@@ -226,7 +224,7 @@ inline LLVector4::LLVector4(const LLSD &sd)
}
-inline BOOL LLVector4::isFinite() const
+inline bool LLVector4::isFinite() const
{
return (llfinite(mV[VX]) && llfinite(mV[VY]) && llfinite(mV[VZ]) && llfinite(mV[VW]));
}
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index f38a5e663e..60d95c3367 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -1020,7 +1020,7 @@ void LLAssetStorage::processUploadComplete(LLMessageSystem *msg, void **user_dat
LLUUID uuid;
S8 asset_type_s8;
LLAssetType::EType asset_type;
- BOOL success = FALSE;
+ bool success = false;
msg->getUUIDFast(_PREHASH_AssetBlock, _PREHASH_UUID, uuid);
msg->getS8Fast(_PREHASH_AssetBlock, _PREHASH_Type, asset_type_s8);
diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp
index 9f7768f78e..b3113cd5d8 100644
--- a/indra/llmessage/lldatapacker.cpp
+++ b/indra/llmessage/lldatapacker.cpp
@@ -45,7 +45,7 @@ const S32 DP_BUFSIZE = 512;
static char DUMMY_BUFFER[128]; /*Flawfinder: ignore*/
-LLDataPacker::LLDataPacker() : mPassFlags(0), mWriteEnabled(FALSE)
+LLDataPacker::LLDataPacker() : mPassFlags(0), mWriteEnabled(false)
{
}
@@ -61,10 +61,10 @@ void LLDataPacker::dumpBufferToLog()
LL_ERRS() << "dumpBufferToLog not implemented for this type!" << LL_ENDL;
}
-BOOL LLDataPacker::packFixed(const F32 value, const char *name,
- const BOOL is_signed, const U32 int_bits, const U32 frac_bits)
+bool LLDataPacker::packFixed(const F32 value, const char *name,
+ const bool is_signed, const U32 int_bits, const U32 frac_bits)
{
- BOOL success = TRUE;
+ bool success = true;
S32 unsigned_bits = int_bits + frac_bits;
S32 total_bits = unsigned_bits;
@@ -113,10 +113,10 @@ BOOL LLDataPacker::packFixed(const F32 value, const char *name,
return success;
}
-BOOL LLDataPacker::unpackFixed(F32 &value, const char *name,
- const BOOL is_signed, const U32 int_bits, const U32 frac_bits)
+bool LLDataPacker::unpackFixed(F32 &value, const char *name,
+ const bool is_signed, const U32 int_bits, const U32 frac_bits)
{
- BOOL success = TRUE;
+ bool success = true;
//LL_INFOS() << "unpackFixed:" << name << " int:" << int_bits << " frac:" << frac_bits << LL_ENDL;
S32 unsigned_bits = int_bits + frac_bits;
S32 total_bits = unsigned_bits;
@@ -166,82 +166,82 @@ BOOL LLDataPacker::unpackFixed(F32 &value, const char *name,
return success;
}
-BOOL LLDataPacker::unpackU16s(U16 *values, S32 count, const char *name)
+bool LLDataPacker::unpackU16s(U16 *values, S32 count, const char *name)
{
for (S32 idx = 0; idx < count; ++idx)
{
if (!unpackU16(values[idx], name))
{
LL_WARNS("DATAPACKER") << "Buffer overflow reading Unsigned 16s \"" << name << "\" at index " << idx << "!" << LL_ENDL;
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
-BOOL LLDataPacker::unpackS16s(S16 *values, S32 count, const char *name)
+bool LLDataPacker::unpackS16s(S16 *values, S32 count, const char *name)
{
for (S32 idx = 0; idx < count; ++idx)
{
if (!unpackS16(values[idx], name))
{
LL_WARNS("DATAPACKER") << "Buffer overflow reading Signed 16s \"" << name << "\" at index " << idx << "!" << LL_ENDL;
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
-BOOL LLDataPacker::unpackF32s(F32 *values, S32 count, const char *name)
+bool LLDataPacker::unpackF32s(F32 *values, S32 count, const char *name)
{
for (S32 idx = 0; idx < count; ++idx)
{
if (!unpackF32(values[idx], name))
{
LL_WARNS("DATAPACKER") << "Buffer overflow reading Float 32s \"" << name << "\" at index " << idx << "!" << LL_ENDL;
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
-BOOL LLDataPacker::unpackColor4Us(LLColor4U *values, S32 count, const char *name)
+bool LLDataPacker::unpackColor4Us(LLColor4U *values, S32 count, const char *name)
{
for (S32 idx = 0; idx < count; ++idx)
{
if (!unpackColor4U(values[idx], name))
{
LL_WARNS("DATAPACKER") << "Buffer overflow reading Float 32s \"" << name << "\" at index " << idx << "!" << LL_ENDL;
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
-BOOL LLDataPacker::unpackUUIDs(LLUUID *values, S32 count, const char *name)
+bool LLDataPacker::unpackUUIDs(LLUUID *values, S32 count, const char *name)
{
for (S32 idx = 0; idx < count; ++idx)
{
if (!unpackUUID(values[idx], name))
{
LL_WARNS("DATAPACKER") << "Buffer overflow reading UUIDs \"" << name << "\" at index " << idx << "!" << LL_ENDL;
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//---------------------------------------------------------------------------
// LLDataPackerBinaryBuffer implementation
//---------------------------------------------------------------------------
-BOOL LLDataPackerBinaryBuffer::packString(const std::string& value, const char *name)
+bool LLDataPackerBinaryBuffer::packString(const std::string& value, const char *name)
{
S32 length = value.length()+1;
if (!verifyLength(length, name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -249,30 +249,30 @@ BOOL LLDataPackerBinaryBuffer::packString(const std::string& value, const char *
htolememcpy(mCurBufferp, value.c_str(), MVT_VARIABLE, length);
}
mCurBufferp += length;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackString(std::string& value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackString(std::string& value, const char *name)
{
S32 length = (S32)strlen((char *)mCurBufferp) + 1; /*Flawfinder: ignore*/
if (!verifyLength(length, name))
{
- return FALSE;
+ return false;
}
value = std::string((char*)mCurBufferp); // We already assume NULL termination calling strlen()
mCurBufferp += length;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packBinaryData(const U8 *value, S32 size, const char *name)
+bool LLDataPackerBinaryBuffer::packBinaryData(const U8 *value, S32 size, const char *name)
{
if (!verifyLength(size + 4, name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -285,16 +285,16 @@ BOOL LLDataPackerBinaryBuffer::packBinaryData(const U8 *value, S32 size, const c
htolememcpy(mCurBufferp, value, MVT_VARIABLE, size);
}
mCurBufferp += size;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char *name)
+bool LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char *name)
{
if (!verifyLength(4, name))
{
LL_WARNS() << "LLDataPackerBinaryBuffer::unpackBinaryData would unpack invalid data, aborting!" << LL_ENDL;
- return FALSE;
+ return false;
}
htolememcpy(&size, mCurBufferp, MVT_S32, 4);
@@ -303,21 +303,21 @@ BOOL LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char
if (!verifyLength(size, name))
{
LL_WARNS() << "LLDataPackerBinaryBuffer::unpackBinaryData would unpack invalid data, aborting!" << LL_ENDL;
- return FALSE;
+ return false;
}
htolememcpy(value, mCurBufferp, MVT_VARIABLE, size);
mCurBufferp += size;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packBinaryDataFixed(const U8 *value, S32 size, const char *name)
+bool LLDataPackerBinaryBuffer::packBinaryDataFixed(const U8 *value, S32 size, const char *name)
{
if (!verifyLength(size, name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -325,27 +325,27 @@ BOOL LLDataPackerBinaryBuffer::packBinaryDataFixed(const U8 *value, S32 size, co
htolememcpy(mCurBufferp, value, MVT_VARIABLE, size);
}
mCurBufferp += size;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackBinaryDataFixed(U8 *value, S32 size, const char *name)
+bool LLDataPackerBinaryBuffer::unpackBinaryDataFixed(U8 *value, S32 size, const char *name)
{
if (!verifyLength(size, name))
{
- return FALSE;
+ return false;
}
htolememcpy(value, mCurBufferp, MVT_VARIABLE, size);
mCurBufferp += size;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packU8(const U8 value, const char *name)
+bool LLDataPackerBinaryBuffer::packU8(const U8 value, const char *name)
{
if (!verifyLength(sizeof(U8), name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -353,28 +353,28 @@ BOOL LLDataPackerBinaryBuffer::packU8(const U8 value, const char *name)
*mCurBufferp = value;
}
mCurBufferp++;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackU8(U8 &value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackU8(U8 &value, const char *name)
{
if (!verifyLength(sizeof(U8), name))
{
- return FALSE;
+ return false;
}
value = *mCurBufferp;
mCurBufferp++;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packU16(const U16 value, const char *name)
+bool LLDataPackerBinaryBuffer::packU16(const U16 value, const char *name)
{
if (!verifyLength(sizeof(U16), name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -382,25 +382,25 @@ BOOL LLDataPackerBinaryBuffer::packU16(const U16 value, const char *name)
htolememcpy(mCurBufferp, &value, MVT_U16, 2);
}
mCurBufferp += 2;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackU16(U16 &value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackU16(U16 &value, const char *name)
{
if (!verifyLength(sizeof(U16), name))
{
- return FALSE;
+ return false;
}
htolememcpy(&value, mCurBufferp, MVT_U16, 2);
mCurBufferp += 2;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packS16(const S16 value, const char *name)
+bool LLDataPackerBinaryBuffer::packS16(const S16 value, const char *name)
{
- BOOL success = verifyLength(sizeof(S16), name);
+ bool success = verifyLength(sizeof(S16), name);
if (mWriteEnabled && success)
{
@@ -410,9 +410,9 @@ BOOL LLDataPackerBinaryBuffer::packS16(const S16 value, const char *name)
return success;
}
-BOOL LLDataPackerBinaryBuffer::unpackS16(S16 &value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackS16(S16 &value, const char *name)
{
- BOOL success = verifyLength(sizeof(S16), name);
+ bool success = verifyLength(sizeof(S16), name);
if (success)
{
@@ -422,11 +422,11 @@ BOOL LLDataPackerBinaryBuffer::unpackS16(S16 &value, const char *name)
return success;
}
-BOOL LLDataPackerBinaryBuffer::packU32(const U32 value, const char *name)
+bool LLDataPackerBinaryBuffer::packU32(const U32 value, const char *name)
{
if (!verifyLength(sizeof(U32), name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -434,28 +434,28 @@ BOOL LLDataPackerBinaryBuffer::packU32(const U32 value, const char *name)
htolememcpy(mCurBufferp, &value, MVT_U32, 4);
}
mCurBufferp += 4;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackU32(U32 &value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackU32(U32 &value, const char *name)
{
if (!verifyLength(sizeof(U32), name))
{
- return FALSE;
+ return false;
}
htolememcpy(&value, mCurBufferp, MVT_U32, 4);
mCurBufferp += 4;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packS32(const S32 value, const char *name)
+bool LLDataPackerBinaryBuffer::packS32(const S32 value, const char *name)
{
if (!verifyLength(sizeof(S32), name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -463,28 +463,28 @@ BOOL LLDataPackerBinaryBuffer::packS32(const S32 value, const char *name)
htolememcpy(mCurBufferp, &value, MVT_S32, 4);
}
mCurBufferp += 4;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackS32(S32 &value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackS32(S32 &value, const char *name)
{
if(!verifyLength(sizeof(S32), name))
{
- return FALSE;
+ return false;
}
htolememcpy(&value, mCurBufferp, MVT_S32, 4);
mCurBufferp += 4;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packF32(const F32 value, const char *name)
+bool LLDataPackerBinaryBuffer::packF32(const F32 value, const char *name)
{
if (!verifyLength(sizeof(F32), name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -492,28 +492,28 @@ BOOL LLDataPackerBinaryBuffer::packF32(const F32 value, const char *name)
htolememcpy(mCurBufferp, &value, MVT_F32, 4);
}
mCurBufferp += 4;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackF32(F32 &value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackF32(F32 &value, const char *name)
{
if (!verifyLength(sizeof(F32), name))
{
- return FALSE;
+ return false;
}
htolememcpy(&value, mCurBufferp, MVT_F32, 4);
mCurBufferp += 4;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packColor4(const LLColor4 &value, const char *name)
+bool LLDataPackerBinaryBuffer::packColor4(const LLColor4 &value, const char *name)
{
if (!verifyLength(16, name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -521,28 +521,28 @@ BOOL LLDataPackerBinaryBuffer::packColor4(const LLColor4 &value, const char *nam
htolememcpy(mCurBufferp, value.mV, MVT_LLVector4, 16);
}
mCurBufferp += 16;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackColor4(LLColor4 &value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackColor4(LLColor4 &value, const char *name)
{
if (!verifyLength(16, name))
{
- return FALSE;
+ return false;
}
htolememcpy(value.mV, mCurBufferp, MVT_LLVector4, 16);
mCurBufferp += 16;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packColor4U(const LLColor4U &value, const char *name)
+bool LLDataPackerBinaryBuffer::packColor4U(const LLColor4U &value, const char *name)
{
if (!verifyLength(4, name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -550,29 +550,29 @@ BOOL LLDataPackerBinaryBuffer::packColor4U(const LLColor4U &value, const char *n
htolememcpy(mCurBufferp, value.mV, MVT_VARIABLE, 4);
}
mCurBufferp += 4;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackColor4U(LLColor4U &value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackColor4U(LLColor4U &value, const char *name)
{
if (!verifyLength(4, name))
{
- return FALSE;
+ return false;
}
htolememcpy(value.mV, mCurBufferp, MVT_VARIABLE, 4);
mCurBufferp += 4;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packVector2(const LLVector2 &value, const char *name)
+bool LLDataPackerBinaryBuffer::packVector2(const LLVector2 &value, const char *name)
{
if (!verifyLength(8, name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -581,29 +581,29 @@ BOOL LLDataPackerBinaryBuffer::packVector2(const LLVector2 &value, const char *n
htolememcpy(mCurBufferp+4, &value.mV[1], MVT_F32, 4);
}
mCurBufferp += 8;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackVector2(LLVector2 &value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackVector2(LLVector2 &value, const char *name)
{
if (!verifyLength(8, name))
{
- return FALSE;
+ return false;
}
htolememcpy(&value.mV[0], mCurBufferp, MVT_F32, 4);
htolememcpy(&value.mV[1], mCurBufferp+4, MVT_F32, 4);
mCurBufferp += 8;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packVector3(const LLVector3 &value, const char *name)
+bool LLDataPackerBinaryBuffer::packVector3(const LLVector3 &value, const char *name)
{
if (!verifyLength(12, name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -611,27 +611,27 @@ BOOL LLDataPackerBinaryBuffer::packVector3(const LLVector3 &value, const char *n
htolememcpy(mCurBufferp, value.mV, MVT_LLVector3, 12);
}
mCurBufferp += 12;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackVector3(LLVector3 &value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackVector3(LLVector3 &value, const char *name)
{
if (!verifyLength(12, name))
{
- return FALSE;
+ return false;
}
htolememcpy(value.mV, mCurBufferp, MVT_LLVector3, 12);
mCurBufferp += 12;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packVector4(const LLVector4 &value, const char *name)
+bool LLDataPackerBinaryBuffer::packVector4(const LLVector4 &value, const char *name)
{
if (!verifyLength(16, name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -639,27 +639,27 @@ BOOL LLDataPackerBinaryBuffer::packVector4(const LLVector4 &value, const char *n
htolememcpy(mCurBufferp, value.mV, MVT_LLVector4, 16);
}
mCurBufferp += 16;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackVector4(LLVector4 &value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackVector4(LLVector4 &value, const char *name)
{
if (!verifyLength(16, name))
{
- return FALSE;
+ return false;
}
htolememcpy(value.mV, mCurBufferp, MVT_LLVector4, 16);
mCurBufferp += 16;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::packUUID(const LLUUID &value, const char *name)
+bool LLDataPackerBinaryBuffer::packUUID(const LLUUID &value, const char *name)
{
if (!verifyLength(16, name))
{
- return FALSE;
+ return false;
}
if (mWriteEnabled)
@@ -667,20 +667,20 @@ BOOL LLDataPackerBinaryBuffer::packUUID(const LLUUID &value, const char *name)
htolememcpy(mCurBufferp, value.mData, MVT_LLUUID, 16);
}
mCurBufferp += 16;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerBinaryBuffer::unpackUUID(LLUUID &value, const char *name)
+bool LLDataPackerBinaryBuffer::unpackUUID(LLUUID &value, const char *name)
{
if (!verifyLength(16, name))
{
- return FALSE;
+ return false;
}
htolememcpy(value.mData, mCurBufferp, MVT_LLUUID, 16);
mCurBufferp += 16;
- return TRUE;
+ return true;
}
const LLDataPackerBinaryBuffer& LLDataPackerBinaryBuffer::operator=(const LLDataPackerBinaryBuffer &a)
@@ -722,9 +722,9 @@ void LLDataPackerBinaryBuffer::dumpBufferToLog()
//---------------------------------------------------------------------------
// LLDataPackerAsciiBuffer implementation
//---------------------------------------------------------------------------
-BOOL LLDataPackerAsciiBuffer::packString(const std::string& value, const char *name)
+bool LLDataPackerAsciiBuffer::packString(const std::string& value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
if (mWriteEnabled)
@@ -752,21 +752,21 @@ BOOL LLDataPackerAsciiBuffer::packString(const std::string& value, const char *n
return success;
}
-BOOL LLDataPackerAsciiBuffer::unpackString(std::string& value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackString(std::string& value, const char *name)
{
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore*/
if (!getValueStr(name, valuestr, DP_BUFSIZE)) // NULL terminated
{
- return FALSE;
+ return false;
}
value = valuestr;
- return TRUE;
+ return true;
}
-BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const char *name)
+bool LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
@@ -789,7 +789,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const ch
S32 i;
- BOOL bBufferFull = FALSE;
+ bool bBufferFull = false;
for (i = 0; i < size && !bBufferFull; i++)
{
numCopied = snprintf(mCurBufferp, getBufferSize()-getCurrentSize(), "%02x ", value[i]); /* Flawfinder: ignore */
@@ -797,7 +797,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const ch
{
numCopied = getBufferSize()-getCurrentSize();
LL_WARNS() << "LLDataPackerAsciiBuffer::packBinaryData: data truncated: " << LL_ENDL;
- bBufferFull = TRUE;
+ bBufferFull = true;
}
mCurBufferp += numCopied;
}
@@ -829,13 +829,13 @@ BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const ch
}
-BOOL LLDataPackerAsciiBuffer::unpackBinaryData(U8 *value, S32 &size, const char *name)
+bool LLDataPackerAsciiBuffer::unpackBinaryData(U8 *value, S32 &size, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
char *cur_pos = &valuestr[0];
@@ -854,16 +854,16 @@ BOOL LLDataPackerAsciiBuffer::unpackBinaryData(U8 *value, S32 &size, const char
}
-BOOL LLDataPackerAsciiBuffer::packBinaryDataFixed(const U8 *value, S32 size, const char *name)
+bool LLDataPackerAsciiBuffer::packBinaryDataFixed(const U8 *value, S32 size, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mWriteEnabled)
{
S32 i;
int numCopied = 0;
- BOOL bBufferFull = FALSE;
+ bool bBufferFull = false;
for (i = 0; i < size && !bBufferFull; i++)
{
numCopied = snprintf(mCurBufferp, getBufferSize()-getCurrentSize(), "%02x ", value[i]); /* Flawfinder: ignore */
@@ -871,7 +871,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryDataFixed(const U8 *value, S32 size, con
{
numCopied = getBufferSize()-getCurrentSize();
LL_WARNS() << "LLDataPackerAsciiBuffer::packBinaryDataFixed: data truncated: " << LL_ENDL;
- bBufferFull = TRUE;
+ bBufferFull = true;
}
mCurBufferp += numCopied;
@@ -901,13 +901,13 @@ BOOL LLDataPackerAsciiBuffer::packBinaryDataFixed(const U8 *value, S32 size, con
}
-BOOL LLDataPackerAsciiBuffer::unpackBinaryDataFixed(U8 *value, S32 size, const char *name)
+bool LLDataPackerAsciiBuffer::unpackBinaryDataFixed(U8 *value, S32 size, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
char *cur_pos = &valuestr[0];
@@ -925,9 +925,9 @@ BOOL LLDataPackerAsciiBuffer::unpackBinaryDataFixed(U8 *value, S32 size, const c
-BOOL LLDataPackerAsciiBuffer::packU8(const U8 value, const char *name)
+bool LLDataPackerAsciiBuffer::packU8(const U8 value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
if (mWriteEnabled)
@@ -958,13 +958,13 @@ BOOL LLDataPackerAsciiBuffer::packU8(const U8 value, const char *name)
}
-BOOL LLDataPackerAsciiBuffer::unpackU8(U8 &value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackU8(U8 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
S32 in_val;
@@ -973,9 +973,9 @@ BOOL LLDataPackerAsciiBuffer::unpackU8(U8 &value, const char *name)
return success;
}
-BOOL LLDataPackerAsciiBuffer::packU16(const U16 value, const char *name)
+bool LLDataPackerAsciiBuffer::packU16(const U16 value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
if (mWriteEnabled)
@@ -1005,13 +1005,13 @@ BOOL LLDataPackerAsciiBuffer::packU16(const U16 value, const char *name)
}
-BOOL LLDataPackerAsciiBuffer::unpackU16(U16 &value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackU16(U16 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
S32 in_val;
@@ -1020,9 +1020,9 @@ BOOL LLDataPackerAsciiBuffer::unpackU16(U16 &value, const char *name)
return success;
}
-BOOL LLDataPackerAsciiBuffer::packS16(const S16 value, const char *name)
+bool LLDataPackerAsciiBuffer::packS16(const S16 value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
if (mWriteEnabled)
@@ -1052,13 +1052,13 @@ BOOL LLDataPackerAsciiBuffer::packS16(const S16 value, const char *name)
}
-BOOL LLDataPackerAsciiBuffer::unpackS16(S16 &value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackS16(S16 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
S32 in_val;
@@ -1067,9 +1067,9 @@ BOOL LLDataPackerAsciiBuffer::unpackS16(S16 &value, const char *name)
return success;
}
-BOOL LLDataPackerAsciiBuffer::packU32(const U32 value, const char *name)
+bool LLDataPackerAsciiBuffer::packU32(const U32 value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
if (mWriteEnabled)
@@ -1097,13 +1097,13 @@ BOOL LLDataPackerAsciiBuffer::packU32(const U32 value, const char *name)
}
-BOOL LLDataPackerAsciiBuffer::unpackU32(U32 &value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackU32(U32 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%u", &value);
@@ -1111,9 +1111,9 @@ BOOL LLDataPackerAsciiBuffer::unpackU32(U32 &value, const char *name)
}
-BOOL LLDataPackerAsciiBuffer::packS32(const S32 value, const char *name)
+bool LLDataPackerAsciiBuffer::packS32(const S32 value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
if (mWriteEnabled)
@@ -1141,13 +1141,13 @@ BOOL LLDataPackerAsciiBuffer::packS32(const S32 value, const char *name)
}
-BOOL LLDataPackerAsciiBuffer::unpackS32(S32 &value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackS32(S32 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%d", &value);
@@ -1155,9 +1155,9 @@ BOOL LLDataPackerAsciiBuffer::unpackS32(S32 &value, const char *name)
}
-BOOL LLDataPackerAsciiBuffer::packF32(const F32 value, const char *name)
+bool LLDataPackerAsciiBuffer::packF32(const F32 value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
if (mWriteEnabled)
@@ -1185,13 +1185,13 @@ BOOL LLDataPackerAsciiBuffer::packF32(const F32 value, const char *name)
}
-BOOL LLDataPackerAsciiBuffer::unpackF32(F32 &value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackF32(F32 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%f", &value);
@@ -1199,9 +1199,9 @@ BOOL LLDataPackerAsciiBuffer::unpackF32(F32 &value, const char *name)
}
-BOOL LLDataPackerAsciiBuffer::packColor4(const LLColor4 &value, const char *name)
+bool LLDataPackerAsciiBuffer::packColor4(const LLColor4 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
if (mWriteEnabled)
@@ -1229,22 +1229,22 @@ BOOL LLDataPackerAsciiBuffer::packColor4(const LLColor4 &value, const char *name
}
-BOOL LLDataPackerAsciiBuffer::unpackColor4(LLColor4 &value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackColor4(LLColor4 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%f %f %f %f", &value.mV[0], &value.mV[1], &value.mV[2], &value.mV[3]);
return success;
}
-BOOL LLDataPackerAsciiBuffer::packColor4U(const LLColor4U &value, const char *name)
+bool LLDataPackerAsciiBuffer::packColor4U(const LLColor4U &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
if (mWriteEnabled)
@@ -1272,13 +1272,13 @@ BOOL LLDataPackerAsciiBuffer::packColor4U(const LLColor4U &value, const char *na
}
-BOOL LLDataPackerAsciiBuffer::unpackColor4U(LLColor4U &value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackColor4U(LLColor4U &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
S32 r, g, b, a;
@@ -1292,9 +1292,9 @@ BOOL LLDataPackerAsciiBuffer::unpackColor4U(LLColor4U &value, const char *name)
}
-BOOL LLDataPackerAsciiBuffer::packVector2(const LLVector2 &value, const char *name)
+bool LLDataPackerAsciiBuffer::packVector2(const LLVector2 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
if (mWriteEnabled)
@@ -1322,13 +1322,13 @@ BOOL LLDataPackerAsciiBuffer::packVector2(const LLVector2 &value, const char *na
}
-BOOL LLDataPackerAsciiBuffer::unpackVector2(LLVector2 &value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackVector2(LLVector2 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%f %f", &value.mV[0], &value.mV[1]);
@@ -1336,9 +1336,9 @@ BOOL LLDataPackerAsciiBuffer::unpackVector2(LLVector2 &value, const char *name)
}
-BOOL LLDataPackerAsciiBuffer::packVector3(const LLVector3 &value, const char *name)
+bool LLDataPackerAsciiBuffer::packVector3(const LLVector3 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
if (mWriteEnabled)
@@ -1366,22 +1366,22 @@ BOOL LLDataPackerAsciiBuffer::packVector3(const LLVector3 &value, const char *na
}
-BOOL LLDataPackerAsciiBuffer::unpackVector3(LLVector3 &value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackVector3(LLVector3 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%f %f %f", &value.mV[0], &value.mV[1], &value.mV[2]);
return success;
}
-BOOL LLDataPackerAsciiBuffer::packVector4(const LLVector4 &value, const char *name)
+bool LLDataPackerAsciiBuffer::packVector4(const LLVector4 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
if (mWriteEnabled)
@@ -1409,13 +1409,13 @@ BOOL LLDataPackerAsciiBuffer::packVector4(const LLVector4 &value, const char *na
}
-BOOL LLDataPackerAsciiBuffer::unpackVector4(LLVector4 &value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackVector4(LLVector4 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%f %f %f %f", &value.mV[0], &value.mV[1], &value.mV[2], &value.mV[3]);
@@ -1423,9 +1423,9 @@ BOOL LLDataPackerAsciiBuffer::unpackVector4(LLVector4 &value, const char *name)
}
-BOOL LLDataPackerAsciiBuffer::packUUID(const LLUUID &value, const char *name)
+bool LLDataPackerAsciiBuffer::packUUID(const LLUUID &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
int numCopied = 0;
@@ -1449,20 +1449,20 @@ BOOL LLDataPackerAsciiBuffer::packUUID(const LLUUID &value, const char *name)
{
numCopied = getBufferSize()-getCurrentSize();
LL_WARNS() << "LLDataPackerAsciiBuffer::packUUID: truncated: " << LL_ENDL;
- success = FALSE;
+ success = false;
}
mCurBufferp += numCopied;
return success;
}
-BOOL LLDataPackerAsciiBuffer::unpackUUID(LLUUID &value, const char *name)
+bool LLDataPackerAsciiBuffer::unpackUUID(LLUUID &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
char tmp_str[64]; /* Flawfinder: ignore */
@@ -1507,9 +1507,9 @@ void LLDataPackerAsciiBuffer::writeIndentedName(const char *name)
}
}
-BOOL LLDataPackerAsciiBuffer::getValueStr(const char *name, char *out_value, S32 value_len)
+bool LLDataPackerAsciiBuffer::getValueStr(const char *name, char *out_value, S32 value_len)
{
- BOOL success = TRUE;
+ bool success = true;
char buffer[DP_BUFSIZE]; /* Flawfinder: ignore */
char keyword[DP_BUFSIZE]; /* Flawfinder: ignore */
char value[DP_BUFSIZE]; /* Flawfinder: ignore */
@@ -1530,7 +1530,7 @@ BOOL LLDataPackerAsciiBuffer::getValueStr(const char *name, char *out_value, S32
if (strcmp(keyword, name))
{
LL_WARNS() << "Data packer expecting keyword of type " << name << ", got " << keyword << " instead!" << LL_ENDL;
- return FALSE;
+ return false;
}
}
else
@@ -1565,9 +1565,9 @@ std::string convertF32ToString(F32 val)
//---------------------------------------------------------------------------
// LLDataPackerAsciiFile implementation
//---------------------------------------------------------------------------
-BOOL LLDataPackerAsciiFile::packString(const std::string& value, const char *name)
+bool LLDataPackerAsciiFile::packString(const std::string& value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
{
@@ -1580,22 +1580,22 @@ BOOL LLDataPackerAsciiFile::packString(const std::string& value, const char *nam
return success;
}
-BOOL LLDataPackerAsciiFile::unpackString(std::string& value, const char *name)
+bool LLDataPackerAsciiFile::unpackString(std::string& value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
value = valuestr;
return success;
}
-BOOL LLDataPackerAsciiFile::packBinaryData(const U8 *value, S32 size, const char *name)
+bool LLDataPackerAsciiFile::packBinaryData(const U8 *value, S32 size, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
@@ -1627,13 +1627,13 @@ BOOL LLDataPackerAsciiFile::packBinaryData(const U8 *value, S32 size, const char
}
-BOOL LLDataPackerAsciiFile::unpackBinaryData(U8 *value, S32 &size, const char *name)
+bool LLDataPackerAsciiFile::unpackBinaryData(U8 *value, S32 &size, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore*/
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
char *cur_pos = &valuestr[0];
@@ -1652,9 +1652,9 @@ BOOL LLDataPackerAsciiFile::unpackBinaryData(U8 *value, S32 &size, const char *n
}
-BOOL LLDataPackerAsciiFile::packBinaryDataFixed(const U8 *value, S32 size, const char *name)
+bool LLDataPackerAsciiFile::packBinaryDataFixed(const U8 *value, S32 size, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
@@ -1681,13 +1681,13 @@ BOOL LLDataPackerAsciiFile::packBinaryDataFixed(const U8 *value, S32 size, const
}
-BOOL LLDataPackerAsciiFile::unpackBinaryDataFixed(U8 *value, S32 size, const char *name)
+bool LLDataPackerAsciiFile::unpackBinaryDataFixed(U8 *value, S32 size, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore*/
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
char *cur_pos = &valuestr[0];
@@ -1705,9 +1705,9 @@ BOOL LLDataPackerAsciiFile::unpackBinaryDataFixed(U8 *value, S32 size, const cha
-BOOL LLDataPackerAsciiFile::packU8(const U8 value, const char *name)
+bool LLDataPackerAsciiFile::packU8(const U8 value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
{
@@ -1723,13 +1723,13 @@ BOOL LLDataPackerAsciiFile::packU8(const U8 value, const char *name)
}
-BOOL LLDataPackerAsciiFile::unpackU8(U8 &value, const char *name)
+bool LLDataPackerAsciiFile::unpackU8(U8 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
S32 in_val;
@@ -1738,9 +1738,9 @@ BOOL LLDataPackerAsciiFile::unpackU8(U8 &value, const char *name)
return success;
}
-BOOL LLDataPackerAsciiFile::packU16(const U16 value, const char *name)
+bool LLDataPackerAsciiFile::packU16(const U16 value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
{
@@ -1754,13 +1754,13 @@ BOOL LLDataPackerAsciiFile::packU16(const U16 value, const char *name)
}
-BOOL LLDataPackerAsciiFile::unpackU16(U16 &value, const char *name)
+bool LLDataPackerAsciiFile::unpackU16(U16 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
S32 in_val;
@@ -1769,9 +1769,9 @@ BOOL LLDataPackerAsciiFile::unpackU16(U16 &value, const char *name)
return success;
}
-BOOL LLDataPackerAsciiFile::packS16(const S16 value, const char *name)
+bool LLDataPackerAsciiFile::packS16(const S16 value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
{
@@ -1785,13 +1785,13 @@ BOOL LLDataPackerAsciiFile::packS16(const S16 value, const char *name)
}
-BOOL LLDataPackerAsciiFile::unpackS16(S16 &value, const char *name)
+bool LLDataPackerAsciiFile::unpackS16(S16 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
S32 in_val;
@@ -1800,9 +1800,9 @@ BOOL LLDataPackerAsciiFile::unpackS16(S16 &value, const char *name)
return success;
}
-BOOL LLDataPackerAsciiFile::packU32(const U32 value, const char *name)
+bool LLDataPackerAsciiFile::packU32(const U32 value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
{
@@ -1816,13 +1816,13 @@ BOOL LLDataPackerAsciiFile::packU32(const U32 value, const char *name)
}
-BOOL LLDataPackerAsciiFile::unpackU32(U32 &value, const char *name)
+bool LLDataPackerAsciiFile::unpackU32(U32 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%u", &value);
@@ -1830,9 +1830,9 @@ BOOL LLDataPackerAsciiFile::unpackU32(U32 &value, const char *name)
}
-BOOL LLDataPackerAsciiFile::packS32(const S32 value, const char *name)
+bool LLDataPackerAsciiFile::packS32(const S32 value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
{
@@ -1846,13 +1846,13 @@ BOOL LLDataPackerAsciiFile::packS32(const S32 value, const char *name)
}
-BOOL LLDataPackerAsciiFile::unpackS32(S32 &value, const char *name)
+bool LLDataPackerAsciiFile::unpackS32(S32 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%d", &value);
@@ -1860,9 +1860,9 @@ BOOL LLDataPackerAsciiFile::unpackS32(S32 &value, const char *name)
}
-BOOL LLDataPackerAsciiFile::packF32(const F32 value, const char *name)
+bool LLDataPackerAsciiFile::packF32(const F32 value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
{
@@ -1876,13 +1876,13 @@ BOOL LLDataPackerAsciiFile::packF32(const F32 value, const char *name)
}
-BOOL LLDataPackerAsciiFile::unpackF32(F32 &value, const char *name)
+bool LLDataPackerAsciiFile::unpackF32(F32 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%f", &value);
@@ -1890,9 +1890,9 @@ BOOL LLDataPackerAsciiFile::unpackF32(F32 &value, const char *name)
}
-BOOL LLDataPackerAsciiFile::packColor4(const LLColor4 &value, const char *name)
+bool LLDataPackerAsciiFile::packColor4(const LLColor4 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
{
@@ -1906,22 +1906,22 @@ BOOL LLDataPackerAsciiFile::packColor4(const LLColor4 &value, const char *name)
}
-BOOL LLDataPackerAsciiFile::unpackColor4(LLColor4 &value, const char *name)
+bool LLDataPackerAsciiFile::unpackColor4(LLColor4 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%f %f %f %f", &value.mV[0], &value.mV[1], &value.mV[2], &value.mV[3]);
return success;
}
-BOOL LLDataPackerAsciiFile::packColor4U(const LLColor4U &value, const char *name)
+bool LLDataPackerAsciiFile::packColor4U(const LLColor4U &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
{
@@ -1935,13 +1935,13 @@ BOOL LLDataPackerAsciiFile::packColor4U(const LLColor4U &value, const char *name
}
-BOOL LLDataPackerAsciiFile::unpackColor4U(LLColor4U &value, const char *name)
+bool LLDataPackerAsciiFile::unpackColor4U(LLColor4U &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
S32 r, g, b, a;
@@ -1955,9 +1955,9 @@ BOOL LLDataPackerAsciiFile::unpackColor4U(LLColor4U &value, const char *name)
}
-BOOL LLDataPackerAsciiFile::packVector2(const LLVector2 &value, const char *name)
+bool LLDataPackerAsciiFile::packVector2(const LLVector2 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
{
@@ -1971,13 +1971,13 @@ BOOL LLDataPackerAsciiFile::packVector2(const LLVector2 &value, const char *name
}
-BOOL LLDataPackerAsciiFile::unpackVector2(LLVector2 &value, const char *name)
+bool LLDataPackerAsciiFile::unpackVector2(LLVector2 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%f %f", &value.mV[0], &value.mV[1]);
@@ -1985,9 +1985,9 @@ BOOL LLDataPackerAsciiFile::unpackVector2(LLVector2 &value, const char *name)
}
-BOOL LLDataPackerAsciiFile::packVector3(const LLVector3 &value, const char *name)
+bool LLDataPackerAsciiFile::packVector3(const LLVector3 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
{
@@ -2001,22 +2001,22 @@ BOOL LLDataPackerAsciiFile::packVector3(const LLVector3 &value, const char *name
}
-BOOL LLDataPackerAsciiFile::unpackVector3(LLVector3 &value, const char *name)
+bool LLDataPackerAsciiFile::unpackVector3(LLVector3 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%f %f %f", &value.mV[0], &value.mV[1], &value.mV[2]);
return success;
}
-BOOL LLDataPackerAsciiFile::packVector4(const LLVector4 &value, const char *name)
+bool LLDataPackerAsciiFile::packVector4(const LLVector4 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
if (mFP)
{
@@ -2030,13 +2030,13 @@ BOOL LLDataPackerAsciiFile::packVector4(const LLVector4 &value, const char *name
}
-BOOL LLDataPackerAsciiFile::unpackVector4(LLVector4 &value, const char *name)
+bool LLDataPackerAsciiFile::unpackVector4(LLVector4 &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
sscanf(valuestr,"%f %f %f %f", &value.mV[0], &value.mV[1], &value.mV[2], &value.mV[3]);
@@ -2044,9 +2044,9 @@ BOOL LLDataPackerAsciiFile::unpackVector4(LLVector4 &value, const char *name)
}
-BOOL LLDataPackerAsciiFile::packUUID(const LLUUID &value, const char *name)
+bool LLDataPackerAsciiFile::packUUID(const LLUUID &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
writeIndentedName(name);
std::string tmp_str;
value.toString(tmp_str);
@@ -2062,13 +2062,13 @@ BOOL LLDataPackerAsciiFile::packUUID(const LLUUID &value, const char *name)
}
-BOOL LLDataPackerAsciiFile::unpackUUID(LLUUID &value, const char *name)
+bool LLDataPackerAsciiFile::unpackUUID(LLUUID &value, const char *name)
{
- BOOL success = TRUE;
+ bool success = true;
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
if (!getValueStr(name, valuestr, DP_BUFSIZE))
{
- return FALSE;
+ return false;
}
char tmp_str[64]; /*Flawfinder: ignore */
@@ -2100,9 +2100,9 @@ void LLDataPackerAsciiFile::writeIndentedName(const char *name)
}
}
-BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 value_len)
+bool LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 value_len)
{
- BOOL success = FALSE;
+ bool success = false;
char buffer[DP_BUFSIZE]; /*Flawfinder: ignore*/
char keyword[DP_BUFSIZE]; /*Flawfinder: ignore*/
char value[DP_BUFSIZE]; /*Flawfinder: ignore*/
@@ -2117,7 +2117,7 @@ BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 v
if (0 != fgetpos(mFP, &last_pos)) // 0==success for fgetpos
{
LL_WARNS() << "Data packer failed to fgetpos" << LL_ENDL;
- return FALSE;
+ return false;
}
if (fgets(buffer, DP_BUFSIZE, mFP) == NULL)
@@ -2131,20 +2131,20 @@ BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 v
{
LL_WARNS() << "Data packer could not get the keyword!" << LL_ENDL;
fsetpos(mFP, &last_pos);
- return FALSE;
+ return false;
}
if (strcmp(keyword, name))
{
LL_WARNS() << "Data packer expecting keyword of type " << name << ", got " << keyword << " instead!" << LL_ENDL;
fsetpos(mFP, &last_pos);
- return FALSE;
+ return false;
}
S32 in_value_len = (S32)strlen(value)+1; /*Flawfinder: ignore*/
S32 min_len = llmin(in_value_len, value_len);
memcpy(out_value, value, min_len); /*Flawfinder: ignore*/
out_value[min_len-1] = 0;
- success = TRUE;
+ success = true;
}
else if (mInputStream)
{
@@ -2154,19 +2154,19 @@ BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 v
if (!keyword[0])
{
LL_WARNS() << "Data packer could not get the keyword!" << LL_ENDL;
- return FALSE;
+ return false;
}
if (strcmp(keyword, name))
{
LL_WARNS() << "Data packer expecting keyword of type " << name << ", got " << keyword << " instead!" << LL_ENDL;
- return FALSE;
+ return false;
}
S32 in_value_len = (S32)strlen(value)+1; /*Flawfinder: ignore*/
S32 min_len = llmin(in_value_len, value_len);
memcpy(out_value, value, min_len); /*Flawfinder: ignore*/
out_value[min_len-1] = 0;
- success = TRUE;
+ success = true;
}
return success;
diff --git a/indra/llmessage/lldatapacker.h b/indra/llmessage/lldatapacker.h
index 721aa5eb55..e6852534de 100644
--- a/indra/llmessage/lldatapacker.h
+++ b/indra/llmessage/lldatapacker.h
@@ -45,72 +45,72 @@ public:
virtual void reset();
virtual void dumpBufferToLog();
- virtual BOOL hasNext() const = 0;
+ virtual bool hasNext() const = 0;
- virtual BOOL packString(const std::string& value, const char *name) = 0;
- virtual BOOL unpackString(std::string& value, const char *name) = 0;
+ virtual bool packString(const std::string& value, const char *name) = 0;
+ virtual bool unpackString(std::string& value, const char *name) = 0;
- virtual BOOL packBinaryData(const U8 *value, S32 size, const char *name) = 0;
- virtual BOOL unpackBinaryData(U8 *value, S32 &size, const char *name) = 0;
+ virtual bool packBinaryData(const U8 *value, S32 size, const char *name) = 0;
+ virtual bool unpackBinaryData(U8 *value, S32 &size, const char *name) = 0;
// Constant size binary data packing
- virtual BOOL packBinaryDataFixed(const U8 *value, S32 size, const char *name) = 0;
- virtual BOOL unpackBinaryDataFixed(U8 *value, S32 size, const char *name) = 0;
+ virtual bool packBinaryDataFixed(const U8 *value, S32 size, const char *name) = 0;
+ virtual bool unpackBinaryDataFixed(U8 *value, S32 size, const char *name) = 0;
- virtual BOOL packU8(const U8 value, const char *name) = 0;
- virtual BOOL unpackU8(U8 &value, const char *name) = 0;
+ virtual bool packU8(const U8 value, const char *name) = 0;
+ virtual bool unpackU8(U8 &value, const char *name) = 0;
- virtual BOOL packU16(const U16 value, const char *name) = 0;
- virtual BOOL unpackU16(U16 &value, const char *name) = 0;
- BOOL unpackU16s(U16 *value, S32 count, const char *name);
+ virtual bool packU16(const U16 value, const char *name) = 0;
+ virtual bool unpackU16(U16 &value, const char *name) = 0;
+ bool unpackU16s(U16 *value, S32 count, const char *name);
- virtual BOOL packS16(const S16 value, const char *name) = 0;
- virtual BOOL unpackS16(S16 &value, const char *name) = 0;
- BOOL unpackS16s(S16 *value, S32 count, const char *name);
+ virtual bool packS16(const S16 value, const char *name) = 0;
+ virtual bool unpackS16(S16 &value, const char *name) = 0;
+ bool unpackS16s(S16 *value, S32 count, const char *name);
- virtual BOOL packU32(const U32 value, const char *name) = 0;
- virtual BOOL unpackU32(U32 &value, const char *name) = 0;
+ virtual bool packU32(const U32 value, const char *name) = 0;
+ virtual bool unpackU32(U32 &value, const char *name) = 0;
- virtual BOOL packS32(const S32 value, const char *name) = 0;
- virtual BOOL unpackS32(S32 &value, const char *name) = 0;
+ virtual bool packS32(const S32 value, const char *name) = 0;
+ virtual bool unpackS32(S32 &value, const char *name) = 0;
- virtual BOOL packF32(const F32 value, const char *name) = 0;
- virtual BOOL unpackF32(F32 &value, const char *name) = 0;
- BOOL unpackF32s(F32 *values, S32 count, const char *name);
+ virtual bool packF32(const F32 value, const char *name) = 0;
+ virtual bool unpackF32(F32 &value, const char *name) = 0;
+ bool unpackF32s(F32 *values, S32 count, const char *name);
// Packs a float into an integer, using the given size
// and picks the right U* data type to pack into.
- BOOL packFixed(const F32 value, const char *name,
- const BOOL is_signed, const U32 int_bits, const U32 frac_bits);
- BOOL unpackFixed(F32 &value, const char *name,
- const BOOL is_signed, const U32 int_bits, const U32 frac_bits);
+ bool packFixed(const F32 value, const char *name,
+ const bool is_signed, const U32 int_bits, const U32 frac_bits);
+ bool unpackFixed(F32 &value, const char *name,
+ const bool is_signed, const U32 int_bits, const U32 frac_bits);
- virtual BOOL packColor4(const LLColor4 &value, const char *name) = 0;
- virtual BOOL unpackColor4(LLColor4 &value, const char *name) = 0;
+ virtual bool packColor4(const LLColor4 &value, const char *name) = 0;
+ virtual bool unpackColor4(LLColor4 &value, const char *name) = 0;
- virtual BOOL packColor4U(const LLColor4U &value, const char *name) = 0;
- virtual BOOL unpackColor4U(LLColor4U &value, const char *name) = 0;
- BOOL unpackColor4Us(LLColor4U *values, S32 count, const char *name);
+ virtual bool packColor4U(const LLColor4U &value, const char *name) = 0;
+ virtual bool unpackColor4U(LLColor4U &value, const char *name) = 0;
+ bool unpackColor4Us(LLColor4U *values, S32 count, const char *name);
- virtual BOOL packVector2(const LLVector2 &value, const char *name) = 0;
- virtual BOOL unpackVector2(LLVector2 &value, const char *name) = 0;
+ virtual bool packVector2(const LLVector2 &value, const char *name) = 0;
+ virtual bool unpackVector2(LLVector2 &value, const char *name) = 0;
- virtual BOOL packVector3(const LLVector3 &value, const char *name) = 0;
- virtual BOOL unpackVector3(LLVector3 &value, const char *name) = 0;
+ virtual bool packVector3(const LLVector3 &value, const char *name) = 0;
+ virtual bool unpackVector3(LLVector3 &value, const char *name) = 0;
- virtual BOOL packVector4(const LLVector4 &value, const char *name) = 0;
- virtual BOOL unpackVector4(LLVector4 &value, const char *name) = 0;
+ virtual bool packVector4(const LLVector4 &value, const char *name) = 0;
+ virtual bool unpackVector4(LLVector4 &value, const char *name) = 0;
- virtual BOOL packUUID(const LLUUID &value, const char *name) = 0;
- virtual BOOL unpackUUID(LLUUID &value, const char *name) = 0;
- BOOL unpackUUIDs(LLUUID *values, S32 count, const char *name);
+ virtual bool packUUID(const LLUUID &value, const char *name) = 0;
+ virtual bool unpackUUID(LLUUID &value, const char *name) = 0;
+ bool unpackUUIDs(LLUUID *values, S32 count, const char *name);
U32 getPassFlags() const { return mPassFlags; }
void setPassFlags(U32 flags) { mPassFlags = flags; }
protected:
LLDataPacker();
protected:
U32 mPassFlags;
- BOOL mWriteEnabled; // disable this to do things like determine filesize without actually copying data
+ bool mWriteEnabled; // disable this to do things like determine filesize without actually copying data
};
class LLDataPackerBinaryBuffer : public LLDataPacker
@@ -122,7 +122,7 @@ public:
mCurBufferp(bufferp),
mBufferSize(size)
{
- mWriteEnabled = TRUE;
+ mWriteEnabled = true;
}
LLDataPackerBinaryBuffer()
@@ -133,58 +133,58 @@ public:
{
}
- /*virtual*/ BOOL packString(const std::string& value, const char *name);
- /*virtual*/ BOOL unpackString(std::string& value, const char *name);
+ /*virtual*/ bool packString(const std::string& value, const char *name);
+ /*virtual*/ bool unpackString(std::string& value, const char *name);
- /*virtual*/ BOOL packBinaryData(const U8 *value, S32 size, const char *name);
- /*virtual*/ BOOL unpackBinaryData(U8 *value, S32 &size, const char *name);
+ /*virtual*/ bool packBinaryData(const U8 *value, S32 size, const char *name);
+ /*virtual*/ bool unpackBinaryData(U8 *value, S32 &size, const char *name);
// Constant size binary data packing
- /*virtual*/ BOOL packBinaryDataFixed(const U8 *value, S32 size, const char *name);
- /*virtual*/ BOOL unpackBinaryDataFixed(U8 *value, S32 size, const char *name);
+ /*virtual*/ bool packBinaryDataFixed(const U8 *value, S32 size, const char *name);
+ /*virtual*/ bool unpackBinaryDataFixed(U8 *value, S32 size, const char *name);
- /*virtual*/ BOOL packU8(const U8 value, const char *name);
- /*virtual*/ BOOL unpackU8(U8 &value, const char *name);
+ /*virtual*/ bool packU8(const U8 value, const char *name);
+ /*virtual*/ bool unpackU8(U8 &value, const char *name);
- /*virtual*/ BOOL packU16(const U16 value, const char *name);
- /*virtual*/ BOOL unpackU16(U16 &value, const char *name);
+ /*virtual*/ bool packU16(const U16 value, const char *name);
+ /*virtual*/ bool unpackU16(U16 &value, const char *name);
- /*virtual*/ BOOL packS16(const S16 value, const char *name);
- /*virtual*/ BOOL unpackS16(S16 &value, const char *name);
+ /*virtual*/ bool packS16(const S16 value, const char *name);
+ /*virtual*/ bool unpackS16(S16 &value, const char *name);
- /*virtual*/ BOOL packU32(const U32 value, const char *name);
- /*virtual*/ BOOL unpackU32(U32 &value, const char *name);
+ /*virtual*/ bool packU32(const U32 value, const char *name);
+ /*virtual*/ bool unpackU32(U32 &value, const char *name);
- /*virtual*/ BOOL packS32(const S32 value, const char *name);
- /*virtual*/ BOOL unpackS32(S32 &value, const char *name);
+ /*virtual*/ bool packS32(const S32 value, const char *name);
+ /*virtual*/ bool unpackS32(S32 &value, const char *name);
- /*virtual*/ BOOL packF32(const F32 value, const char *name);
- /*virtual*/ BOOL unpackF32(F32 &value, const char *name);
+ /*virtual*/ bool packF32(const F32 value, const char *name);
+ /*virtual*/ bool unpackF32(F32 &value, const char *name);
- /*virtual*/ BOOL packColor4(const LLColor4 &value, const char *name);
- /*virtual*/ BOOL unpackColor4(LLColor4 &value, const char *name);
+ /*virtual*/ bool packColor4(const LLColor4 &value, const char *name);
+ /*virtual*/ bool unpackColor4(LLColor4 &value, const char *name);
- /*virtual*/ BOOL packColor4U(const LLColor4U &value, const char *name);
- /*virtual*/ BOOL unpackColor4U(LLColor4U &value, const char *name);
+ /*virtual*/ bool packColor4U(const LLColor4U &value, const char *name);
+ /*virtual*/ bool unpackColor4U(LLColor4U &value, const char *name);
- /*virtual*/ BOOL packVector2(const LLVector2 &value, const char *name);
- /*virtual*/ BOOL unpackVector2(LLVector2 &value, const char *name);
+ /*virtual*/ bool packVector2(const LLVector2 &value, const char *name);
+ /*virtual*/ bool unpackVector2(LLVector2 &value, const char *name);
- /*virtual*/ BOOL packVector3(const LLVector3 &value, const char *name);
- /*virtual*/ BOOL unpackVector3(LLVector3 &value, const char *name);
+ /*virtual*/ bool packVector3(const LLVector3 &value, const char *name);
+ /*virtual*/ bool unpackVector3(LLVector3 &value, const char *name);
- /*virtual*/ BOOL packVector4(const LLVector4 &value, const char *name);
- /*virtual*/ BOOL unpackVector4(LLVector4 &value, const char *name);
+ /*virtual*/ bool packVector4(const LLVector4 &value, const char *name);
+ /*virtual*/ bool unpackVector4(LLVector4 &value, const char *name);
- /*virtual*/ BOOL packUUID(const LLUUID &value, const char *name);
- /*virtual*/ BOOL unpackUUID(LLUUID &value, const char *name);
+ /*virtual*/ bool packUUID(const LLUUID &value, const char *name);
+ /*virtual*/ bool unpackUUID(LLUUID &value, const char *name);
S32 getCurrentSize() const { return (S32)(mCurBufferp - mBufferp); }
S32 getBufferSize() const { return mBufferSize; }
const U8* getBuffer() const { return mBufferp; }
void reset() { mCurBufferp = mBufferp; mWriteEnabled = (mCurBufferp != NULL); }
void shift(S32 offset) { reset(); mCurBufferp += offset;}
- void freeBuffer() { delete [] mBufferp; mBufferp = mCurBufferp = NULL; mBufferSize = 0; mWriteEnabled = FALSE; }
+ void freeBuffer() { delete [] mBufferp; mBufferp = mCurBufferp = NULL; mBufferSize = 0; mWriteEnabled = false; }
void assignBuffer(U8 *bufferp, S32 size)
{
if(mBufferp && mBufferp != bufferp)
@@ -194,22 +194,22 @@ public:
mBufferp = bufferp;
mCurBufferp = bufferp;
mBufferSize = size;
- mWriteEnabled = TRUE;
+ mWriteEnabled = true;
}
const LLDataPackerBinaryBuffer& operator=(const LLDataPackerBinaryBuffer &a);
- /*virtual*/ BOOL hasNext() const { return getCurrentSize() < getBufferSize(); }
+ /*virtual*/ bool hasNext() const { return getCurrentSize() < getBufferSize(); }
/*virtual*/ void dumpBufferToLog();
protected:
- inline BOOL verifyLength(const S32 data_size, const char *name);
+ inline bool verifyLength(const S32 data_size, const char *name);
U8 *mBufferp;
U8 *mCurBufferp;
S32 mBufferSize;
};
-inline BOOL LLDataPackerBinaryBuffer::verifyLength(const S32 data_size, const char *name)
+inline bool LLDataPackerBinaryBuffer::verifyLength(const S32 data_size, const char *name)
{
if (mWriteEnabled && (mCurBufferp - mBufferp) > mBufferSize - data_size)
{
@@ -217,7 +217,7 @@ inline BOOL LLDataPackerBinaryBuffer::verifyLength(const S32 data_size, const ch
//LL_WARNS() << "Buffer overflow in BinaryBuffer length verify, field name " << name << "!" << LL_ENDL;
//LL_WARNS() << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << LL_ENDL;
- // return FALSE;
+ // return false;
std::stringstream strm;
strm << "Buffer overflow in BinaryBuffer length verify, field name " << name << "!" << std::endl;
@@ -227,7 +227,7 @@ inline BOOL LLDataPackerBinaryBuffer::verifyLength(const S32 data_size, const ch
//
}
- return TRUE;
+ return true;
}
class LLDataPackerAsciiBuffer : public LLDataPacker
@@ -239,8 +239,8 @@ public:
mCurBufferp = bufferp;
mBufferSize = size;
mPassFlags = 0;
- mIncludeNames = FALSE;
- mWriteEnabled = TRUE;
+ mIncludeNames = false;
+ mWriteEnabled = true;
}
LLDataPackerAsciiBuffer()
@@ -249,57 +249,57 @@ public:
mCurBufferp = NULL;
mBufferSize = 0;
mPassFlags = 0;
- mIncludeNames = FALSE;
- mWriteEnabled = FALSE;
+ mIncludeNames = false;
+ mWriteEnabled = false;
}
- /*virtual*/ BOOL packString(const std::string& value, const char *name);
- /*virtual*/ BOOL unpackString(std::string& value, const char *name);
+ /*virtual*/ bool packString(const std::string& value, const char *name);
+ /*virtual*/ bool unpackString(std::string& value, const char *name);
- /*virtual*/ BOOL packBinaryData(const U8 *value, S32 size, const char *name);
- /*virtual*/ BOOL unpackBinaryData(U8 *value, S32 &size, const char *name);
+ /*virtual*/ bool packBinaryData(const U8 *value, S32 size, const char *name);
+ /*virtual*/ bool unpackBinaryData(U8 *value, S32 &size, const char *name);
// Constant size binary data packing
- /*virtual*/ BOOL packBinaryDataFixed(const U8 *value, S32 size, const char *name);
- /*virtual*/ BOOL unpackBinaryDataFixed(U8 *value, S32 size, const char *name);
+ /*virtual*/ bool packBinaryDataFixed(const U8 *value, S32 size, const char *name);
+ /*virtual*/ bool unpackBinaryDataFixed(U8 *value, S32 size, const char *name);
- /*virtual*/ BOOL packU8(const U8 value, const char *name);
- /*virtual*/ BOOL unpackU8(U8 &value, const char *name);
+ /*virtual*/ bool packU8(const U8 value, const char *name);
+ /*virtual*/ bool unpackU8(U8 &value, const char *name);
- /*virtual*/ BOOL packU16(const U16 value, const char *name);
- /*virtual*/ BOOL unpackU16(U16 &value, const char *name);
+ /*virtual*/ bool packU16(const U16 value, const char *name);
+ /*virtual*/ bool unpackU16(U16 &value, const char *name);
- /*virtual*/ BOOL packS16(const S16 value, const char *name);
- /*virtual*/ BOOL unpackS16(S16 &value, const char *name);
+ /*virtual*/ bool packS16(const S16 value, const char *name);
+ /*virtual*/ bool unpackS16(S16 &value, const char *name);
- /*virtual*/ BOOL packU32(const U32 value, const char *name);
- /*virtual*/ BOOL unpackU32(U32 &value, const char *name);
+ /*virtual*/ bool packU32(const U32 value, const char *name);
+ /*virtual*/ bool unpackU32(U32 &value, const char *name);
- /*virtual*/ BOOL packS32(const S32 value, const char *name);
- /*virtual*/ BOOL unpackS32(S32 &value, const char *name);
+ /*virtual*/ bool packS32(const S32 value, const char *name);
+ /*virtual*/ bool unpackS32(S32 &value, const char *name);
- /*virtual*/ BOOL packF32(const F32 value, const char *name);
- /*virtual*/ BOOL unpackF32(F32 &value, const char *name);
+ /*virtual*/ bool packF32(const F32 value, const char *name);
+ /*virtual*/ bool unpackF32(F32 &value, const char *name);
- /*virtual*/ BOOL packColor4(const LLColor4 &value, const char *name);
- /*virtual*/ BOOL unpackColor4(LLColor4 &value, const char *name);
+ /*virtual*/ bool packColor4(const LLColor4 &value, const char *name);
+ /*virtual*/ bool unpackColor4(LLColor4 &value, const char *name);
- /*virtual*/ BOOL packColor4U(const LLColor4U &value, const char *name);
- /*virtual*/ BOOL unpackColor4U(LLColor4U &value, const char *name);
+ /*virtual*/ bool packColor4U(const LLColor4U &value, const char *name);
+ /*virtual*/ bool unpackColor4U(LLColor4U &value, const char *name);
- /*virtual*/ BOOL packVector2(const LLVector2 &value, const char *name);
- /*virtual*/ BOOL unpackVector2(LLVector2 &value, const char *name);
+ /*virtual*/ bool packVector2(const LLVector2 &value, const char *name);
+ /*virtual*/ bool unpackVector2(LLVector2 &value, const char *name);
- /*virtual*/ BOOL packVector3(const LLVector3 &value, const char *name);
- /*virtual*/ BOOL unpackVector3(LLVector3 &value, const char *name);
+ /*virtual*/ bool packVector3(const LLVector3 &value, const char *name);
+ /*virtual*/ bool unpackVector3(LLVector3 &value, const char *name);
- /*virtual*/ BOOL packVector4(const LLVector4 &value, const char *name);
- /*virtual*/ BOOL unpackVector4(LLVector4 &value, const char *name);
+ /*virtual*/ bool packVector4(const LLVector4 &value, const char *name);
+ /*virtual*/ bool unpackVector4(LLVector4 &value, const char *name);
- /*virtual*/ BOOL packUUID(const LLUUID &value, const char *name);
- /*virtual*/ BOOL unpackUUID(LLUUID &value, const char *name);
+ /*virtual*/ bool packUUID(const LLUUID &value, const char *name);
+ /*virtual*/ bool unpackUUID(LLUUID &value, const char *name);
- void setIncludeNames(BOOL b) { mIncludeNames = b; }
+ void setIncludeNames(bool b) { mIncludeNames = b; }
// Include the trailing NULL so it's always a valid string
S32 getCurrentSize() const { return (S32)(mCurBufferp - mBufferp) + 1; }
@@ -307,7 +307,7 @@ public:
S32 getBufferSize() const { return mBufferSize; }
/*virtual*/ void reset() { mCurBufferp = mBufferp; mWriteEnabled = (mCurBufferp != NULL); }
- /*virtual*/ BOOL hasNext() const { return getCurrentSize() < getBufferSize(); }
+ /*virtual*/ bool hasNext() const { return getCurrentSize() < getBufferSize(); }
inline void freeBuffer();
inline void assignBuffer(char* bufferp, S32 size);
@@ -315,15 +315,15 @@ public:
protected:
void writeIndentedName(const char *name);
- BOOL getValueStr(const char *name, char *out_value, const S32 value_len);
+ bool getValueStr(const char *name, char *out_value, const S32 value_len);
protected:
- inline BOOL verifyLength(const S32 data_size, const char *name);
+ inline bool verifyLength(const S32 data_size, const char *name);
char *mBufferp;
char *mCurBufferp;
S32 mBufferSize;
- BOOL mIncludeNames; // useful for debugging, print the name of each field
+ bool mIncludeNames; // useful for debugging, print the name of each field
};
inline void LLDataPackerAsciiBuffer::freeBuffer()
@@ -331,7 +331,7 @@ inline void LLDataPackerAsciiBuffer::freeBuffer()
delete [] mBufferp;
mBufferp = mCurBufferp = NULL;
mBufferSize = 0;
- mWriteEnabled = FALSE;
+ mWriteEnabled = false;
}
inline void LLDataPackerAsciiBuffer::assignBuffer(char* bufferp, S32 size)
@@ -339,19 +339,19 @@ inline void LLDataPackerAsciiBuffer::assignBuffer(char* bufferp, S32 size)
mBufferp = bufferp;
mCurBufferp = bufferp;
mBufferSize = size;
- mWriteEnabled = TRUE;
+ mWriteEnabled = true;
}
-inline BOOL LLDataPackerAsciiBuffer::verifyLength(const S32 data_size, const char *name)
+inline bool LLDataPackerAsciiBuffer::verifyLength(const S32 data_size, const char *name)
{
if (mWriteEnabled && (mCurBufferp - mBufferp) > mBufferSize - data_size)
{
LL_WARNS() << "Buffer overflow in AsciiBuffer length verify, field name " << name << "!" << LL_ENDL;
LL_WARNS() << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << LL_ENDL;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
class LLDataPackerAsciiFile : public LLDataPacker
@@ -373,7 +373,7 @@ public:
mOutputStream(&output_stream),
mInputStream(NULL)
{
- mWriteEnabled = TRUE;
+ mWriteEnabled = true;
}
LLDataPackerAsciiFile(std::istream& input_stream, const S32 indent = 2)
@@ -385,55 +385,55 @@ public:
{
}
- /*virtual*/ BOOL packString(const std::string& value, const char *name);
- /*virtual*/ BOOL unpackString(std::string& value, const char *name);
+ /*virtual*/ bool packString(const std::string& value, const char *name);
+ /*virtual*/ bool unpackString(std::string& value, const char *name);
- /*virtual*/ BOOL packBinaryData(const U8 *value, S32 size, const char *name);
- /*virtual*/ BOOL unpackBinaryData(U8 *value, S32 &size, const char *name);
+ /*virtual*/ bool packBinaryData(const U8 *value, S32 size, const char *name);
+ /*virtual*/ bool unpackBinaryData(U8 *value, S32 &size, const char *name);
- /*virtual*/ BOOL packBinaryDataFixed(const U8 *value, S32 size, const char *name);
- /*virtual*/ BOOL unpackBinaryDataFixed(U8 *value, S32 size, const char *name);
+ /*virtual*/ bool packBinaryDataFixed(const U8 *value, S32 size, const char *name);
+ /*virtual*/ bool unpackBinaryDataFixed(U8 *value, S32 size, const char *name);
- /*virtual*/ BOOL packU8(const U8 value, const char *name);
- /*virtual*/ BOOL unpackU8(U8 &value, const char *name);
+ /*virtual*/ bool packU8(const U8 value, const char *name);
+ /*virtual*/ bool unpackU8(U8 &value, const char *name);
- /*virtual*/ BOOL packU16(const U16 value, const char *name);
- /*virtual*/ BOOL unpackU16(U16 &value, const char *name);
+ /*virtual*/ bool packU16(const U16 value, const char *name);
+ /*virtual*/ bool unpackU16(U16 &value, const char *name);
- /*virtual*/ BOOL packS16(const S16 value, const char *name);
- /*virtual*/ BOOL unpackS16(S16 &value, const char *name);
+ /*virtual*/ bool packS16(const S16 value, const char *name);
+ /*virtual*/ bool unpackS16(S16 &value, const char *name);
- /*virtual*/ BOOL packU32(const U32 value, const char *name);
- /*virtual*/ BOOL unpackU32(U32 &value, const char *name);
+ /*virtual*/ bool packU32(const U32 value, const char *name);
+ /*virtual*/ bool unpackU32(U32 &value, const char *name);
- /*virtual*/ BOOL packS32(const S32 value, const char *name);
- /*virtual*/ BOOL unpackS32(S32 &value, const char *name);
+ /*virtual*/ bool packS32(const S32 value, const char *name);
+ /*virtual*/ bool unpackS32(S32 &value, const char *name);
- /*virtual*/ BOOL packF32(const F32 value, const char *name);
- /*virtual*/ BOOL unpackF32(F32 &value, const char *name);
+ /*virtual*/ bool packF32(const F32 value, const char *name);
+ /*virtual*/ bool unpackF32(F32 &value, const char *name);
- /*virtual*/ BOOL packColor4(const LLColor4 &value, const char *name);
- /*virtual*/ BOOL unpackColor4(LLColor4 &value, const char *name);
+ /*virtual*/ bool packColor4(const LLColor4 &value, const char *name);
+ /*virtual*/ bool unpackColor4(LLColor4 &value, const char *name);
- /*virtual*/ BOOL packColor4U(const LLColor4U &value, const char *name);
- /*virtual*/ BOOL unpackColor4U(LLColor4U &value, const char *name);
+ /*virtual*/ bool packColor4U(const LLColor4U &value, const char *name);
+ /*virtual*/ bool unpackColor4U(LLColor4U &value, const char *name);
- /*virtual*/ BOOL packVector2(const LLVector2 &value, const char *name);
- /*virtual*/ BOOL unpackVector2(LLVector2 &value, const char *name);
+ /*virtual*/ bool packVector2(const LLVector2 &value, const char *name);
+ /*virtual*/ bool unpackVector2(LLVector2 &value, const char *name);
- /*virtual*/ BOOL packVector3(const LLVector3 &value, const char *name);
- /*virtual*/ BOOL unpackVector3(LLVector3 &value, const char *name);
+ /*virtual*/ bool packVector3(const LLVector3 &value, const char *name);
+ /*virtual*/ bool unpackVector3(LLVector3 &value, const char *name);
- /*virtual*/ BOOL packVector4(const LLVector4 &value, const char *name);
- /*virtual*/ BOOL unpackVector4(LLVector4 &value, const char *name);
+ /*virtual*/ bool packVector4(const LLVector4 &value, const char *name);
+ /*virtual*/ bool unpackVector4(LLVector4 &value, const char *name);
- /*virtual*/ BOOL packUUID(const LLUUID &value, const char *name);
- /*virtual*/ BOOL unpackUUID(LLUUID &value, const char *name);
+ /*virtual*/ bool packUUID(const LLUUID &value, const char *name);
+ /*virtual*/ bool unpackUUID(LLUUID &value, const char *name);
protected:
void writeIndentedName(const char *name);
- BOOL getValueStr(const char *name, char *out_value, const S32 value_len);
+ bool getValueStr(const char *name, char *out_value, const S32 value_len);
- /*virtual*/ BOOL hasNext() const { return true; }
+ /*virtual*/ bool hasNext() const { return true; }
protected:
S32 mIndent;
diff --git a/indra/llmessage/llmessagereader.h b/indra/llmessage/llmessagereader.h
index 3b77a6bfe4..647f267785 100644
--- a/indra/llmessage/llmessagereader.h
+++ b/indra/llmessage/llmessagereader.h
@@ -52,7 +52,7 @@ class LLMessageReader
/** All get* methods expect pointers to canonical strings. */
virtual void getBinaryData(const char *blockname, const char *varname, void *datap, S32 size, S32 blocknum = 0, S32 max_size = S32_MAX) = 0;
- virtual void getBOOL(const char *block, const char *var, BOOL &data, S32 blocknum = 0) = 0;
+ virtual void getBOOL(const char *block, const char *var, bool &data, S32 blocknum = 0) = 0;
virtual void getS8(const char *block, const char *var, S8 &data, S32 blocknum = 0) = 0;
virtual void getU8(const char *block, const char *var, U8 &data, S32 blocknum = 0) = 0;
virtual void getS16(const char *block, const char *var, S16 &data, S32 blocknum = 0) = 0;
diff --git a/indra/llmessage/llsdmessagereader.cpp b/indra/llmessage/llsdmessagereader.cpp
index b729ebafa9..d533d6535b 100644
--- a/indra/llmessage/llsdmessagereader.cpp
+++ b/indra/llmessage/llsdmessagereader.cpp
@@ -114,7 +114,7 @@ void LLSDMessageReader::getBinaryData(const char *block, const char *var,
//virtual
void LLSDMessageReader::getBOOL(const char *block, const char *var,
- BOOL &data,
+ bool &data,
S32 blocknum)
{
data = getLLSD(mMessage, block, var, blocknum);
diff --git a/indra/llmessage/llsdmessagereader.h b/indra/llmessage/llsdmessagereader.h
index 3b3d7fbfbe..4119de6009 100644
--- a/indra/llmessage/llsdmessagereader.h
+++ b/indra/llmessage/llsdmessagereader.h
@@ -46,7 +46,7 @@ public:
virtual void getBinaryData(const char *block, const char *var,
void *datap, S32 size, S32 blocknum = 0,
S32 max_size = S32_MAX);
- virtual void getBOOL(const char *block, const char *var, BOOL &data,
+ virtual void getBOOL(const char *block, const char *var, bool &data,
S32 blocknum = 0);
virtual void getS8(const char *block, const char *var, S8 &data,
S32 blocknum = 0);
diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp
index e2c1a4e8d7..791a7c7160 100644
--- a/indra/llmessage/lltemplatemessagereader.cpp
+++ b/indra/llmessage/lltemplatemessagereader.cpp
@@ -286,11 +286,11 @@ void LLTemplateMessageReader::getU8(const char *block, const char *var,
}
void LLTemplateMessageReader::getBOOL(const char *block, const char *var,
- BOOL &b, S32 blocknum )
+ bool &b, S32 blocknum )
{
U8 value(0);
getData(block, var, &value, sizeof(U8), blocknum);
- b = (BOOL) value;
+ b = (bool) value;
}
void LLTemplateMessageReader::getS16(const char *block, const char *var,
diff --git a/indra/llmessage/lltemplatemessagereader.h b/indra/llmessage/lltemplatemessagereader.h
index fcf8f92fa6..88889cd7d2 100644
--- a/indra/llmessage/lltemplatemessagereader.h
+++ b/indra/llmessage/lltemplatemessagereader.h
@@ -47,7 +47,7 @@ public:
virtual void getBinaryData(const char *blockname, const char *varname,
void *datap, S32 size, S32 blocknum = 0,
S32 max_size = S32_MAX);
- virtual void getBOOL(const char *block, const char *var, BOOL &data,
+ virtual void getBOOL(const char *block, const char *var, bool &data,
S32 blocknum = 0);
virtual void getS8(const char *block, const char *var, S8 &data,
S32 blocknum = 0);
diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp
index f9b59d7e42..956ecc11a3 100644
--- a/indra/llmessage/llxfermanager.cpp
+++ b/indra/llmessage/llxfermanager.cpp
@@ -757,7 +757,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user
LLUUID uuid;
LLAssetType::EType type;
S16 type_s16;
- BOOL b_use_big_packets;
+ bool b_use_big_packets;
mesgsys->getBOOL("XferID", "UseBigPackets", b_use_big_packets);
@@ -853,7 +853,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user
}
LL_INFOS("Xfer") << "starting file transfer: " << expanded_filename << " to " << mesgsys->getSender() << LL_ENDL;
- BOOL delete_local_on_completion = FALSE;
+ bool delete_local_on_completion = false;
mesgsys->getBOOL("XferID", "DeleteOnCompletion", delete_local_on_completion);
// -1 chunk_size causes it to use the default
diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp
index e8c5d8d371..f0d933cfbe 100644
--- a/indra/llmessage/message.cpp
+++ b/indra/llmessage/message.cpp
@@ -3684,13 +3684,13 @@ void LLMessageSystem::getU8(const char *block, const char *var, U8 &u,
LLMessageStringTable::getInstance()->getString(var), u, blocknum);
}
-void LLMessageSystem::getBOOLFast(const char *block, const char *var, BOOL &b,
+void LLMessageSystem::getBOOLFast(const char *block, const char *var, bool &b,
S32 blocknum)
{
mMessageReader->getBOOL(block, var, b, blocknum);
}
-void LLMessageSystem::getBOOL(const char *block, const char *var, BOOL &b,
+void LLMessageSystem::getBOOL(const char *block, const char *var, bool &b,
S32 blocknum)
{
getBOOLFast(LLMessageStringTable::getInstance()->getString(block),
diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h
index 345075fd3d..1095c6cd3f 100644
--- a/indra/llmessage/message.h
+++ b/indra/llmessage/message.h
@@ -599,8 +599,8 @@ public:
*/
void getBinaryDataFast(const char *blockname, const char *varname, void *datap, S32 size, S32 blocknum = 0, S32 max_size = S32_MAX);
void getBinaryData(const char *blockname, const char *varname, void *datap, S32 size, S32 blocknum = 0, S32 max_size = S32_MAX);
- void getBOOLFast( const char *block, const char *var, BOOL &data, S32 blocknum = 0);
- void getBOOL( const char *block, const char *var, BOOL &data, S32 blocknum = 0);
+ void getBOOLFast( const char *block, const char *var, bool &data, S32 blocknum = 0);
+ void getBOOL( const char *block, const char *var, bool &data, S32 blocknum = 0);
void getS8Fast( const char *block, const char *var, S8 &data, S32 blocknum = 0);
void getS8( const char *block, const char *var, S8 &data, S32 blocknum = 0);
void getU8Fast( const char *block, const char *var, U8 &data, S32 blocknum = 0);
diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp
index a4391ba8dd..93d04e16c8 100644
--- a/indra/llrender/llfontregistry.cpp
+++ b/indra/llrender/llfontregistry.cpp
@@ -312,7 +312,7 @@ bool font_desc_init_from_xml(LLXMLNodePtr node, LLFontDescriptor& desc)
if (child->hasAttribute("load_collection"))
{
- BOOL col = FALSE;
+ bool col = false;
child->getAttributeBOOL("load_collection", col);
if (col)
{
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 73fc63e623..3ad7b20127 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -1572,10 +1572,10 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask )
}
}
- BOOL item_clicked = FALSE;
- for (selected_items_t::iterator item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it)
+ bool item_clicked{ false };
+ for (const auto item : mSelectedItems)
{
- item_clicked |= (*item_it)->getRect().pointInRect(x, y);
+ item_clicked |= item->getRect().pointInRect(x, y);
}
if(!item_clicked && mSingleFolderMode)
{
diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp
index 138ba8bf02..c122ab1c9b 100644
--- a/indra/llui/llxuiparser.cpp
+++ b/indra/llui/llxuiparser.cpp
@@ -930,10 +930,10 @@ bool LLXUIParser::writeFlag(Parser& parser, const void* val_ptr, name_stack_t& s
bool LLXUIParser::readBoolValue(Parser& parser, void* val_ptr)
{
- S32 value;
+ bool value;
LLXUIParser& self = static_cast(parser);
bool success = self.mCurReadNode->getBoolValue(1, &value);
- *((bool*)val_ptr) = (value != FALSE);
+ *((bool*)val_ptr) = (value != false);
return success;
}
diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp
index 1d62f736c3..e68934fd91 100644
--- a/indra/llxml/llcontrol.cpp
+++ b/indra/llxml/llcontrol.cpp
@@ -189,10 +189,10 @@ LLSD LLControlVariable::getComparableValue(const LLSD& value)
LLSD storable_value;
if(TYPE_BOOLEAN == type() && value.isString())
{
- BOOL temp;
+ bool temp;
if(LLStringUtil::convertToBOOL(value.asString(), temp))
{
- storable_value = (bool)temp;
+ storable_value = temp;
}
else
{
@@ -961,7 +961,7 @@ U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, BOOL require
break;
case TYPE_BOOLEAN:
{
- BOOL initial = FALSE;
+ bool initial = false;
child_nodep->getAttributeBOOL("value", initial);
control->set(initial);
diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index 175031cf9a..507bd449fb 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -44,13 +44,13 @@
#include "lldir.h"
// static
-BOOL LLXMLNode::sStripEscapedStrings = TRUE;
-BOOL LLXMLNode::sStripWhitespaceValues = FALSE;
+bool LLXMLNode::sStripEscapedStrings = true;
+bool LLXMLNode::sStripWhitespaceValues = false;
LLXMLNode::LLXMLNode() :
mID(""),
mParser(NULL),
- mIsAttribute(FALSE),
+ mIsAttribute(false),
mVersionMajor(0),
mVersionMinor(0),
mLength(0),
@@ -69,7 +69,7 @@ LLXMLNode::LLXMLNode() :
{
}
-LLXMLNode::LLXMLNode(const char* name, BOOL is_attribute) :
+LLXMLNode::LLXMLNode(const char* name, bool is_attribute) :
mID(""),
mParser(NULL),
mIsAttribute(is_attribute),
@@ -91,7 +91,7 @@ LLXMLNode::LLXMLNode(const char* name, BOOL is_attribute) :
mName = gStringTable.addStringEntry(name);
}
-LLXMLNode::LLXMLNode(LLStringTableEntry* name, BOOL is_attribute) :
+LLXMLNode::LLXMLNode(LLStringTableEntry* name, bool is_attribute) :
mID(""),
mParser(NULL),
mIsAttribute(is_attribute),
@@ -193,17 +193,17 @@ LLXMLNode::~LLXMLNode()
mDefault = NULL;
}
-BOOL LLXMLNode::isNull()
+bool LLXMLNode::isNull()
{
return (mName == NULL);
}
// protected
-BOOL LLXMLNode::removeChild(LLXMLNode *target_child)
+bool LLXMLNode::removeChild(LLXMLNode *target_child)
{
if (!target_child)
{
- return FALSE;
+ return false;
}
if (target_child->mIsAttribute)
{
@@ -212,7 +212,7 @@ BOOL LLXMLNode::removeChild(LLXMLNode *target_child)
{
target_child->mParent = NULL;
mAttributes.erase(children_itr);
- return TRUE;
+ return true;
}
}
else if (mChildren.notNull())
@@ -244,7 +244,7 @@ BOOL LLXMLNode::removeChild(LLXMLNode *target_child)
{
mChildren = NULL;
}
- return TRUE;
+ return true;
}
else if (children_itr->first != target_child->mName)
{
@@ -256,7 +256,7 @@ BOOL LLXMLNode::removeChild(LLXMLNode *target_child)
}
}
}
- return FALSE;
+ return false;
}
void LLXMLNode::addChild(LLXMLNodePtr& new_child)
@@ -302,13 +302,13 @@ void LLXMLNode::addChild(LLXMLNodePtr& new_child)
}
// virtual
-LLXMLNodePtr LLXMLNode::createChild(const char* name, BOOL is_attribute)
+LLXMLNodePtr LLXMLNode::createChild(const char* name, bool is_attribute)
{
return createChild(gStringTable.addStringEntry(name), is_attribute);
}
// virtual
-LLXMLNodePtr LLXMLNode::createChild(LLStringTableEntry* name, BOOL is_attribute)
+LLXMLNodePtr LLXMLNode::createChild(LLStringTableEntry* name, bool is_attribute)
{
LLXMLNodePtr ret(new LLXMLNode(name, is_attribute));
ret->mID.clear();
@@ -317,13 +317,13 @@ LLXMLNodePtr LLXMLNode::createChild(LLStringTableEntry* name, BOOL is_attribute)
return ret;
}
-BOOL LLXMLNode::deleteChild(LLXMLNode *child)
+bool LLXMLNode::deleteChild(LLXMLNode *child)
{
if (removeChild(child))
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLXMLNode::setParent(LLXMLNodePtr& new_parent)
@@ -375,7 +375,7 @@ void XMLCALL StartXMLNode(void *userData,
const XML_Char **atts)
{
// Create a new node
- LLXMLNode *new_node_ptr = new LLXMLNode(name, FALSE);
+ LLXMLNode *new_node_ptr = new LLXMLNode(name, false);
LLXMLNodePtr new_node = new_node_ptr;
new_node->mID.clear();
@@ -480,9 +480,9 @@ void XMLCALL StartXMLNode(void *userData,
// only one attribute child per description
LLXMLNodePtr attr_node;
- if (!new_node->getAttribute(attr_name.c_str(), attr_node, FALSE))
+ if (!new_node->getAttribute(attr_name.c_str(), attr_node, false))
{
- attr_node = new LLXMLNode(attr_name.c_str(), TRUE);
+ attr_node = new LLXMLNode(attr_name.c_str(), true);
attr_node->setLineNumber(XML_GetCurrentLineNumber(*new_node_ptr->mParser));
}
attr_node->setValue(attr_value);
@@ -508,13 +508,13 @@ void XMLCALL EndXMLNode(void *userData,
if (LLXMLNode::sStripWhitespaceValues)
{
std::string value = node->getValue();
- BOOL is_empty = TRUE;
+ bool is_empty = true;
for (std::string::size_type s = 0; s < value.length(); s++)
{
char c = value[s];
if (c != ' ' && c != '\t' && c != '\n')
{
- is_empty = FALSE;
+ is_empty = false;
break;
}
}
@@ -575,7 +575,7 @@ bool LLXMLNode::updateNode(
if (!node || !update_node)
{
LL_WARNS() << "Node invalid" << LL_ENDL;
- return FALSE;
+ return false;
}
//update the node value
@@ -647,7 +647,7 @@ bool LLXMLNode::updateNode(
}
}
- return TRUE;
+ return true;
}
// static
@@ -694,7 +694,7 @@ bool LLXMLNode::parseBuffer(
XML_SetCharacterDataHandler(my_parser, XMLData);
// Create a root node
- LLXMLNode *file_node_ptr = new LLXMLNode("XML", FALSE);
+ LLXMLNode *file_node_ptr = new LLXMLNode("XML", false);
LLXMLNodePtr file_node = file_node_ptr;
file_node->mParser = &my_parser;
@@ -702,7 +702,7 @@ bool LLXMLNode::parseBuffer(
XML_SetUserData(my_parser, (void *)file_node_ptr);
// Do the parsing
- if (XML_Parse(my_parser, (const char *)buffer, length, TRUE) != XML_STATUS_OK)
+ if (XML_Parse(my_parser, (const char *)buffer, length, true) != XML_STATUS_OK)
{
#ifdef LL_RELEASE_WITH_DEBUG_INFO
LL_ERRS() << "";
@@ -749,7 +749,7 @@ bool LLXMLNode::parseStream(
XML_SetCharacterDataHandler(my_parser, XMLData);
// Create a root node
- LLXMLNode *file_node_ptr = new LLXMLNode("XML", FALSE);
+ LLXMLNode *file_node_ptr = new LLXMLNode("XML", false);
LLXMLNodePtr file_node = file_node_ptr;
file_node->mParser = &my_parser;
@@ -806,18 +806,18 @@ bool LLXMLNode::parseStream(
}
-BOOL LLXMLNode::isFullyDefault()
+bool LLXMLNode::isFullyDefault()
{
if (mDefault.isNull())
{
- return FALSE;
+ return false;
}
- BOOL has_default_value = (mValue == mDefault->mValue);
- BOOL has_default_attribute = (mIsAttribute == mDefault->mIsAttribute);
- BOOL has_default_type = mIsAttribute || (mType == mDefault->mType);
- BOOL has_default_encoding = mIsAttribute || (mEncoding == mDefault->mEncoding);
- BOOL has_default_precision = mIsAttribute || (mPrecision == mDefault->mPrecision);
- BOOL has_default_length = mIsAttribute || (mLength == mDefault->mLength);
+ bool has_default_value = (mValue == mDefault->mValue);
+ bool has_default_attribute = (mIsAttribute == mDefault->mIsAttribute);
+ bool has_default_type = mIsAttribute || (mType == mDefault->mType);
+ bool has_default_encoding = mIsAttribute || (mEncoding == mDefault->mEncoding);
+ bool has_default_precision = mIsAttribute || (mPrecision == mDefault->mPrecision);
+ bool has_default_length = mIsAttribute || (mLength == mDefault->mLength);
if (has_default_value
&& has_default_type
@@ -835,14 +835,14 @@ BOOL LLXMLNode::isFullyDefault()
LLXMLNodePtr child = (*children_itr).second;
if (!child->isFullyDefault())
{
- return FALSE;
+ return false;
}
}
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// static
@@ -930,10 +930,10 @@ void LLXMLNode::writeToOstream(std::ostream& output_stream, const std::string& i
return;
}
- BOOL has_default_type = mDefault.isNull()?FALSE:(mType == mDefault->mType);
- BOOL has_default_encoding = mDefault.isNull()?FALSE:(mEncoding == mDefault->mEncoding);
- BOOL has_default_precision = mDefault.isNull()?FALSE:(mPrecision == mDefault->mPrecision);
- BOOL has_default_length = mDefault.isNull()?FALSE:(mLength == mDefault->mLength);
+ bool has_default_type = mDefault.isNull()?false:(mType == mDefault->mType);
+ bool has_default_encoding = mDefault.isNull()?false:(mEncoding == mDefault->mEncoding);
+ bool has_default_precision = mDefault.isNull()?false:(mPrecision == mDefault->mPrecision);
+ bool has_default_length = mDefault.isNull()?false:(mLength == mDefault->mLength);
// stream the name
output_stream << indent << "<" << mName->mString << "\n";
@@ -1175,12 +1175,12 @@ void LLXMLNode::scrubToTree(LLXMLNode *tree)
}
}
-bool LLXMLNode::getChild(const char* name, LLXMLNodePtr& node, BOOL use_default_if_missing)
+bool LLXMLNode::getChild(const char* name, LLXMLNodePtr& node, bool use_default_if_missing)
{
return getChild(gStringTable.checkStringEntry(name), node, use_default_if_missing);
}
-bool LLXMLNode::getChild(const LLStringTableEntry* name, LLXMLNodePtr& node, BOOL use_default_if_missing)
+bool LLXMLNode::getChild(const LLStringTableEntry* name, LLXMLNodePtr& node, bool use_default_if_missing)
{
if (mChildren.notNull())
{
@@ -1193,18 +1193,18 @@ bool LLXMLNode::getChild(const LLStringTableEntry* name, LLXMLNodePtr& node, BOO
}
if (use_default_if_missing && !mDefault.isNull())
{
- return mDefault->getChild(name, node, FALSE);
+ return mDefault->getChild(name, node, false);
}
node = NULL;
return false;
}
-void LLXMLNode::getChildren(const char* name, LLXMLNodeList &children, BOOL use_default_if_missing) const
+void LLXMLNode::getChildren(const char* name, LLXMLNodeList &children, bool use_default_if_missing) const
{
getChildren(gStringTable.checkStringEntry(name), children, use_default_if_missing);
}
-void LLXMLNode::getChildren(const LLStringTableEntry* name, LLXMLNodeList &children, BOOL use_default_if_missing) const
+void LLXMLNode::getChildren(const LLStringTableEntry* name, LLXMLNodeList &children, bool use_default_if_missing) const
{
if (mChildren.notNull())
{
@@ -1226,7 +1226,7 @@ void LLXMLNode::getChildren(const LLStringTableEntry* name, LLXMLNodeList &child
}
if (children.size() == 0 && use_default_if_missing && !mDefault.isNull())
{
- mDefault->getChildren(name, children, FALSE);
+ mDefault->getChildren(name, children, false);
}
}
@@ -1249,12 +1249,12 @@ void LLXMLNode::getDescendants(const LLStringTableEntry* name, LLXMLNodeList &ch
}
}
-bool LLXMLNode::getAttribute(const char* name, LLXMLNodePtr& node, BOOL use_default_if_missing)
+bool LLXMLNode::getAttribute(const char* name, LLXMLNodePtr& node, bool use_default_if_missing)
{
return getAttribute(gStringTable.checkStringEntry(name), node, use_default_if_missing);
}
-bool LLXMLNode::getAttribute(const LLStringTableEntry* name, LLXMLNodePtr& node, BOOL use_default_if_missing)
+bool LLXMLNode::getAttribute(const LLStringTableEntry* name, LLXMLNodePtr& node, bool use_default_if_missing)
{
LLXMLAttribList::const_iterator child_itr = mAttributes.find(name);
if (child_itr != mAttributes.end())
@@ -1264,7 +1264,7 @@ bool LLXMLNode::getAttribute(const LLStringTableEntry* name, LLXMLNodePtr& node,
}
if (use_default_if_missing && !mDefault.isNull())
{
- return mDefault->getAttribute(name, node, FALSE);
+ return mDefault->getAttribute(name, node, false);
}
return false;
@@ -1283,42 +1283,25 @@ bool LLXMLNode::setAttributeString(const char* attr, const std::string& value)
return false;
}
-BOOL LLXMLNode::hasAttribute(const char* name )
+bool LLXMLNode::hasAttribute(const char* name )
{
LLXMLNodePtr node;
return getAttribute(name, node);
}
-// the structure of these getAttribute_ functions is ugly, but it's because the
-// underlying system is based on BOOL and LLString; if we change
-// so that they're based on more generic mechanisms, these will be
-// simplified.
-bool LLXMLNode::getAttribute_bool(const char* name, bool& value )
-{
- LLXMLNodePtr node;
- if (!getAttribute(name, node))
- {
- return false;
- }
- BOOL temp;
- bool retval = node->getBoolValue(1, &temp);
- value = temp;
- return retval;
-}
-
-BOOL LLXMLNode::getAttributeBOOL(const char* name, BOOL& value )
+bool LLXMLNode::getAttributeBOOL(const char* name, bool& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getBoolValue(1, &value));
}
-BOOL LLXMLNode::getAttributeU8(const char* name, U8& value )
+bool LLXMLNode::getAttributeU8(const char* name, U8& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getByteValue(1, &value));
}
-BOOL LLXMLNode::getAttributeS8(const char* name, S8& value )
+bool LLXMLNode::getAttributeS8(const char* name, S8& value )
{
LLXMLNodePtr node;
S32 val;
@@ -1330,7 +1313,7 @@ BOOL LLXMLNode::getAttributeS8(const char* name, S8& value )
return true;
}
-BOOL LLXMLNode::getAttributeU16(const char* name, U16& value )
+bool LLXMLNode::getAttributeU16(const char* name, U16& value )
{
LLXMLNodePtr node;
U32 val;
@@ -1342,7 +1325,7 @@ BOOL LLXMLNode::getAttributeU16(const char* name, U16& value )
return true;
}
-BOOL LLXMLNode::getAttributeS16(const char* name, S16& value )
+bool LLXMLNode::getAttributeS16(const char* name, S16& value )
{
LLXMLNodePtr node;
S32 val;
@@ -1354,73 +1337,73 @@ BOOL LLXMLNode::getAttributeS16(const char* name, S16& value )
return true;
}
-BOOL LLXMLNode::getAttributeU32(const char* name, U32& value )
+bool LLXMLNode::getAttributeU32(const char* name, U32& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getUnsignedValue(1, &value));
}
-BOOL LLXMLNode::getAttributeS32(const char* name, S32& value )
+bool LLXMLNode::getAttributeS32(const char* name, S32& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getIntValue(1, &value));
}
-BOOL LLXMLNode::getAttributeF32(const char* name, F32& value )
+bool LLXMLNode::getAttributeF32(const char* name, F32& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getFloatValue(1, &value));
}
-BOOL LLXMLNode::getAttributeF64(const char* name, F64& value )
+bool LLXMLNode::getAttributeF64(const char* name, F64& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getDoubleValue(1, &value));
}
-BOOL LLXMLNode::getAttributeColor(const char* name, LLColor4& value )
+bool LLXMLNode::getAttributeColor(const char* name, LLColor4& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getFloatValue(4, value.mV));
}
-BOOL LLXMLNode::getAttributeColor4(const char* name, LLColor4& value )
+bool LLXMLNode::getAttributeColor4(const char* name, LLColor4& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getFloatValue(4, value.mV));
}
-BOOL LLXMLNode::getAttributeColor4U(const char* name, LLColor4U& value )
+bool LLXMLNode::getAttributeColor4U(const char* name, LLColor4U& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getByteValue(4, value.mV));
}
-BOOL LLXMLNode::getAttributeVector3(const char* name, LLVector3& value )
+bool LLXMLNode::getAttributeVector3(const char* name, LLVector3& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getFloatValue(3, value.mV));
}
-BOOL LLXMLNode::getAttributeVector3d(const char* name, LLVector3d& value )
+bool LLXMLNode::getAttributeVector3d(const char* name, LLVector3d& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getDoubleValue(3, value.mdV));
}
-BOOL LLXMLNode::getAttributeQuat(const char* name, LLQuaternion& value )
+bool LLXMLNode::getAttributeQuat(const char* name, LLQuaternion& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getFloatValue(4, value.mQ));
}
-BOOL LLXMLNode::getAttributeUUID(const char* name, LLUUID& value )
+bool LLXMLNode::getAttributeUUID(const char* name, LLUUID& value )
{
LLXMLNodePtr node;
return (getAttribute(name, node) && node->getUUIDValue(1, &value));
}
-BOOL LLXMLNode::getAttributeString(const char* name, std::string& value )
+bool LLXMLNode::getAttributeString(const char* name, std::string& value )
{
LLXMLNodePtr node;
if (!getAttribute(name, node))
@@ -1457,10 +1440,10 @@ const char *LLXMLNode::skipNonWhitespace(const char *str)
}
/*static */
-const char *LLXMLNode::parseInteger(const char *str, U64 *dest, BOOL *is_negative, U32 precision, Encoding encoding)
+const char *LLXMLNode::parseInteger(const char *str, U64 *dest, bool *is_negative, U32 precision, Encoding encoding)
{
*dest = 0;
- *is_negative = FALSE;
+ *is_negative = false;
str = skipWhitespace(str);
@@ -1474,7 +1457,7 @@ const char *LLXMLNode::parseInteger(const char *str, U64 *dest, BOOL *is_negativ
}
if (str[0] == '-')
{
- *is_negative = TRUE;
+ *is_negative = true;
++str;
}
@@ -1687,7 +1670,7 @@ const char *LLXMLNode::parseFloat(const char *str, F64 *dest, U32 precision, Enc
// Scientific notation!
++str;
U64 exp;
- BOOL is_negative;
+ bool is_negative;
str = parseInteger(str, &exp, &is_negative, 64, ENCODING_DECIMAL);
if (str == NULL)
{
@@ -1711,7 +1694,7 @@ const char *LLXMLNode::parseFloat(const char *str, F64 *dest, U32 precision, Enc
if (encoding == ENCODING_HEX)
{
U64 bytes_dest;
- BOOL is_negative;
+ bool is_negative;
str = parseInteger(str, (U64 *)&bytes_dest, &is_negative, precision, ENCODING_HEX);
// Upcast to F64
switch (precision)
@@ -1734,7 +1717,7 @@ const char *LLXMLNode::parseFloat(const char *str, F64 *dest, U32 precision, Enc
return NULL;
}
-U32 LLXMLNode::getBoolValue(U32 expected_length, BOOL *array)
+U32 LLXMLNode::getBoolValue(U32 expected_length, bool *array)
{
llassert(array);
@@ -1754,11 +1737,11 @@ U32 LLXMLNode::getBoolValue(U32 expected_length, BOOL *array)
LLStringUtil::toLower(str_array[i]);
if (str_array[i] == "false")
{
- array[ret_length++] = FALSE;
+ array[ret_length++] = false;
}
else if (str_array[i] == "true")
{
- array[ret_length++] = TRUE;
+ array[ret_length++] = true;
}
}
@@ -1804,7 +1787,7 @@ U32 LLXMLNode::getByteValue(U32 expected_length, U8 *array, Encoding encoding)
for (i=0; i 0 ? TRUE : FALSE;
+ return removed_count > 0;
}
-BOOL LLXMLNode::deleteChildren(LLStringTableEntry* name)
+bool LLXMLNode::deleteChildren(LLStringTableEntry* name)
{
U32 removed_count = 0;
LLXMLNodeList node_list;
@@ -2699,7 +2682,7 @@ BOOL LLXMLNode::deleteChildren(LLStringTableEntry* name)
}
}
}
- return removed_count > 0 ? TRUE : FALSE;
+ return removed_count > 0;
}
void LLXMLNode::setAttributes(LLXMLNode::ValueType type, U32 precision, LLXMLNode::Encoding encoding, U32 length)
@@ -2822,7 +2805,7 @@ void LLXMLNode::createUnitTest(S32 max_num_children)
child_name.append(1, c);
}
- LLXMLNode *new_child = createChild(child_name.c_str(), FALSE);
+ LLXMLNode *new_child = createChild(child_name.c_str(), false);
// Random ID
std::string child_id;
@@ -2849,7 +2832,7 @@ void LLXMLNode::createUnitTest(S32 max_num_children)
break;
case 1: // TYPE_BOOLEAN
{
- BOOL random_bool_values[30];
+ bool random_bool_values[30];
for (U32 value=0; valuesetUnsignedValue(1, &integer_checksum, LLXMLNode::ENCODING_HEX);
- createChild("long_checksum", TRUE)->setLongValue(1, &long_checksum, LLXMLNode::ENCODING_HEX);
- createChild("bool_true_count", TRUE)->setUnsignedValue(1, &bool_true_count, LLXMLNode::ENCODING_HEX);
- createChild("uuid_checksum", TRUE)->setUUIDValue(1, &uuid_checksum);
- createChild("noderef_checksum", TRUE)->setUnsignedValue(1, &noderef_checksum, LLXMLNode::ENCODING_HEX);
- createChild("float_checksum", TRUE)->setUnsignedValue(1, &float_checksum, LLXMLNode::ENCODING_HEX);
+ createChild("integer_checksum", true)->setUnsignedValue(1, &integer_checksum, LLXMLNode::ENCODING_HEX);
+ createChild("long_checksum", true)->setLongValue(1, &long_checksum, LLXMLNode::ENCODING_HEX);
+ createChild("bool_true_count", true)->setUnsignedValue(1, &bool_true_count, LLXMLNode::ENCODING_HEX);
+ createChild("uuid_checksum", true)->setUUIDValue(1, &uuid_checksum);
+ createChild("noderef_checksum", true)->setUnsignedValue(1, &noderef_checksum, LLXMLNode::ENCODING_HEX);
+ createChild("float_checksum", true)->setUnsignedValue(1, &float_checksum, LLXMLNode::ENCODING_HEX);
}
-BOOL LLXMLNode::performUnitTest(std::string &error_buffer)
+bool LLXMLNode::performUnitTest(std::string &error_buffer)
{
if (mChildren.isNull())
{
error_buffer.append(llformat("ERROR Node %s: No children found.\n", mName->mString));
- return FALSE;
+ return false;
}
// Checksums
@@ -2994,14 +2977,14 @@ BOOL LLXMLNode::performUnitTest(std::string &error_buffer)
if (!node->performUnitTest(error_buffer))
{
error_buffer.append(llformat("Child test failed for %s.\n", mName->mString));
- //return FALSE;
+ //return false;
}
continue;
}
if (node->mLength < 1 || node->mLength > 30)
{
error_buffer.append(llformat("ERROR Node %s: Invalid array length %d, child %s.\n", mName->mString, node->mLength, node->mName->mString));
- return FALSE;
+ return false;
}
switch (node->mType)
{
@@ -3010,11 +2993,11 @@ BOOL LLXMLNode::performUnitTest(std::string &error_buffer)
break;
case TYPE_BOOLEAN:
{
- BOOL bool_array[30];
+ bool bool_array[30];
if (node->getBoolValue(node->mLength, bool_array) < node->mLength)
{
error_buffer.append(llformat("ERROR Node %s: Could not read boolean array, child %s.\n", mName->mString, node->mName->mString));
- return FALSE;
+ return false;
}
for (U32 pos=0; pos<(U32)node->mLength; ++pos)
{
@@ -3033,7 +3016,7 @@ BOOL LLXMLNode::performUnitTest(std::string &error_buffer)
if (node->getUnsignedValue(node->mLength, integer_array, node->mEncoding) < node->mLength)
{
error_buffer.append(llformat("ERROR Node %s: Could not read integer array, child %s.\n", mName->mString, node->mName->mString));
- return FALSE;
+ return false;
}
for (U32 pos=0; pos<(U32)node->mLength; ++pos)
{
@@ -3046,7 +3029,7 @@ BOOL LLXMLNode::performUnitTest(std::string &error_buffer)
if (node->getLongValue(node->mLength, integer_array, node->mEncoding) < node->mLength)
{
error_buffer.append(llformat("ERROR Node %s: Could not read long integer array, child %s.\n", mName->mString, node->mName->mString));
- return FALSE;
+ return false;
}
for (U32 pos=0; pos<(U32)node->mLength; ++pos)
{
@@ -3063,7 +3046,7 @@ BOOL LLXMLNode::performUnitTest(std::string &error_buffer)
if (node->getFloatValue(node->mLength, float_array, node->mEncoding) < node->mLength)
{
error_buffer.append(llformat("ERROR Node %s: Could not read float array, child %s.\n", mName->mString, node->mName->mString));
- return FALSE;
+ return false;
}
for (U32 pos=0; pos<(U32)node->mLength; ++pos)
{
@@ -3077,7 +3060,7 @@ BOOL LLXMLNode::performUnitTest(std::string &error_buffer)
if (node->getDoubleValue(node->mLength, float_array, node->mEncoding) < node->mLength)
{
error_buffer.append(llformat("ERROR Node %s: Could not read float array, child %s.\n", mName->mString, node->mName->mString));
- return FALSE;
+ return false;
}
for (U32 pos=0; pos<(U32)node->mLength; ++pos)
{
@@ -3095,7 +3078,7 @@ BOOL LLXMLNode::performUnitTest(std::string &error_buffer)
if (node->getUUIDValue(node->mLength, uuid_array) < node->mLength)
{
error_buffer.append(llformat("ERROR Node %s: Could not read uuid array, child %s.\n", mName->mString, node->mName->mString));
- return FALSE;
+ return false;
}
for (U32 pos=0; pos<(U32)node->mLength; ++pos)
{
@@ -3112,7 +3095,7 @@ BOOL LLXMLNode::performUnitTest(std::string &error_buffer)
if (node->getNodeRefValue(node->mLength, node_array) < node->mLength)
{
error_buffer.append(llformat("ERROR Node %s: Could not read node ref array, child %s.\n", mName->mString, node->mName->mString));
- return FALSE;
+ return false;
}
for (U32 pos=0; posmLength; ++pos)
{
@@ -3133,97 +3116,97 @@ BOOL LLXMLNode::performUnitTest(std::string &error_buffer)
// Compare checksums
{
U32 node_integer_checksum = 0;
- if (!getAttribute("integer_checksum", checksum_node, FALSE) ||
+ if (!getAttribute("integer_checksum", checksum_node, false) ||
checksum_node->getUnsignedValue(1, &node_integer_checksum, ENCODING_HEX) != 1)
{
error_buffer.append(llformat("ERROR Node %s: Integer checksum missing.\n", mName->mString));
- return FALSE;
+ return false;
}
if (node_integer_checksum != integer_checksum)
{
error_buffer.append(llformat("ERROR Node %s: Integer checksum mismatch: read %X / calc %X.\n", mName->mString, node_integer_checksum, integer_checksum));
- return FALSE;
+ return false;
}
}
{
U64 node_long_checksum = 0;
- if (!getAttribute("long_checksum", checksum_node, FALSE) ||
+ if (!getAttribute("long_checksum", checksum_node, false) ||
checksum_node->getLongValue(1, &node_long_checksum, ENCODING_HEX) != 1)
{
error_buffer.append(llformat("ERROR Node %s: Long Integer checksum missing.\n", mName->mString));
- return FALSE;
+ return false;
}
if (node_long_checksum != long_checksum)
{
U32 *pp1 = (U32 *)&node_long_checksum;
U32 *pp2 = (U32 *)&long_checksum;
error_buffer.append(llformat("ERROR Node %s: Long Integer checksum mismatch: read %08X%08X / calc %08X%08X.\n", mName->mString, pp1[1], pp1[0], pp2[1], pp2[0]));
- return FALSE;
+ return false;
}
}
{
U32 node_bool_true_count = 0;
- if (!getAttribute("bool_true_count", checksum_node, FALSE) ||
+ if (!getAttribute("bool_true_count", checksum_node, false) ||
checksum_node->getUnsignedValue(1, &node_bool_true_count, ENCODING_HEX) != 1)
{
error_buffer.append(llformat("ERROR Node %s: Boolean checksum missing.\n", mName->mString));
- return FALSE;
+ return false;
}
if (node_bool_true_count != bool_true_count)
{
error_buffer.append(llformat("ERROR Node %s: Boolean checksum mismatch: read %X / calc %X.\n", mName->mString, node_bool_true_count, bool_true_count));
- return FALSE;
+ return false;
}
}
{
LLUUID node_uuid_checksum;
- if (!getAttribute("uuid_checksum", checksum_node, FALSE) ||
+ if (!getAttribute("uuid_checksum", checksum_node, false) ||
checksum_node->getUUIDValue(1, &node_uuid_checksum) != 1)
{
error_buffer.append(llformat("ERROR Node %s: UUID checksum missing.\n", mName->mString));
- return FALSE;
+ return false;
}
if (node_uuid_checksum != uuid_checksum)
{
error_buffer.append(llformat("ERROR Node %s: UUID checksum mismatch: read %s / calc %s.\n", mName->mString, node_uuid_checksum.asString().c_str(), uuid_checksum.asString().c_str()));
- return FALSE;
+ return false;
}
}
{
U32 node_noderef_checksum = 0;
- if (!getAttribute("noderef_checksum", checksum_node, FALSE) ||
+ if (!getAttribute("noderef_checksum", checksum_node, false) ||
checksum_node->getUnsignedValue(1, &node_noderef_checksum, ENCODING_HEX) != 1)
{
error_buffer.append(llformat("ERROR Node %s: Node Ref checksum missing.\n", mName->mString));
- return FALSE;
+ return false;
}
if (node_noderef_checksum != noderef_checksum)
{
error_buffer.append(llformat("ERROR Node %s: Node Ref checksum mismatch: read %X / calc %X.\n", mName->mString, node_noderef_checksum, noderef_checksum));
- return FALSE;
+ return false;
}
}
{
U32 node_float_checksum = 0;
- if (!getAttribute("float_checksum", checksum_node, FALSE) ||
+ if (!getAttribute("float_checksum", checksum_node, false) ||
checksum_node->getUnsignedValue(1, &node_float_checksum, ENCODING_HEX) != 1)
{
error_buffer.append(llformat("ERROR Node %s: Float checksum missing.\n", mName->mString));
- return FALSE;
+ return false;
}
if (node_float_checksum != float_checksum)
{
error_buffer.append(llformat("ERROR Node %s: Float checksum mismatch: read %X / calc %X.\n", mName->mString, node_float_checksum, float_checksum));
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
LLXMLNodePtr LLXMLNode::getFirstChild() const
diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h
index 0b8da5dc5d..21a7dee4cc 100644
--- a/indra/llxml/llxmlnode.h
+++ b/indra/llxml/llxmlnode.h
@@ -57,9 +57,9 @@ struct CompareAttributes
bool operator()(const LLStringTableEntry* const lhs, const LLStringTableEntry* const rhs) const
{
if (lhs == NULL)
- return TRUE;
+ return true;
if (rhs == NULL)
- return FALSE;
+ return true;
return strcmp(lhs->mString, rhs->mString) < 0;
}
@@ -118,14 +118,14 @@ protected:
public:
LLXMLNode();
- LLXMLNode(const char* name, BOOL is_attribute);
- LLXMLNode(LLStringTableEntry* name, BOOL is_attribute);
+ LLXMLNode(const char* name, bool is_attribute);
+ LLXMLNode(LLStringTableEntry* name, bool is_attribute);
LLXMLNode(const LLXMLNode& rhs);
LLXMLNodePtr deepCopy();
- BOOL isNull();
+ bool isNull();
- BOOL deleteChild(LLXMLNode* child);
+ bool deleteChild(LLXMLNode* child);
void addChild(LLXMLNodePtr& new_child);
void setParent(LLXMLNodePtr& new_parent); // reparent if necessary
@@ -165,12 +165,12 @@ public:
void findID(const std::string& id, LLXMLNodeList &results);
- virtual LLXMLNodePtr createChild(const char* name, BOOL is_attribute);
- virtual LLXMLNodePtr createChild(LLStringTableEntry* name, BOOL is_attribute);
+ virtual LLXMLNodePtr createChild(const char* name, bool is_attribute);
+ virtual LLXMLNodePtr createChild(LLStringTableEntry* name, bool is_attribute);
// Getters
- U32 getBoolValue(U32 expected_length, BOOL *array);
+ U32 getBoolValue(U32 expected_length, bool *array);
U32 getByteValue(U32 expected_length, U8 *array, Encoding encoding = ENCODING_DEFAULT);
U32 getIntValue(U32 expected_length, S32 *array, Encoding encoding = ENCODING_DEFAULT);
U32 getUnsignedValue(U32 expected_length, U32 *array, Encoding encoding = ENCODING_DEFAULT);
@@ -181,29 +181,25 @@ public:
U32 getUUIDValue(U32 expected_length, LLUUID *array);
U32 getNodeRefValue(U32 expected_length, LLXMLNode **array);
- BOOL hasAttribute(const char* name );
+ bool hasAttribute(const char* name );
- // these are designed to be more generic versions of the functions
- // rather than relying on LL-types
- bool getAttribute_bool(const char* name, bool& value );
-
- BOOL getAttributeBOOL(const char* name, BOOL& value );
- BOOL getAttributeU8(const char* name, U8& value );
- BOOL getAttributeS8(const char* name, S8& value );
- BOOL getAttributeU16(const char* name, U16& value );
- BOOL getAttributeS16(const char* name, S16& value );
- BOOL getAttributeU32(const char* name, U32& value );
- BOOL getAttributeS32(const char* name, S32& value );
- BOOL getAttributeF32(const char* name, F32& value );
- BOOL getAttributeF64(const char* name, F64& value );
- BOOL getAttributeColor(const char* name, LLColor4& value );
- BOOL getAttributeColor4(const char* name, LLColor4& value );
- BOOL getAttributeColor4U(const char* name, LLColor4U& value );
- BOOL getAttributeVector3(const char* name, LLVector3& value );
- BOOL getAttributeVector3d(const char* name, LLVector3d& value );
- BOOL getAttributeQuat(const char* name, LLQuaternion& value );
- BOOL getAttributeUUID(const char* name, LLUUID& value );
- BOOL getAttributeString(const char* name, std::string& value );
+ bool getAttributeBOOL(const char* name, bool& value );
+ bool getAttributeU8(const char* name, U8& value );
+ bool getAttributeS8(const char* name, S8& value );
+ bool getAttributeU16(const char* name, U16& value );
+ bool getAttributeS16(const char* name, S16& value );
+ bool getAttributeU32(const char* name, U32& value );
+ bool getAttributeS32(const char* name, S32& value );
+ bool getAttributeF32(const char* name, F32& value );
+ bool getAttributeF64(const char* name, F64& value );
+ bool getAttributeColor(const char* name, LLColor4& value );
+ bool getAttributeColor4(const char* name, LLColor4& value );
+ bool getAttributeColor4U(const char* name, LLColor4U& value );
+ bool getAttributeVector3(const char* name, LLVector3& value );
+ bool getAttributeVector3d(const char* name, LLVector3d& value );
+ bool getAttributeQuat(const char* name, LLQuaternion& value );
+ bool getAttributeUUID(const char* name, LLUUID& value );
+ bool getAttributeString(const char* name, std::string& value );
const ValueType& getType() const { return mType; }
U32 getLength() const { return mLength; }
@@ -212,23 +208,23 @@ public:
std::string getSanitizedValue() const;
std::string getTextContents() const;
const LLStringTableEntry* getName() const { return mName; }
- BOOL hasName(const char* name) const { return mName == gStringTable.checkStringEntry(name); }
- BOOL hasName(const std::string& name) const { return mName == gStringTable.checkStringEntry(name.c_str()); }
+ bool hasName(const char* name) const { return mName == gStringTable.checkStringEntry(name); }
+ bool hasName(const std::string& name) const { return mName == gStringTable.checkStringEntry(name.c_str()); }
const std::string& getID() const { return mID; }
U32 getChildCount() const;
// getChild returns a Null LLXMLNode (not a NULL pointer) if there is no such child.
// This child has no value so any getTYPEValue() calls on it will return 0.
- bool getChild(const char* name, LLXMLNodePtr& node, BOOL use_default_if_missing = TRUE);
- bool getChild(const LLStringTableEntry* name, LLXMLNodePtr& node, BOOL use_default_if_missing = TRUE);
- void getChildren(const char* name, LLXMLNodeList &children, BOOL use_default_if_missing = TRUE) const;
- void getChildren(const LLStringTableEntry* name, LLXMLNodeList &children, BOOL use_default_if_missing = TRUE) const;
+ bool getChild(const char* name, LLXMLNodePtr& node, bool use_default_if_missing = true);
+ bool getChild(const LLStringTableEntry* name, LLXMLNodePtr& node, bool use_default_if_missing = true);
+ void getChildren(const char* name, LLXMLNodeList &children, bool use_default_if_missing = true) const;
+ void getChildren(const LLStringTableEntry* name, LLXMLNodeList &children, bool use_default_if_missing = true) const;
// recursively finds all children at any level matching name
void getDescendants(const LLStringTableEntry* name, LLXMLNodeList &children) const;
- bool getAttribute(const char* name, LLXMLNodePtr& node, BOOL use_default_if_missing = TRUE);
- bool getAttribute(const LLStringTableEntry* name, LLXMLNodePtr& node, BOOL use_default_if_missing = TRUE);
+ bool getAttribute(const char* name, LLXMLNodePtr& node, bool use_default_if_missing = true);
+ bool getAttribute(const LLStringTableEntry* name, LLXMLNodePtr& node, bool use_default_if_missing = true);
S32 getLineNumber();
@@ -242,7 +238,7 @@ public:
bool setAttributeString(const char* attr, const std::string& value);
- void setBoolValue(const BOOL value) { setBoolValue(1, &value); }
+ void setBoolValue(const bool value) { setBoolValue(1, &value); }
void setByteValue(const U8 value, Encoding encoding = ENCODING_DEFAULT) { setByteValue(1, &value, encoding); }
void setIntValue(const S32 value, Encoding encoding = ENCODING_DEFAULT) { setIntValue(1, &value, encoding); }
void setUnsignedValue(const U32 value, Encoding encoding = ENCODING_DEFAULT) { setUnsignedValue(1, &value, encoding); }
@@ -253,7 +249,7 @@ public:
void setUUIDValue(const LLUUID value) { setUUIDValue(1, &value); }
void setNodeRefValue(const LLXMLNode *value) { setNodeRefValue(1, &value); }
- void setBoolValue(U32 length, const BOOL *array);
+ void setBoolValue(U32 length, const bool *array);
void setByteValue(U32 length, const U8 *array, Encoding encoding = ENCODING_DEFAULT);
void setIntValue(U32 length, const S32 *array, Encoding encoding = ENCODING_DEFAULT);
void setUnsignedValue(U32 length, const U32* array, Encoding encoding = ENCODING_DEFAULT);
@@ -283,17 +279,17 @@ public:
// Delete any child nodes that aren't among the tree's children, recursive
void scrubToTree(LLXMLNode *tree);
- BOOL deleteChildren(const std::string& name);
- BOOL deleteChildren(LLStringTableEntry* name);
+ bool deleteChildren(const std::string& name);
+ bool deleteChildren(LLStringTableEntry* name);
void setAttributes(ValueType type, U32 precision, Encoding encoding, U32 length);
// void appendValue(const std::string& value); // Unused
// Unit Testing
void createUnitTest(S32 max_num_children);
- BOOL performUnitTest(std::string &error_buffer);
+ bool performUnitTest(std::string &error_buffer);
protected:
- BOOL removeChild(LLXMLNode* child);
+ bool removeChild(LLXMLNode* child);
public:
std::string mID; // The ID attribute of this node
@@ -315,8 +311,8 @@ public:
LLXMLNodePtr mPrev; // Double-linked list previous node
LLXMLNodePtr mNext; // Double-linked list next node
- static BOOL sStripEscapedStrings;
- static BOOL sStripWhitespaceValues;
+ static bool sStripEscapedStrings;
+ static bool sStripWhitespaceValues;
protected:
LLStringTableEntry *mName; // The name of this node
@@ -330,10 +326,10 @@ protected:
static const char *skipWhitespace(const char *str);
static const char *skipNonWhitespace(const char *str);
- static const char *parseInteger(const char *str, U64 *dest, BOOL *is_negative, U32 precision, Encoding encoding);
+ static const char *parseInteger(const char *str, U64 *dest, bool *is_negative, U32 precision, Encoding encoding);
static const char *parseFloat(const char *str, F64 *dest, U32 precision, Encoding encoding);
- BOOL isFullyDefault();
+ bool isFullyDefault();
};
#endif // LL_LLXMLNODE
diff --git a/indra/llxml/llxmlparser.cpp b/indra/llxml/llxmlparser.cpp
index 1bdc283f67..f4116626f6 100644
--- a/indra/llxml/llxmlparser.cpp
+++ b/indra/llxml/llxmlparser.cpp
@@ -66,17 +66,17 @@ LLXmlParser::~LLXmlParser()
}
-BOOL LLXmlParser::parseFile(const std::string &path)
+bool LLXmlParser::parseFile(const std::string &path)
{
llassert( !mDepth );
- BOOL success = TRUE;
+ bool success = true;
LLFILE* file = LLFile::fopen(path, "rb"); /* Flawfinder: ignore */
if( !file )
{
mAuxErrorString = llformat( "Couldn't open file %s", path.c_str());
- success = FALSE;
+ success = false;
}
else
{
@@ -90,7 +90,7 @@ BOOL LLXmlParser::parseFile(const std::string &path)
if( !buffer )
{
mAuxErrorString = llformat( "Unable to allocate XML buffer while reading file %s", path.c_str() );
- success = FALSE;
+ success = false;
goto exit_label;
}
@@ -98,14 +98,14 @@ BOOL LLXmlParser::parseFile(const std::string &path)
if( bytes_read <= 0 )
{
mAuxErrorString = llformat( "Error while reading file %s", path.c_str() );
- success = FALSE;
+ success = false;
goto exit_label;
}
- if( !XML_ParseBuffer(mParser, bytes_read, TRUE ) )
+ if( !XML_ParseBuffer(mParser, bytes_read, true ) )
{
mAuxErrorString = llformat( "Error while parsing file %s", path.c_str() );
- success = FALSE;
+ success = false;
}
exit_label:
diff --git a/indra/llxml/llxmlparser.h b/indra/llxml/llxmlparser.h
index a5b210404f..c5025ef450 100644
--- a/indra/llxml/llxmlparser.h
+++ b/indra/llxml/llxmlparser.h
@@ -43,7 +43,7 @@ public:
virtual ~LLXmlParser();
// Parses entire file
- BOOL parseFile(const std::string &path);
+ bool parseFile(const std::string &path);
// Parses some input. Returns 0 if a fatal error is detected.
// The last call must have isFinal true;
diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp
index dcce01ddde..0d8ab76a07 100644
--- a/indra/llxml/llxmltree.cpp
+++ b/indra/llxml/llxmltree.cpp
@@ -61,13 +61,13 @@ void LLXmlTree::cleanup()
}
-BOOL LLXmlTree::parseFile(const std::string &path, BOOL keep_contents)
+bool LLXmlTree::parseFile(const std::string &path, bool keep_contents)
{
delete mRoot;
mRoot = NULL;
LLXmlTreeParser parser(this);
- BOOL success = parser.parseFile( path, &mRoot, keep_contents );
+ bool success = parser.parseFile( path, &mRoot, keep_contents );
if( !success )
{
S32 line_number = parser.getCurrentLineNumber();
@@ -78,13 +78,13 @@ BOOL LLXmlTree::parseFile(const std::string &path, BOOL keep_contents)
}
-BOOL LLXmlTree::parseString(const std::string &string, BOOL keep_contents)
+bool LLXmlTree::parseString(const std::string &string, bool keep_contents)
{
delete mRoot;
mRoot = NULL;
LLXmlTreeParser parser(this);
- BOOL success = parser.parseString( string, &mRoot, keep_contents );
+ bool success = parser.parseString( string, &mRoot, keep_contents );
if( !success )
{
S32 line_number = parser.getCurrentLineNumber();
@@ -152,7 +152,7 @@ void LLXmlTreeNode::dump( const std::string& prefix )
LL_CONT << LL_ENDL;
}
-BOOL LLXmlTreeNode::hasAttribute(const std::string& name)
+bool LLXmlTreeNode::hasAttribute(const std::string& name)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
attribute_map_t::iterator iter = mAttributes.find(canonical_name);
@@ -216,214 +216,214 @@ void LLXmlTreeNode::addChild(LLXmlTreeNode* child)
// These functions assume that name is already in mAttritrubteKeys
-BOOL LLXmlTreeNode::getFastAttributeBOOL(LLStdStringHandle canonical_name, BOOL& value)
+bool LLXmlTreeNode::getFastAttributeBOOL(LLStdStringHandle canonical_name, bool& value)
{
const std::string *s = getAttribute( canonical_name );
return s && LLStringUtil::convertToBOOL( *s, value );
}
-BOOL LLXmlTreeNode::getFastAttributeU8(LLStdStringHandle canonical_name, U8& value)
+bool LLXmlTreeNode::getFastAttributeU8(LLStdStringHandle canonical_name, U8& value)
{
const std::string *s = getAttribute( canonical_name );
return s && LLStringUtil::convertToU8( *s, value );
}
-BOOL LLXmlTreeNode::getFastAttributeS8(LLStdStringHandle canonical_name, S8& value)
+bool LLXmlTreeNode::getFastAttributeS8(LLStdStringHandle canonical_name, S8& value)
{
const std::string *s = getAttribute( canonical_name );
return s && LLStringUtil::convertToS8( *s, value );
}
-BOOL LLXmlTreeNode::getFastAttributeS16(LLStdStringHandle canonical_name, S16& value)
+bool LLXmlTreeNode::getFastAttributeS16(LLStdStringHandle canonical_name, S16& value)
{
const std::string *s = getAttribute( canonical_name );
return s && LLStringUtil::convertToS16( *s, value );
}
-BOOL LLXmlTreeNode::getFastAttributeU16(LLStdStringHandle canonical_name, U16& value)
+bool LLXmlTreeNode::getFastAttributeU16(LLStdStringHandle canonical_name, U16& value)
{
const std::string *s = getAttribute( canonical_name );
return s && LLStringUtil::convertToU16( *s, value );
}
-BOOL LLXmlTreeNode::getFastAttributeU32(LLStdStringHandle canonical_name, U32& value)
+bool LLXmlTreeNode::getFastAttributeU32(LLStdStringHandle canonical_name, U32& value)
{
const std::string *s = getAttribute( canonical_name );
return s && LLStringUtil::convertToU32( *s, value );
}
-BOOL LLXmlTreeNode::getFastAttributeS32(LLStdStringHandle canonical_name, S32& value)
+bool LLXmlTreeNode::getFastAttributeS32(LLStdStringHandle canonical_name, S32& value)
{
const std::string *s = getAttribute( canonical_name );
return s && LLStringUtil::convertToS32( *s, value );
}
-BOOL LLXmlTreeNode::getFastAttributeF32(LLStdStringHandle canonical_name, F32& value)
+bool LLXmlTreeNode::getFastAttributeF32(LLStdStringHandle canonical_name, F32& value)
{
const std::string *s = getAttribute( canonical_name );
return s && LLStringUtil::convertToF32( *s, value );
}
-BOOL LLXmlTreeNode::getFastAttributeF64(LLStdStringHandle canonical_name, F64& value)
+bool LLXmlTreeNode::getFastAttributeF64(LLStdStringHandle canonical_name, F64& value)
{
const std::string *s = getAttribute( canonical_name );
return s && LLStringUtil::convertToF64( *s, value );
}
-BOOL LLXmlTreeNode::getFastAttributeColor(LLStdStringHandle canonical_name, LLColor4& value)
+bool LLXmlTreeNode::getFastAttributeColor(LLStdStringHandle canonical_name, LLColor4& value)
{
const std::string *s = getAttribute( canonical_name );
- return s ? LLColor4::parseColor(*s, &value) : FALSE;
+ return s ? LLColor4::parseColor(*s, &value) : false;
}
-BOOL LLXmlTreeNode::getFastAttributeColor4(LLStdStringHandle canonical_name, LLColor4& value)
+bool LLXmlTreeNode::getFastAttributeColor4(LLStdStringHandle canonical_name, LLColor4& value)
{
const std::string *s = getAttribute( canonical_name );
- return s ? LLColor4::parseColor4(*s, &value) : FALSE;
+ return s ? LLColor4::parseColor4(*s, &value) : false;
}
-BOOL LLXmlTreeNode::getFastAttributeColor4U(LLStdStringHandle canonical_name, LLColor4U& value)
+bool LLXmlTreeNode::getFastAttributeColor4U(LLStdStringHandle canonical_name, LLColor4U& value)
{
const std::string *s = getAttribute( canonical_name );
- return s ? LLColor4U::parseColor4U(*s, &value ) : FALSE;
+ return s ? LLColor4U::parseColor4U(*s, &value ) : false;
}
-BOOL LLXmlTreeNode::getFastAttributeVector3(LLStdStringHandle canonical_name, LLVector3& value)
+bool LLXmlTreeNode::getFastAttributeVector3(LLStdStringHandle canonical_name, LLVector3& value)
{
const std::string *s = getAttribute( canonical_name );
- return s ? LLVector3::parseVector3(*s, &value ) : FALSE;
+ return s ? LLVector3::parseVector3(*s, &value ) : false;
}
-BOOL LLXmlTreeNode::getFastAttributeVector3d(LLStdStringHandle canonical_name, LLVector3d& value)
+bool LLXmlTreeNode::getFastAttributeVector3d(LLStdStringHandle canonical_name, LLVector3d& value)
{
const std::string *s = getAttribute( canonical_name );
- return s ? LLVector3d::parseVector3d(*s, &value ) : FALSE;
+ return s ? LLVector3d::parseVector3d(*s, &value ) : false;
}
-BOOL LLXmlTreeNode::getFastAttributeQuat(LLStdStringHandle canonical_name, LLQuaternion& value)
+bool LLXmlTreeNode::getFastAttributeQuat(LLStdStringHandle canonical_name, LLQuaternion& value)
{
const std::string *s = getAttribute( canonical_name );
- return s ? LLQuaternion::parseQuat(*s, &value ) : FALSE;
+ return s ? LLQuaternion::parseQuat(*s, &value ) : false;
}
-BOOL LLXmlTreeNode::getFastAttributeUUID(LLStdStringHandle canonical_name, LLUUID& value)
+bool LLXmlTreeNode::getFastAttributeUUID(LLStdStringHandle canonical_name, LLUUID& value)
{
const std::string *s = getAttribute( canonical_name );
- return s ? LLUUID::parseUUID(*s, &value ) : FALSE;
+ return s ? LLUUID::parseUUID(*s, &value ) : false;
}
-BOOL LLXmlTreeNode::getFastAttributeString(LLStdStringHandle canonical_name, std::string& value)
+bool LLXmlTreeNode::getFastAttributeString(LLStdStringHandle canonical_name, std::string& value)
{
const std::string *s = getAttribute( canonical_name );
if( !s )
{
- return FALSE;
+ return false;
}
value = *s;
- return TRUE;
+ return true;
}
//////////////////////////////////////////////////////////////
-BOOL LLXmlTreeNode::getAttributeBOOL(const std::string& name, BOOL& value)
+bool LLXmlTreeNode::getAttributeBOOL(const std::string& name, bool& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeBOOL(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeU8(const std::string& name, U8& value)
+bool LLXmlTreeNode::getAttributeU8(const std::string& name, U8& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeU8(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeS8(const std::string& name, S8& value)
+bool LLXmlTreeNode::getAttributeS8(const std::string& name, S8& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeS8(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeS16(const std::string& name, S16& value)
+bool LLXmlTreeNode::getAttributeS16(const std::string& name, S16& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeS16(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeU16(const std::string& name, U16& value)
+bool LLXmlTreeNode::getAttributeU16(const std::string& name, U16& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeU16(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeU32(const std::string& name, U32& value)
+bool LLXmlTreeNode::getAttributeU32(const std::string& name, U32& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeU32(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeS32(const std::string& name, S32& value)
+bool LLXmlTreeNode::getAttributeS32(const std::string& name, S32& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeS32(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeF32(const std::string& name, F32& value)
+bool LLXmlTreeNode::getAttributeF32(const std::string& name, F32& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeF32(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeF64(const std::string& name, F64& value)
+bool LLXmlTreeNode::getAttributeF64(const std::string& name, F64& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeF64(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeColor(const std::string& name, LLColor4& value)
+bool LLXmlTreeNode::getAttributeColor(const std::string& name, LLColor4& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeColor(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeColor4(const std::string& name, LLColor4& value)
+bool LLXmlTreeNode::getAttributeColor4(const std::string& name, LLColor4& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeColor4(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeColor4U(const std::string& name, LLColor4U& value)
+bool LLXmlTreeNode::getAttributeColor4U(const std::string& name, LLColor4U& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeColor4U(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeVector3(const std::string& name, LLVector3& value)
+bool LLXmlTreeNode::getAttributeVector3(const std::string& name, LLVector3& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeVector3(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeVector3d(const std::string& name, LLVector3d& value)
+bool LLXmlTreeNode::getAttributeVector3d(const std::string& name, LLVector3d& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeVector3d(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeQuat(const std::string& name, LLQuaternion& value)
+bool LLXmlTreeNode::getAttributeQuat(const std::string& name, LLQuaternion& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeQuat(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeUUID(const std::string& name, LLUUID& value)
+bool LLXmlTreeNode::getAttributeUUID(const std::string& name, LLUUID& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeUUID(canonical_name, value);
}
-BOOL LLXmlTreeNode::getAttributeString(const std::string& name, std::string& value)
+bool LLXmlTreeNode::getAttributeString(const std::string& name, std::string& value)
{
LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name );
return getFastAttributeString(canonical_name, value);
@@ -523,8 +523,8 @@ LLXmlTreeParser::LLXmlTreeParser(LLXmlTree* tree)
: mTree(tree),
mRoot( NULL ),
mCurrent( NULL ),
- mDump( FALSE ),
- mKeepContents(FALSE)
+ mDump( false ),
+ mKeepContents(false)
{
}
@@ -532,14 +532,14 @@ LLXmlTreeParser::~LLXmlTreeParser()
{
}
-BOOL LLXmlTreeParser::parseFile(const std::string &path, LLXmlTreeNode** root, BOOL keep_contents)
+bool LLXmlTreeParser::parseFile(const std::string &path, LLXmlTreeNode** root, bool keep_contents)
{
llassert( !mRoot );
llassert( !mCurrent );
mKeepContents = keep_contents;
- BOOL success = LLXmlParser::parseFile(path);
+ bool success = LLXmlParser::parseFile(path);
*root = mRoot;
mRoot = NULL;
@@ -723,7 +723,7 @@ void LLXmlTreeParser::unparsedEntityDecl(
void test_llxmltree()
{
LLXmlTree tree;
- BOOL success = tree.parseFile( "test.xml" );
+ bool success = tree.parseFile( "test.xml" );
if( success )
{
tree.dump();
diff --git a/indra/llxml/llxmltree.h b/indra/llxml/llxmltree.h
index 7aefde67f1..14b748928a 100644
--- a/indra/llxml/llxmltree.h
+++ b/indra/llxml/llxmltree.h
@@ -55,8 +55,8 @@ public:
virtual ~LLXmlTree();
void cleanup();
- virtual BOOL parseFile(const std::string &path, BOOL keep_contents = TRUE);
- virtual BOOL parseString(const std::string &string, BOOL keep_contents = TRUE);
+ virtual bool parseFile(const std::string &path, bool keep_contents = true);
+ virtual bool parseString(const std::string &string, bool keep_contents = true);
LLXmlTreeNode* getRoot() { return mRoot; }
@@ -98,50 +98,50 @@ public:
{
return mName;
}
- BOOL hasName( const std::string& name )
+ bool hasName( const std::string& name )
{
return mName == name;
}
- BOOL hasAttribute( const std::string& name );
+ bool hasAttribute( const std::string& name );
// Fast versions use cannonical_name handlee to entru in LLXmlTree::sAttributeKeys string table
- BOOL getFastAttributeBOOL( LLStdStringHandle cannonical_name, BOOL& value );
- BOOL getFastAttributeU8( LLStdStringHandle cannonical_name, U8& value );
- BOOL getFastAttributeS8( LLStdStringHandle cannonical_name, S8& value );
- BOOL getFastAttributeU16( LLStdStringHandle cannonical_name, U16& value );
- BOOL getFastAttributeS16( LLStdStringHandle cannonical_name, S16& value );
- BOOL getFastAttributeU32( LLStdStringHandle cannonical_name, U32& value );
- BOOL getFastAttributeS32( LLStdStringHandle cannonical_name, S32& value );
- BOOL getFastAttributeF32( LLStdStringHandle cannonical_name, F32& value );
- BOOL getFastAttributeF64( LLStdStringHandle cannonical_name, F64& value );
- BOOL getFastAttributeColor( LLStdStringHandle cannonical_name, LLColor4& value );
- BOOL getFastAttributeColor4( LLStdStringHandle cannonical_name, LLColor4& value );
- BOOL getFastAttributeColor4U( LLStdStringHandle cannonical_name, LLColor4U& value );
- BOOL getFastAttributeVector3( LLStdStringHandle cannonical_name, LLVector3& value );
- BOOL getFastAttributeVector3d( LLStdStringHandle cannonical_name, LLVector3d& value );
- BOOL getFastAttributeQuat( LLStdStringHandle cannonical_name, LLQuaternion& value );
- BOOL getFastAttributeUUID( LLStdStringHandle cannonical_name, LLUUID& value );
- BOOL getFastAttributeString( LLStdStringHandle cannonical_name, std::string& value );
+ bool getFastAttributeBOOL( LLStdStringHandle cannonical_name, bool& value );
+ bool getFastAttributeU8( LLStdStringHandle cannonical_name, U8& value );
+ bool getFastAttributeS8( LLStdStringHandle cannonical_name, S8& value );
+ bool getFastAttributeU16( LLStdStringHandle cannonical_name, U16& value );
+ bool getFastAttributeS16( LLStdStringHandle cannonical_name, S16& value );
+ bool getFastAttributeU32( LLStdStringHandle cannonical_name, U32& value );
+ bool getFastAttributeS32( LLStdStringHandle cannonical_name, S32& value );
+ bool getFastAttributeF32( LLStdStringHandle cannonical_name, F32& value );
+ bool getFastAttributeF64( LLStdStringHandle cannonical_name, F64& value );
+ bool getFastAttributeColor( LLStdStringHandle cannonical_name, LLColor4& value );
+ bool getFastAttributeColor4( LLStdStringHandle cannonical_name, LLColor4& value );
+ bool getFastAttributeColor4U( LLStdStringHandle cannonical_name, LLColor4U& value );
+ bool getFastAttributeVector3( LLStdStringHandle cannonical_name, LLVector3& value );
+ bool getFastAttributeVector3d( LLStdStringHandle cannonical_name, LLVector3d& value );
+ bool getFastAttributeQuat( LLStdStringHandle cannonical_name, LLQuaternion& value );
+ bool getFastAttributeUUID( LLStdStringHandle cannonical_name, LLUUID& value );
+ bool getFastAttributeString( LLStdStringHandle cannonical_name, std::string& value );
// Normal versions find 'name' in LLXmlTree::sAttributeKeys then call fast versions
- virtual BOOL getAttributeBOOL( const std::string& name, BOOL& value );
- virtual BOOL getAttributeU8( const std::string& name, U8& value );
- virtual BOOL getAttributeS8( const std::string& name, S8& value );
- virtual BOOL getAttributeU16( const std::string& name, U16& value );
- virtual BOOL getAttributeS16( const std::string& name, S16& value );
- virtual BOOL getAttributeU32( const std::string& name, U32& value );
- virtual BOOL getAttributeS32( const std::string& name, S32& value );
- virtual BOOL getAttributeF32( const std::string& name, F32& value );
- virtual BOOL getAttributeF64( const std::string& name, F64& value );
- virtual BOOL getAttributeColor( const std::string& name, LLColor4& value );
- virtual BOOL getAttributeColor4( const std::string& name, LLColor4& value );
- virtual BOOL getAttributeColor4U( const std::string& name, LLColor4U& value );
- virtual BOOL getAttributeVector3( const std::string& name, LLVector3& value );
- virtual BOOL getAttributeVector3d( const std::string& name, LLVector3d& value );
- virtual BOOL getAttributeQuat( const std::string& name, LLQuaternion& value );
- virtual BOOL getAttributeUUID( const std::string& name, LLUUID& value );
- virtual BOOL getAttributeString( const std::string& name, std::string& value );
+ virtual bool getAttributeBOOL( const std::string& name, bool& value );
+ virtual bool getAttributeU8( const std::string& name, U8& value );
+ virtual bool getAttributeS8( const std::string& name, S8& value );
+ virtual bool getAttributeU16( const std::string& name, U16& value );
+ virtual bool getAttributeS16( const std::string& name, S16& value );
+ virtual bool getAttributeU32( const std::string& name, U32& value );
+ virtual bool getAttributeS32( const std::string& name, S32& value );
+ virtual bool getAttributeF32( const std::string& name, F32& value );
+ virtual bool getAttributeF64( const std::string& name, F64& value );
+ virtual bool getAttributeColor( const std::string& name, LLColor4& value );
+ virtual bool getAttributeColor4( const std::string& name, LLColor4& value );
+ virtual bool getAttributeColor4U( const std::string& name, LLColor4U& value );
+ virtual bool getAttributeVector3( const std::string& name, LLVector3& value );
+ virtual bool getAttributeVector3d( const std::string& name, LLVector3d& value );
+ virtual bool getAttributeQuat( const std::string& name, LLQuaternion& value );
+ virtual bool getAttributeUUID( const std::string& name, LLUUID& value );
+ virtual bool getAttributeString( const std::string& name, std::string& value );
const std::string& getContents()
{
@@ -200,7 +200,7 @@ public:
LLXmlTreeParser(LLXmlTree* tree);
virtual ~LLXmlTreeParser();
- BOOL parseFile(const std::string &path, LLXmlTreeNode** root, BOOL keep_contents );
+ bool parseFile(const std::string &path, LLXmlTreeNode** root, bool keep_contents );
BOOL parseString(const std::string &string, LLXmlTreeNode** root, BOOL keep_contents);
protected:
@@ -229,8 +229,8 @@ protected:
LLXmlTree* mTree;
LLXmlTreeNode* mRoot;
LLXmlTreeNode* mCurrent;
- BOOL mDump; // Dump parse tree to LL_INFOS() as it is read.
- BOOL mKeepContents;
+ bool mDump; // Dump parse tree to LL_INFOS() as it is read.
+ bool mKeepContents;
};
#endif // LL_LLXMLTREE_H
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index be2375d0b8..d0565b5706 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1733,7 +1733,6 @@ if (DARWIN)
# Add resource files to the project.
set(viewer_RESOURCE_FILES
firestorm_icon.icns
- macview.r
Info-Firestorm.plist
Firestorm.xib/
# CMake doesn't seem to support Xcode language variants well just yet
diff --git a/indra/newview/fsareasearch.h b/indra/newview/fsareasearch.h
index 95939f17d7..5c520c6e6f 100644
--- a/indra/newview/fsareasearch.h
+++ b/indra/newview/fsareasearch.h
@@ -67,7 +67,7 @@ struct FSObjectProperties
LLUUID owner_id;
LLUUID group_id;
LLUUID ownership_id;
- BOOL group_owned; // used in LL function that uses BOOL instead of bool
+ bool group_owned;
U64 creation_date;
U32 base_mask, owner_mask, group_mask, everyone_mask, next_owner_mask;
LLSaleInfo sale_info;
diff --git a/indra/newview/fsfloatersearch.cpp b/indra/newview/fsfloatersearch.cpp
index 3379508eee..81222f744c 100644
--- a/indra/newview/fsfloatersearch.cpp
+++ b/indra/newview/fsfloatersearch.cpp
@@ -1601,8 +1601,8 @@ void FSPanelSearchPlaces::processSearchReply(LLMessageSystem* msg, void**)
LLUUID query_id;
LLUUID parcel_id;
std::string name;
- BOOL for_sale;
- BOOL auction;
+ bool for_sale;
+ bool auction;
F32 dwell;
msg->getUUID("AgentData", "AgentID", agent_id);
@@ -1982,8 +1982,8 @@ void FSPanelSearchLand::processSearchReply(LLMessageSystem* msg, void**)
std::string name;
std::string land_sku;
std::string land_type;
- BOOL auction;
- BOOL for_sale;
+ bool auction;
+ bool for_sale;
S32 price;
S32 area;
diff --git a/indra/newview/fsscriptlibrary.cpp b/indra/newview/fsscriptlibrary.cpp
index aa8533a044..f04c5e8627 100644
--- a/indra/newview/fsscriptlibrary.cpp
+++ b/indra/newview/fsscriptlibrary.cpp
@@ -60,7 +60,7 @@ bool LLScriptLibrary::loadLibrary(const std::string& filename)
std::string tool_tip;
F32 sleep_time;
F32 energy;
- if (!pStringNode->getAttribute_bool("god-only", god_only))
+ if (!pStringNode->getAttributeBOOL("god-only", god_only))
{
god_only = false;
}
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 86da7320a5..b7b33f0a3e 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4080,7 +4080,7 @@ BOOL LLAgent::allowOperation(PermissionBit op,
if (!perm.isOwned()) return FALSE;
// A group member with group_proxy_power can act as owner.
- BOOL is_group_owned;
+ bool is_group_owned;
LLUUID owner_id;
perm.getOwnership(owner_id, is_group_owned);
LLUUID group_id(perm.getGroup());
@@ -4555,9 +4555,9 @@ void LLAgent::processScriptControlChange(LLMessageSystem *msg, void **)
S32 block_count = msg->getNumberOfBlocks("Data");
for (S32 block_index = 0; block_index < block_count; block_index++)
{
- BOOL take_controls;
+ bool take_controls;
U32 controls;
- BOOL passon;
+ bool passon;
U32 i;
msg->getBOOL("Data", "TakeControls", take_controls, block_index);
if (take_controls)
@@ -6624,17 +6624,17 @@ void LLAgent::sendAgentSetAppearance()
for (U8 baked_index = 0; baked_index < gAgentAvatarp->getNumBakes(); baked_index++)
//
{
- BOOL generate_valid_hash = TRUE;
+ bool generate_valid_hash{ true };
if (isAgentAvatarValid() && !gAgentAvatarp->isBakedTextureFinal((LLAvatarAppearanceDefines::EBakedTextureIndex)baked_index))
{
- generate_valid_hash = FALSE;
+ generate_valid_hash = false;
LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "Not caching baked texture upload for " << (U32)baked_index << " due to being uploaded at low resolution." << LL_ENDL;
}
// Exclude BAKED_SKIRT from being sent if no skirt is worn (should only reach here if it were already baked)
if (baked_index == BAKED_SKIRT && !gAgentAvatarp->isWearingWearableType(LLWearableType::WT_SKIRT))
{
LL_DEBUGS("Avatar") << "Not caching baked texture for unworn skirt." << LL_ENDL;
- generate_valid_hash = FALSE;
+ generate_valid_hash = false;
}
//
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index bdeeac2448..3964e4dd84 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -81,7 +81,7 @@ struct LLGroupData
LLUUID mID;
LLUUID mInsigniaID;
U64 mPowers;
- BOOL mAcceptNotices;
+ bool mAcceptNotices;
BOOL mListInProfile;
S32 mContribution;
std::string mName;
@@ -1155,7 +1155,7 @@ public:
LLAgentQueryManager();
virtual ~LLAgentQueryManager();
- BOOL hasNoPendingQueries() const { return getNumPendingQueries() == 0; }
+ bool hasNoPendingQueries() const { return getNumPendingQueries() == 0; }
S32 getNumPendingQueries() const { return mNumPendingQueries; }
private:
S32 mNumPendingQueries;
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 73b6e9b30b..1d1bc4c0bc 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -68,7 +68,7 @@
LLAgentWearables gAgentWearables;
-BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE;
+bool LLAgentWearables::mInitialWearablesUpdateReceived = false;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1)
bool LLAgentWearables::mInitialWearablesLoaded = false;
// [/SL:KB]
@@ -212,7 +212,7 @@ struct LLAgentDumper
LLAgentWearables::LLAgentWearables() :
LLWearableData(),
- mWearablesLoaded(FALSE)
+ mWearablesLoaded(false)
, mCOFChangeInProgress(false)
{
}
@@ -357,7 +357,7 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const LLWearableType::ETy
// [Legacy Bake]
//void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 index,
-void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update,
+void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 index, bool send_update,
// [Legacy Bake]
const std::string new_name)
{
@@ -424,7 +424,7 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32
// [Legacy Bake]
//gAgentAvatarp->wearableUpdated(type);
- gAgentAvatarp->wearableUpdated(type, TRUE);
+ gAgentAvatarp->wearableUpdated(type, true);
if (send_update)
{
@@ -438,7 +438,7 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type,
const U32 index,
const std::string& new_name,
const std::string& description,
- BOOL save_in_lost_and_found)
+ bool save_in_lost_and_found)
{
if (!isWearableCopyable(type, index))
{
@@ -524,7 +524,7 @@ void LLAgentWearables::saveAllWearables()
for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++)
// [Legacy Bake]
//saveWearable((LLWearableType::EType)i, j);
- saveWearable((LLWearableType::EType)i, j, FALSE);
+ saveWearable((LLWearableType::EType)i, j, false);
}
// [Legacy Bake]
@@ -566,13 +566,13 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string&
}
-BOOL LLAgentWearables::isWearableModifiable(LLWearableType::EType type, U32 index) const
+bool LLAgentWearables::isWearableModifiable(LLWearableType::EType type, U32 index) const
{
LLUUID item_id = getWearableItemID(type, index);
- return item_id.notNull() ? isWearableModifiable(item_id) : FALSE;
+ return item_id.notNull() ? isWearableModifiable(item_id) : false;
}
-BOOL LLAgentWearables::isWearableModifiable(const LLUUID& item_id) const
+bool LLAgentWearables::isWearableModifiable(const LLUUID& item_id) const
{
const LLUUID& linked_id = gInventory.getLinkedItemID(item_id);
if (linked_id.notNull())
@@ -581,13 +581,13 @@ BOOL LLAgentWearables::isWearableModifiable(const LLUUID& item_id) const
if (item && item->getPermissions().allowModifyBy(gAgent.getID(),
gAgent.getGroupID()))
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL LLAgentWearables::isWearableCopyable(LLWearableType::EType type, U32 index) const
+bool LLAgentWearables::isWearableCopyable(LLWearableType::EType type, U32 index) const
{
LLUUID item_id = getWearableItemID(type, index);
if (!item_id.isNull())
@@ -596,28 +596,12 @@ BOOL LLAgentWearables::isWearableCopyable(LLWearableType::EType type, U32 index)
if (item && item->getPermissions().allowCopyBy(gAgent.getID(),
gAgent.getGroupID()))
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-/*
- U32 LLAgentWearables::getWearablePermMask(LLWearableType::EType type)
- {
- LLUUID item_id = getWearableItemID(type);
- if (!item_id.isNull())
- {
- LLInventoryItem* item = gInventory.getItem(item_id);
- if (item)
- {
- return item->getPermissions().getMaskOwner();
- }
- }
- return PERM_NONE;
- }
-*/
-
LLInventoryItem* LLAgentWearables::getWearableInventoryItem(LLWearableType::EType type, U32 index)
{
LLUUID item_id = getWearableItemID(type,index);
@@ -690,19 +674,19 @@ const LLViewerWearable* LLAgentWearables::getViewerWearable(const LLWearableType
}
// static
-BOOL LLAgentWearables::selfHasWearable(LLWearableType::EType type)
+bool LLAgentWearables::selfHasWearable(LLWearableType::EType type)
{
return (gAgentWearables.getWearableCount(type) > 0);
}
// virtual
-void LLAgentWearables::wearableUpdated(LLWearable *wearable, BOOL removed)
+void LLAgentWearables::wearableUpdated(LLWearable *wearable, bool removed)
{
if (isAgentAvatarValid())
{
// [Legacy Bake]
//gAgentAvatarp->wearableUpdated(wearable->getType());
- const BOOL upload_result = removed;
+ const bool upload_result = removed;
gAgentAvatarp->wearableUpdated(wearable->getType(), upload_result);
// [Legacy Bake]
}
@@ -728,7 +712,7 @@ void LLAgentWearables::wearableUpdated(LLWearable *wearable, BOOL removed)
wearable->setDefinitionVersion(22);
// [Legacy Bake]
//saveWearable(wearable->getType(),index);
- saveWearable(wearable->getType(),index, TRUE);
+ saveWearable(wearable->getType(),index, true);
}
}
@@ -782,9 +766,9 @@ const LLUUID LLAgentWearables::getWearableAssetID(LLWearableType::EType type, U3
return LLUUID();
}
-BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id) const
+bool LLAgentWearables::isWearingItem(const LLUUID& item_id) const
{
- return getWearableFromItemID(item_id) != NULL;
+ return getWearableFromItemID(item_id) != nullptr;
}
void LLAgentWearables::addLocalTextureObject(const LLWearableType::EType wearable_type, const LLAvatarAppearanceDefines::ETextureIndex texture_type, U32 wearable_index)
@@ -879,21 +863,21 @@ void LLAgentWearables::createStandardWearables()
if (!isAgentAvatarValid()) return;
- const BOOL create[LLWearableType::WT_COUNT] =
+ constexpr bool create[LLWearableType::WT_COUNT] =
{
- TRUE, //LLWearableType::WT_SHAPE
- TRUE, //LLWearableType::WT_SKIN
- TRUE, //LLWearableType::WT_HAIR
- TRUE, //LLWearableType::WT_EYES
- TRUE, //LLWearableType::WT_SHIRT
- TRUE, //LLWearableType::WT_PANTS
- TRUE, //LLWearableType::WT_SHOES
- TRUE, //LLWearableType::WT_SOCKS
- FALSE, //LLWearableType::WT_JACKET
- FALSE, //LLWearableType::WT_GLOVES
- TRUE, //LLWearableType::WT_UNDERSHIRT
- TRUE, //LLWearableType::WT_UNDERPANTS
- FALSE //LLWearableType::WT_SKIRT
+ true, //LLWearableType::WT_SHAPE
+ true, //LLWearableType::WT_SKIN
+ true, //LLWearableType::WT_HAIR
+ true, //LLWearableType::WT_EYES
+ true, //LLWearableType::WT_SHIRT
+ true, //LLWearableType::WT_PANTS
+ true, //LLWearableType::WT_SHOES
+ true, //LLWearableType::WT_SOCKS
+ false, //LLWearableType::WT_JACKET
+ false, //LLWearableType::WT_GLOVES
+ true, //LLWearableType::WT_UNDERSHIRT
+ true, //LLWearableType::WT_UNDERPANTS
+ false //LLWearableType::WT_SKIRT
};
LLPointer cb = new OnWearableItemCreatedCB;
@@ -972,7 +956,7 @@ void LLAgentWearables::makeNewOutfitDone(S32 type, U32 index)
void LLAgentWearables::addWearableToAgentInventory(LLPointer cb,
LLViewerWearable* wearable,
const LLUUID& category_id,
- BOOL notify)
+ bool notify)
{
create_inventory_wearable(gAgent.getID(),
gAgent.getSessionID(),
@@ -1064,7 +1048,7 @@ void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, boo
eraseWearable(old_wearable);
// [Legacy Bake]
//old_wearable->removeFromAvatar();
- old_wearable->removeFromAvatar(TRUE);
+ old_wearable->removeFromAvatar(true);
}
}
// clearWearableType(type);
@@ -1082,7 +1066,7 @@ void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, boo
eraseWearable(old_wearable);
// [Legacy Bake]
//old_wearable->removeFromAvatar();
- old_wearable->removeFromAvatar(TRUE);
+ old_wearable->removeFromAvatar(true);
}
}
@@ -1107,7 +1091,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
S32 matched = 0, mismatched = 0;
const S32 arr_size = LLWearableType::WT_COUNT;
S32 type_counts[arr_size];
- BOOL update_inventory = FALSE;
+ bool update_inventory{ false };
std::fill(type_counts,type_counts+arr_size,0);
for (S32 i = 0; i < count; i++)
{
@@ -1156,7 +1140,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
<< curr_wearable->getName() << " vs " << new_item->getName()
<< " item ids " << curr_wearable->getItemID() << " vs " << new_item->getUUID()
<< LL_ENDL;
- update_inventory = TRUE;
+ update_inventory = true;
continue;
}
// If we got here, everything matches.
@@ -1223,7 +1207,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
pushWearable(type,new_wearable);
}
- const BOOL removed = FALSE;
+ constexpr bool removed = false;
wearableUpdated(new_wearable, removed);
}
}
@@ -1241,7 +1225,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
if (isAgentAvatarValid())
{
- gAgentAvatarp->setCompositeUpdatesEnabled(TRUE);
+ gAgentAvatarp->setCompositeUpdatesEnabled(true);
// If we have not yet declouded, we may want to use
// baked texture UUIDs sent from the first objectUpdate message
@@ -1255,7 +1239,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
}
// Start rendering & update the server
- mWearablesLoaded = TRUE;
+ mWearablesLoaded = true;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.2)
if (!mInitialWearablesLoaded)
@@ -1599,7 +1583,7 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra
++it)
{
const LLInventoryItem* item = *it;
- LLAttachmentsMgr::instance().addAttachmentRequest(item->getLinkedUUID(), 0, TRUE);
+ LLAttachmentsMgr::instance().addAttachmentRequest(item->getLinkedUUID(), 0, true);
}
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
@@ -1621,7 +1605,7 @@ bool LLAgentWearables::canMoveWearable(const LLUUID& item_id, bool closer_to_bod
return wearable != marginal_wearable;
}
-BOOL LLAgentWearables::areWearablesLoaded() const
+bool LLAgentWearables::areWearablesLoaded() const
{
return mWearablesLoaded;
}
@@ -1638,7 +1622,7 @@ bool LLAgentWearables::canWearableBeRemoved(const LLViewerWearable* wearable) co
// [Legacy Bake]
//void LLAgentWearables::animateAllWearableParams(F32 delta)
-void LLAgentWearables::animateAllWearableParams(F32 delta, BOOL upload_bake)
+void LLAgentWearables::animateAllWearableParams(F32 delta, bool upload_bake)
{
for( S32 type = 0; type < LLWearableType::WT_COUNT; ++type )
{
@@ -1794,7 +1778,7 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)
return;
}
- const BOOL disable_camera_switch = LLWearableType::getInstance()->getDisableCameraSwitch(wearable->getType());
+ const bool disable_camera_switch = LLWearableType::getInstance()->getDisableCameraSwitch(wearable->getType());
LLPanel* panel = LLFloaterSidePanelContainer::getPanel("appearance");
LLSidepanelAppearance::editWearable(wearable, panel, disable_camera_switch);
}
@@ -1950,7 +1934,7 @@ void LLAgentWearables::sendAgentWearablesRequest()
gAgent.sendReliableMessage();
}
-BOOL LLAgentWearables::itemUpdatePending(const LLUUID& item_id) const
+bool LLAgentWearables::itemUpdatePending(const LLUUID& item_id) const
{
return mItemsAwaitingWearableUpdate.find(item_id) != mItemsAwaitingWearableUpdate.end();
}
@@ -1992,7 +1976,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
{
gMessageSystem->getU32Fast(_PREHASH_AgentData, _PREHASH_SerialNum, gAgentQueryManager.mUpdateSerialNum);
- const S32 NUM_BODY_PARTS = 4;
+ constexpr S32 NUM_BODY_PARTS = 4;
S32 num_wearables = gMessageSystem->getNumberOfBlocksFast(_PREHASH_WearableData);
if (num_wearables < NUM_BODY_PARTS)
{
@@ -2030,7 +2014,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
gMessageSystem->getUUIDFast(_PREHASH_WearableData, _PREHASH_AssetID, asset_id, i);
if (asset_id.isNull())
{
- LLViewerWearable::removeFromAvatar(type, FALSE);
+ LLViewerWearable::removeFromAvatar(type, false);
}
else
{
@@ -2092,7 +2076,7 @@ void LLAgentWearables::recoverMissingWearable(const LLWearableType::EType type,
index,
new_wearable,
AddWearableToAgentInventoryCallback::CALL_RECOVERDONE);
- addWearableToAgentInventory(cb, new_wearable, lost_and_found_id, TRUE);
+ addWearableToAgentInventory(cb, new_wearable, lost_and_found_id, true);
}
void LLAgentWearables::recoverMissingWearableDone()
@@ -2125,7 +2109,7 @@ void LLAgentWearables::createStandardWearablesAllDone()
// observers.
LL_INFOS() << "all done?" << LL_ENDL;
- mWearablesLoaded = TRUE;
+ mWearablesLoaded = true;
notifyLoadingFinished();
updateServer();
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index c8112cad52..45581cb321 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -75,12 +75,12 @@ protected:
// Queries
//--------------------------------------------------------------------
public:
- BOOL isWearingItem(const LLUUID& item_id) const;
- BOOL isWearableModifiable(LLWearableType::EType type, U32 index /*= 0*/) const;
- BOOL isWearableModifiable(const LLUUID& item_id) const;
+ bool isWearingItem(const LLUUID& item_id) const;
+ bool isWearableModifiable(LLWearableType::EType type, U32 index /*= 0*/) const;
+ bool isWearableModifiable(const LLUUID& item_id) const;
- BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const;
- BOOL areWearablesLoaded() const;
+ bool isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const;
+ bool areWearablesLoaded() const;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1)
bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; }
// [/SL:KB]
@@ -89,8 +89,8 @@ public:
// [/RLVa:KB]
bool isCOFChangeInProgress() const { return mCOFChangeInProgress; }
F32 getCOFChangeTime() const { return mCOFChangeTimer.getElapsedTimeF32(); }
+ // [Legacy Bake]
void updateWearablesLoaded();
- void checkWearablesLoaded() const;
bool canMoveWearable(const LLUUID& item_id, bool closer_to_body) const;
// Note: False for shape, skin, eyes, and hair, unless you have MORE than 1.
@@ -98,7 +98,7 @@ public:
// [Legacy Bake]
//void animateAllWearableParams(F32 delta);
- void animateAllWearableParams(F32 delta, BOOL upload_bake);
+ void animateAllWearableParams(F32 delta, bool upload_bake);
//--------------------------------------------------------------------
// Accessors
@@ -116,13 +116,13 @@ public:
LLViewerWearable* getViewerWearable(const LLWearableType::EType type, U32 index /*= 0*/);
const LLViewerWearable* getViewerWearable(const LLWearableType::EType type, U32 index /*= 0*/) const;
LLInventoryItem* getWearableInventoryItem(LLWearableType::EType type, U32 index /*= 0*/);
- static BOOL selfHasWearable(LLWearableType::EType type);
+ static bool selfHasWearable(LLWearableType::EType type);
//--------------------------------------------------------------------
// Setters
//--------------------------------------------------------------------
private:
- /*virtual*/void wearableUpdated(LLWearable *wearable, BOOL removed);
+ /*virtual*/void wearableUpdated(LLWearable *wearable, bool removed);
public:
// void setWearableItem(LLInventoryItem* new_item, LLViewerWearable* wearable, bool do_append = false);
void setWearableOutfit(const LLInventoryItem::item_array_t& items, const std::vector< LLViewerWearable* >& wearables);
@@ -137,20 +137,22 @@ protected:
void addWearableToAgentInventory(LLPointer cb,
LLViewerWearable* wearable,
const LLUUID& category_id = LLUUID::null,
- BOOL notify = TRUE);
+ bool notify = true);
void addWearabletoAgentInventoryDone(const LLWearableType::EType type,
const U32 index,
const LLUUID& item_id,
LLViewerWearable* wearable);
+ // [Legacy Bake]
void recoverMissingWearable(const LLWearableType::EType type, U32 index /*= 0*/);
void recoverMissingWearableDone();
+ // [Legacy Bake]
//--------------------------------------------------------------------
// Editing/moving wearables
//--------------------------------------------------------------------
public:
- static void createWearable(LLWearableType::EType type, bool wear = false, const LLUUID& parent_id = LLUUID::null, std::function created_cb = NULL);
+ static void createWearable(LLWearableType::EType type, bool wear = false, const LLUUID& parent_id = LLUUID::null, std::function created_cb = nullptr);
static void editWearable(const LLUUID& item_id);
bool moveWearable(const LLViewerInventoryItem* item, bool closer_to_body);
@@ -187,7 +189,6 @@ protected:
void sendAgentWearablesRequest();
void queryWearableCache();
void updateServer();
- static void onInitialWearableAssetArrived(LLViewerWearable* wearable, void* userdata);
// [Legacy Bake]
//--------------------------------------------------------------------
@@ -200,10 +201,10 @@ private:
// Save Wearables
//--------------------------------------------------------------------
public:
- void saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, const std::string& description, BOOL save_in_lost_and_found);
+ void saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, const std::string& description, bool save_in_lost_and_found);
// [Legacy Bake]
//void saveWearable(const LLWearableType::EType type, const U32 index,
- void saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update = TRUE,
+ void saveWearable(const LLWearableType::EType type, const U32 index, bool send_update = true,
// [Legacy Bake]
const std::string new_name = "");
void saveAllWearables();
@@ -233,7 +234,7 @@ public:
static llvo_vec_t getTempAttachments();
// [Legacy Bake]
- BOOL itemUpdatePending(const LLUUID& item_id) const;
+ bool itemUpdatePending(const LLUUID& item_id) const;
U32 itemUpdatePendingCount() const;
// [Legacy Bake]
@@ -267,21 +268,21 @@ private:
// Member variables
//--------------------------------------------------------------------
private:
- static BOOL mInitialWearablesUpdateReceived;
+ static bool mInitialWearablesUpdateReceived;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2)
static bool mInitialWearablesLoaded;
// [/SL:KB]
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
static bool mInitialAttachmentsRequested;
// [/RLVa:KB]
- BOOL mWearablesLoaded;
+ bool mWearablesLoaded;
// [Legacy Bake]
std::set mItemsAwaitingWearableUpdate;
/**
* True if agent's outfit is being changed now.
*/
- BOOL mCOFChangeInProgress;
+ bool mCOFChangeInProgress;
LLTimer mCOFChangeTimer;
//--------------------------------------------------------------------------------
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index bd32cf6cfc..cbd2bc4a5f 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -4809,7 +4809,7 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b
{
// [Legacy Bake]
//gAgentAvatarp->wearableUpdated(item->getWearableType());
- gAgentAvatarp->wearableUpdated(item->getWearableType(), FALSE);
+ gAgentAvatarp->wearableUpdated(item->getWearableType(), false);
}
setOutfitDirty(true);
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
index 3538de13b9..3eb4d3d745 100644
--- a/indra/newview/llavatarpropertiesprocessor.h
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -105,14 +105,14 @@ struct LLPickData
LLUUID agent_id;
LLUUID pick_id;
LLUUID creator_id;
- BOOL top_pick;
+ bool top_pick;
LLUUID parcel_id;
std::string name;
std::string desc;
LLUUID snapshot_id;
LLVector3d pos_global;
S32 sort_order;
- BOOL enabled;
+ bool enabled;
//used only in read requests
std::string user_name;
diff --git a/indra/newview/llbreastmotion.h b/indra/newview/llbreastmotion.h
index 433fece29f..d099257a33 100644
--- a/indra/newview/llbreastmotion.h
+++ b/indra/newview/llbreastmotion.h
@@ -93,12 +93,12 @@ public:
// called when a motion is activated
// must return TRUE to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate();
+ virtual bool onActivate();
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index 794bb78b9c..bc61fac00b 100644
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -571,7 +571,7 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value,
std::string token(onevalue(option, value));
// There's a token. check the string for true/false/1/0 etc.
- BOOL result = false;
+ bool result = false;
bool gotSet = LLStringUtil::convertToBOOL(token, result);
if (gotSet)
{
diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp
index 12dbc53f60..66f5636312 100644
--- a/indra/newview/lldirpicker.cpp
+++ b/indra/newview/lldirpicker.cpp
@@ -46,12 +46,6 @@
#include "FL/Fl_Native_File_Chooser.H"
#endif
-//
-// Globals
-//
-
-LLDirPicker LLDirPicker::sInstance;
-
#if LL_WINDOWS
#include
#endif
@@ -80,21 +74,24 @@ bool LLDirPicker::check_local_file_access_enabled()
LLDirPicker::LLDirPicker() :
mFileName(NULL),
- mLocked(false)
+ mLocked(false),
+ pDialog(NULL)
{
- bi.hwndOwner = NULL;
- bi.pidlRoot = NULL;
- bi.pszDisplayName = NULL;
- bi.lpszTitle = NULL;
- bi.ulFlags = BIF_USENEWUI;
- bi.lpfn = NULL;
- bi.lParam = NULL;
- bi.iImage = 0;
}
LLDirPicker::~LLDirPicker()
{
- // nothing
+ mEventListener.disconnect();
+}
+
+void LLDirPicker::reset()
+{
+ if (pDialog)
+ {
+ IFileDialog* p_file_dialog = (IFileDialog*)pDialog;
+ p_file_dialog->Close(S_FALSE);
+ pDialog = NULL;
+ }
}
BOOL LLDirPicker::getDir(std::string* filename, bool blocking)
@@ -118,26 +115,51 @@ BOOL LLDirPicker::getDir(std::string* filename, bool blocking)
// Modal, so pause agent
send_agent_pause();
}
-
- bi.hwndOwner = (HWND)gViewerWindow->getPlatformWindow();
+ else if (!mEventListener.connected())
+ {
+ mEventListener = LLEventPumps::instance().obtain("LLApp").listen(
+ "DirPicker",
+ [this](const LLSD& stat)
+ {
+ std::string status(stat["status"]);
+ if (status != "running")
+ {
+ reset();
+ }
+ return false;
+ });
+ }
::OleInitialize(NULL);
- LPITEMIDLIST pIDL = ::SHBrowseForFolder(&bi);
- if(pIDL != NULL)
- {
- WCHAR buffer[_MAX_PATH] = {'\0'};
-
- if(::SHGetPathFromIDList(pIDL, buffer) != 0)
- {
- // Set the string value.
-
- mDir = utf16str_to_utf8str(llutf16string(buffer));
- success = TRUE;
- }
- // free the item id list
- CoTaskMemFree(pIDL);
- }
+ IFileDialog* p_file_dialog;
+ if (SUCCEEDED(CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&p_file_dialog))))
+ {
+ DWORD dwOptions;
+ if (SUCCEEDED(p_file_dialog->GetOptions(&dwOptions)))
+ {
+ p_file_dialog->SetOptions(dwOptions | FOS_PICKFOLDERS);
+ }
+ HWND owner = (HWND)gViewerWindow->getPlatformWindow();
+ pDialog = p_file_dialog;
+ if (SUCCEEDED(p_file_dialog->Show(owner)))
+ {
+ IShellItem* psi;
+ if (SUCCEEDED(p_file_dialog->GetResult(&psi)))
+ {
+ wchar_t* pwstr = NULL;
+ if (SUCCEEDED(psi->GetDisplayName(SIGDN_FILESYSPATH, &pwstr)))
+ {
+ mDir = ll_convert_wide_to_string(pwstr);
+ CoTaskMemFree(pwstr);
+ success = TRUE;
+ }
+ psi->Release();
+ }
+ }
+ pDialog = NULL;
+ p_file_dialog->Release();
+ }
::OleUninitialize();
diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h
index 3406488494..41b5397389 100644
--- a/indra/newview/lldirpicker.h
+++ b/indra/newview/lldirpicker.h
@@ -57,9 +57,6 @@ class LLFilePicker;
class LLDirPicker
{
public:
- // calling this before main() is undefined
- static LLDirPicker& instance( void ) { return sInstance; }
-
BOOL getDir(std::string* filename, bool blocking = true);
std::string getDirName();
@@ -90,12 +87,9 @@ private:
std::string* mFileName;
std::string mDir;
bool mLocked;
+ void *pDialog;
+ boost::signals2::connection mEventListener;
- static LLDirPicker sInstance;
-#if LL_WINDOWS
- BROWSEINFO bi;
-#endif
-
public:
// don't call these directly please.
LLDirPicker();
diff --git a/indra/newview/llemote.cpp b/indra/newview/llemote.cpp
index 676ad17768..04ceb97261 100644
--- a/indra/newview/llemote.cpp
+++ b/indra/newview/llemote.cpp
@@ -74,7 +74,7 @@ LLMotion::LLMotionInitStatus LLEmote::onInitialize(LLCharacter *character)
//-----------------------------------------------------------------------------
// LLEmote::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLEmote::onActivate()
+bool LLEmote::onActivate()
{
// mCharacter being 0 might be one of the reasons for FIRE-10737
if( !mCharacter )
@@ -86,7 +86,7 @@ BOOL LLEmote::onActivate()
{
// [Legacy Bake]
//default_param->setWeight( default_param->getMaxWeight());
- default_param->setWeight( default_param->getMaxWeight(), FALSE);
+ default_param->setWeight( default_param->getMaxWeight(), false);
}
mParam = mCharacter->getVisualParam(mName.c_str());
@@ -94,29 +94,29 @@ BOOL LLEmote::onActivate()
{
// [Legacy Bake]
//mParam->setWeight(0.f);
- mParam->setWeight(0.f, FALSE);
+ mParam->setWeight(0.f, false);
mCharacter->updateVisualParams();
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// LLEmote::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLEmote::onUpdate(F32 time, U8* joint_mask)
+bool LLEmote::onUpdate(F32 time, U8* joint_mask)
{
if( mParam )
{
F32 weight = mParam->getMinWeight() + mPose.getWeight() * (mParam->getMaxWeight() - mParam->getMinWeight());
// [Legacy Bake]
//mParam->setWeight(weight);
- mParam->setWeight(weight, FALSE);
+ mParam->setWeight(weight, false);
// mCharacter being 0 might be one of the reasons for FIRE-11529
if( !mCharacter )
- return TRUE;
+ return true;
//
// Cross fade against the default parameter
@@ -128,13 +128,13 @@ BOOL LLEmote::onUpdate(F32 time, U8* joint_mask)
// [Legacy Bake]
//default_param->setWeight( default_param_weight);
- default_param->setWeight( default_param_weight, FALSE);
+ default_param->setWeight( default_param_weight, false);
}
mCharacter->updateVisualParams();
}
- return TRUE;
+ return true;
}
@@ -147,7 +147,7 @@ void LLEmote::onDeactivate()
{
// [Legacy Bake]
//mParam->setWeight( mParam->getDefaultWeight());
- mParam->setWeight( mParam->getDefaultWeight(), FALSE);
+ mParam->setWeight( mParam->getDefaultWeight(), false);
}
LLVisualParam* default_param = mCharacter->getVisualParam( "Express_Closed_Mouth" );
@@ -155,7 +155,7 @@ void LLEmote::onDeactivate()
{
// [Legacy Bake]
//default_param->setWeight( default_param->getMaxWeight());
- default_param->setWeight( default_param->getMaxWeight(), FALSE);
+ default_param->setWeight( default_param->getMaxWeight(), false);
}
mCharacter->updateVisualParams();
diff --git a/indra/newview/llemote.h b/indra/newview/llemote.h
index 9ea6be6b1e..1b15445e4b 100644
--- a/indra/newview/llemote.h
+++ b/indra/newview/llemote.h
@@ -96,12 +96,12 @@ public:
// called when a motion is activated
// must return TRUE to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate();
+ virtual bool onActivate();
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index a06371a603..e908717820 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -173,7 +173,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
buy_btn->setEnabled(FALSE);
LLUUID owner_id;
- BOOL is_group_owned;
+ bool is_group_owned;
LLAssetType::EType asset_type;
LLInventoryType::EType inv_type;
S32 wearable_count = 0;
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 3766464bf9..87a1228057 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1732,12 +1732,12 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
S32 rows = msg->getNumberOfBlocksFast(_PREHASH_Data);
//uuid_list_t return_ids;
LLUUID owner_id;
- BOOL is_group_owned;
+ bool is_group_owned;
S32 object_count;
U32 most_recent_time = 0;
- BOOL is_online;
+ bool is_online;
std::string object_count_str;
- //BOOL b_need_refresh = FALSE;
+ //bool b_need_refresh = false;
// If we were waiting for the first reply, clear the "Searching..." text.
if (self->mFirstReply)
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp
index 75506bfa85..681dec3bb4 100644
--- a/indra/newview/llfloaterpay.cpp
+++ b/indra/newview/llfloaterpay.cpp
@@ -408,7 +408,7 @@ void LLFloaterPay::payViaObject(money_callback callback, LLSafeHandlesetHandlerFuncFast(_PREHASH_PayPriceReply, processPayPriceReply,(void **)floater);
LLUUID owner_id;
- BOOL is_group = FALSE;
+ bool is_group = false;
node->mPermissions->getOwnership(owner_id, is_group);
floater->getChild("object_name_text")->setValue(node->mName);
@@ -531,7 +531,7 @@ void LLFloaterPay::onGive(give_money_ptr info)
//
{
LLUUID payee_id = LLUUID::null;
- BOOL is_group = false;
+ bool is_group = false;
if (floater->mObjectSelection.notNull())
{
LLSelectNode* node = floater->mObjectSelection->getFirstRootNode();
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 33d18f7f23..aba505292e 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -468,7 +468,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
F32 water_height;
F32 terrain_raise_limit;
F32 terrain_lower_limit;
- BOOL use_estate_sun;
+ bool use_estate_sun;
F32 sun_hour;
msg->getString("RegionInfo", "SimName", sim_name);
msg->getU8("RegionInfo", "MaxAgents", agent_limit);
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 1bd691d9a9..68928c8ddb 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -998,7 +998,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
std::string online_status;
std::string title;
U64 agent_powers = 0;
- BOOL is_owner = FALSE;
+ bool is_owner = false;
S32 num_members = msg->getNumberOfBlocksFast(_PREHASH_MemberData);
for (S32 i = 0; i < num_members; i++)
@@ -1093,7 +1093,7 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
LLUUID group_id;
std::string name;
std::string charter;
- BOOL show_in_list = FALSE;
+ bool show_in_list = false;
LLUUID founder_id;
U64 powers_mask = GP_NO_POWERS;
S32 money = 0;
@@ -1101,11 +1101,11 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
LLUUID insignia_id;
LLUUID owner_role;
U32 membership_fee = 0;
- BOOL open_enrollment = FALSE;
+ bool open_enrollment = false;
S32 num_group_members = 0;
S32 num_group_roles = 0;
- BOOL allow_publish = FALSE;
- BOOL mature = FALSE;
+ bool allow_publish = false;
+ bool mature = false;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id );
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_FounderID, founder_id);
@@ -1407,7 +1407,7 @@ void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data
LL_DEBUGS("GrpMgr") << "processEjectGroupMemberReply" << LL_ENDL;
LLUUID group_id;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
- BOOL success;
+ bool success;
msg->getBOOLFast(_PREHASH_EjectData, _PREHASH_Success, success);
// If we had a failure, the group panel needs to be updated.
@@ -1422,7 +1422,7 @@ void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data)
{
LL_DEBUGS("GrpMgr") << "processJoinGroupReply" << LL_ENDL;
LLUUID group_id;
- BOOL success;
+ bool success;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
msg->getBOOLFast(_PREHASH_GroupData, _PREHASH_Success, success);
@@ -1442,7 +1442,7 @@ void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data)
{
LL_DEBUGS("GrpMgr") << "processLeaveGroupReply" << LL_ENDL;
LLUUID group_id;
- BOOL success;
+ bool success;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
msg->getBOOLFast(_PREHASH_GroupData, _PREHASH_Success, success);
@@ -1461,7 +1461,7 @@ void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data)
void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
{
LLUUID group_id;
- BOOL success;
+ bool success;
std::string message;
msg->getUUIDFast(_PREHASH_ReplyData, _PREHASH_GroupID, group_id );
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index 200b7886f3..462a061980 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -225,7 +225,7 @@ struct LLGroupTitle
{
std::string mTitle;
LLUUID mRoleID;
- BOOL mSelected;
+ bool mSelected;
};
class LLGroupMgrGroupData
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 816615adca..a1fba25bec 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -623,7 +623,7 @@ void LLLocalBitmap::updateUserLayers(LLUUID old_id, LLUUID new_id, LLWearableTyp
gAgentAvatarp->setLocalTexture(reg_texind, gTextureList.getImage(new_id), FALSE, index);
// [Legacy Bake]
//gAgentAvatarp->wearableUpdated(type);
- gAgentAvatarp->wearableUpdated(type, FALSE);
+ gAgentAvatarp->wearableUpdated(type, false);
/* telling the manager to rebake once update cycle is fully done */
LLLocalBitmapMgr::getInstance()->setNeedsRebake();
}
diff --git a/indra/newview/llmimetypes.cpp b/indra/newview/llmimetypes.cpp
index 790a184068..d374263c49 100644
--- a/indra/newview/llmimetypes.cpp
+++ b/indra/newview/llmimetypes.cpp
@@ -131,15 +131,15 @@ bool LLMIMETypes::parseMIMETypes(const std::string& xml_filename)
}
if (child->hasName("allow_resize"))
{
- BOOL allow_resize = FALSE;
+ bool allow_resize = false;
child->getBoolValue( 1, &allow_resize );
- info.mAllowResize = (bool)allow_resize;
+ info.mAllowResize = allow_resize;
}
if (child->hasName("allow_looping"))
{
- BOOL allow_looping = FALSE;
+ bool allow_looping = false;
child->getBoolValue( 1, &allow_looping );
- info.mAllowLooping = (bool)allow_looping;
+ info.mAllowLooping = allow_looping;
}
}
sWidgetMap[set_name] = info;
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 05838e8af3..27c31bd0a3 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -992,15 +992,15 @@ void LLPanelEditWearable::onCommitSexChange()
{
// [Legacy Bake]
//wearable->setVisualParamWeight(param->getID(), is_new_sex_male);
- wearable->setVisualParamWeight(param->getID(), is_new_sex_male, FALSE);
+ wearable->setVisualParamWeight(param->getID(), is_new_sex_male, false);
}
// [Legacy Bake]
//param->setWeight( is_new_sex_male);
//gAgentAvatarp->updateSexDependentLayerSets();
- param->setWeight( is_new_sex_male, FALSE);
+ param->setWeight( is_new_sex_male, false);
- gAgentAvatarp->updateSexDependentLayerSets(FALSE);
+ gAgentAvatarp->updateSexDependentLayerSets(false);
// [Legacy Bake]
gAgentAvatarp->updateVisualParams();
@@ -1040,7 +1040,7 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl)
LLVisualParamHint::requestHintUpdates();
// [Legacy Bake]
//gAgentAvatarp->wearableUpdated(type);
- gAgentAvatarp->wearableUpdated(type, FALSE);
+ gAgentAvatarp->wearableUpdated(type, false);
}
else
{
@@ -1071,11 +1071,11 @@ void LLPanelEditWearable::onColorSwatchCommit(const LLUICtrl* ctrl)
{
// [Legacy Bake]
//getWearable()->setClothesColor(entry->mTextureIndex, new_color);
- getWearable()->setClothesColor(entry->mTextureIndex, new_color, TRUE);
+ getWearable()->setClothesColor(entry->mTextureIndex, new_color, true);
LLVisualParamHint::requestHintUpdates();
// [Legacy Bake]
//gAgentAvatarp->wearableUpdated(getWearable()->getType());
- gAgentAvatarp->wearableUpdated(getWearable()->getType(), FALSE);
+ gAgentAvatarp->wearableUpdated(getWearable()->getType(), false);
}
}
else
@@ -1178,7 +1178,7 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
}
// [Legacy Bake]
//gAgentWearables.saveWearable(mWearablePtr->getType(), index, new_name);
- gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
+ gAgentWearables.saveWearable(mWearablePtr->getType(), index, true, new_name);
}
@@ -1198,7 +1198,7 @@ void LLPanelEditWearable::revertChanges()
updateTypeSpecificControls(mWearablePtr->getType());
// [Legacy Bake]
//gAgentAvatarp->wearableUpdated(mWearablePtr->getType());
- gAgentAvatarp->wearableUpdated(mWearablePtr->getType(), FALSE);
+ gAgentAvatarp->wearableUpdated(mWearablePtr->getType(), false);
}
void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BOOL disable_camera_switch)
@@ -1750,7 +1750,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL
gAgentAvatarp->setLocalTexture(te, image, FALSE, index);
// [Legacy Bake]
//gAgentAvatarp->wearableUpdated(getWearable()->getType());
- gAgentAvatarp->wearableUpdated(getWearable()->getType(), FALSE);
+ gAgentAvatarp->wearableUpdated(getWearable()->getType(), false);
}
else
{
@@ -1768,7 +1768,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL
gAgentAvatarp->setLocalTexture(te, image, FALSE, index);
// [Legacy Bake]
//gAgentAvatarp->wearableUpdated(getWearable()->getType());
- gAgentAvatarp->wearableUpdated(getWearable()->getType(), FALSE);
+ gAgentAvatarp->wearableUpdated(getWearable()->getType(), false);
}
updatePanelPickerControls(getWearable()->getType());
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index e6c9f03ea0..c6bb83998e 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -510,7 +510,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
std::string subj;
std::string name;
U32 timestamp;
- BOOL has_attachment;
+ bool has_attachment;
U8 asset_type;
S32 i=0;
diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp
index 1e4f7024ec..307936b1d3 100644
--- a/indra/newview/llphysicsmotion.cpp
+++ b/indra/newview/llphysicsmotion.cpp
@@ -124,7 +124,7 @@ public:
~LLPhysicsMotion() {}
- BOOL onUpdate(F32 time);
+ bool onUpdate(F32 time);
LLPointer getJointState()
{
@@ -250,9 +250,9 @@ LLPhysicsMotionController::~LLPhysicsMotionController()
}
}
-BOOL LLPhysicsMotionController::onActivate()
-{
- return TRUE;
+bool LLPhysicsMotionController::onActivate()
+{
+ return true;
}
void LLPhysicsMotionController::onDeactivate()
@@ -451,7 +451,7 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local, const
return smoothed_acceleration_local;
}
-BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
+bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// Skip if disabled globally.
@@ -461,10 +461,10 @@ BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
if (!avatar_physics)
//
{
- return TRUE;
+ return true;
}
- BOOL update_visuals = FALSE;
+ bool update_visuals = false;
// Performance improvement
//for (motion_vec_t::iterator iter = mMotions.begin();
// iter != mMotions.end();
@@ -482,21 +482,21 @@ BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
if (update_visuals)
mCharacter->updateVisualParams();
- return TRUE;
+ return true;
}
// Return TRUE if character has to update visual params.
-BOOL LLPhysicsMotion::onUpdate(F32 time)
+bool LLPhysicsMotion::onUpdate(F32 time)
{
// static FILE *mFileWrite = fopen("c:\\temp\\avatar_data.txt","w");
if (!mParamDriver)
- return FALSE;
+ return false;
if (!mLastTime || mLastTime >= time)
{
mLastTime = time;
- return FALSE;
+ return false;
}
////////////////////////////////////////////////////////////////////////////////
@@ -509,7 +509,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
if (time_delta > 1.0)
{
mLastTime = time;
- return FALSE;
+ return false;
}
// Higher LOD is better. This controls the granularity
@@ -517,7 +517,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
const F32 lod_factor = LLVOAvatar::sPhysicsLODFactor;
if (lod_factor == 0)
{
- return TRUE;
+ return true;
}
LLJoint *joint = mJointState->getJoint();
@@ -530,7 +530,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
const F32 behavior_drag = getParamValue(DRAG);
F32 behavior_maxeffect = getParamValue(MAX_EFFECT);
- const BOOL physics_test = FALSE; // Enable this to simulate bouncing on all parts.
+ const BOOL physics_test = false; // Enable this to simulate bouncing on all parts.
if (physics_test)
behavior_maxeffect = 1.0f;
@@ -558,7 +558,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
// End velocity and acceleration
////////////////////////////////////////////////////////////////////////////////
- BOOL update_visuals = FALSE;
+ bool update_visuals = false;
// Break up the physics into a bunch of iterations so that differing framerates will show
// roughly the same behavior.
@@ -684,7 +684,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
{
// [Legacy Bake]
//mCharacter->setVisualParamWeight(driver_param, 0);
- mCharacter->setVisualParamWeight(driver_param, 0, FALSE);
+ mCharacter->setVisualParamWeight(driver_param, 0, false);
}
S32 num_driven = driver_param->getDrivenParamsCount();
for (S32 i = 0; i < num_driven; ++i)
@@ -719,7 +719,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
const F32 min_delta = (1.0001f-lod_factor)*0.4f;
if (llabs(position_diff_local) > min_delta)
{
- update_visuals = TRUE;
+ update_visuals = true;
mPositionLastUpdate_local = position_new_local;
}
}
@@ -786,5 +786,5 @@ void LLPhysicsMotion::setParamValue(const LLViewerVisualParam *param,
// [Legacy Bake]
//mCharacter->setVisualParamWeight(param, new_value_local);
- mCharacter->setVisualParamWeight(param, new_value_local, FALSE);
+ mCharacter->setVisualParamWeight(param, new_value_local, false);
}
diff --git a/indra/newview/llphysicsmotion.h b/indra/newview/llphysicsmotion.h
index a3b8e293f1..976f23cd44 100644
--- a/indra/newview/llphysicsmotion.h
+++ b/indra/newview/llphysicsmotion.h
@@ -93,12 +93,12 @@ public:
// called when a motion is activated
// must return TRUE to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate();
+ virtual bool onActivate();
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 448871644e..b250566b43 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -3202,11 +3202,11 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)
if(instance)
{
instance->mHaveRunningInfo = TRUE;
- BOOL running;
+ bool running;
msg->getBOOLFast(_PREHASH_Script, _PREHASH_Running, running);
LLCheckBoxCtrl* runningCheckbox = instance->getChild("running");
runningCheckbox->set(running);
- BOOL mono;
+ bool mono;
msg->getBOOLFast(_PREHASH_Script, "Mono", mono);
LLCheckBoxCtrl* monoCheckbox = instance->getChild("mono");
monoCheckbox->setEnabled(instance->getIsModifiable() && have_script_upload_cap(object_id));
diff --git a/indra/newview/llregioninfomodel.h b/indra/newview/llregioninfomodel.h
index baeff82fef..2aea654de7 100644
--- a/indra/newview/llregioninfomodel.h
+++ b/indra/newview/llregioninfomodel.h
@@ -70,7 +70,7 @@ public:
F32 mTerrainLowerLimit;
F32 mSunHour; // 6..30
- BOOL mUseEstateSun;
+ bool mUseEstateSun;
std::string mSimName;
std::string mSimType;
diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp
index 87c1330f8d..f10abbaa7c 100644
--- a/indra/newview/llscrollingpanelparam.cpp
+++ b/indra/newview/llscrollingpanelparam.cpp
@@ -268,7 +268,7 @@ void LLScrollingPanelParam::onHintHeldDown( LLVisualParamHint* hint )
{
// [Legacy Bake]
//mWearable->setVisualParamWeight( hint->getVisualParam()->getID(), new_weight);
- mWearable->setVisualParamWeight( hint->getVisualParam()->getID(), new_weight, FALSE);
+ mWearable->setVisualParamWeight( hint->getVisualParam()->getID(), new_weight, false);
mWearable->writeToAvatar(gAgentAvatarp);
gAgentAvatarp->updateVisualParams();
@@ -303,7 +303,7 @@ void LLScrollingPanelParam::onHintMinMouseUp( void* userdata )
{
// [Legacy Bake]
//self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight);
- self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight, FALSE);
+ self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight, false);
self->mWearable->writeToAvatar(gAgentAvatarp);
slider->setValue( self->weightToPercent( new_weight ) );
}
@@ -339,7 +339,7 @@ void LLScrollingPanelParam::onHintMaxMouseUp( void* userdata )
{
// [Legacy Bake]
//self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight);
- self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight, FALSE);
+ self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight, false);
self->mWearable->writeToAvatar(gAgentAvatarp);
slider->setValue( self->weightToPercent( new_weight ) );
}
diff --git a/indra/newview/llscrollingpanelparambase.cpp b/indra/newview/llscrollingpanelparambase.cpp
index 97ef946b56..670eb406cc 100644
--- a/indra/newview/llscrollingpanelparambase.cpp
+++ b/indra/newview/llscrollingpanelparambase.cpp
@@ -95,7 +95,7 @@ void LLScrollingPanelParamBase::onSliderMoved(LLUICtrl* ctrl, void* userdata)
{
// [Legacy Bake]
//self->mWearable->setVisualParamWeight( param->getID(), new_weight);
- self->mWearable->setVisualParamWeight( param->getID(), new_weight, FALSE);
+ self->mWearable->setVisualParamWeight( param->getID(), new_weight, false);
self->mWearable->writeToAvatar(gAgentAvatarp);
gAgentAvatarp->updateVisualParams();
}
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 3018b2f46e..86e6df6565 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -6221,7 +6221,7 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use
// static
void LLSelectMgr::processForceObjectSelect(LLMessageSystem* msg, void**)
{
- BOOL reset_list;
+ bool reset_list;
msg->getBOOL("Header", "ResetList", reset_list);
if (reset_list)
@@ -7065,14 +7065,14 @@ void LLSelectNode::saveTextureScaleRatios(LLRender::eTexIndex index_to_query)
BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const
{
// Extract ownership.
- BOOL object_is_group_owned = FALSE;
+ bool object_is_group_owned = false;
LLUUID object_owner_id;
mPermissions->getOwnership(object_owner_id, object_is_group_owned);
// Operations on invalid or public objects is not allowed.
if (!mObject || (mObject->isDead()) || !mPermissions->isOwned())
{
- return FALSE;
+ return false;
}
// The transfer permissions can never be given through proxy.
@@ -7082,7 +7082,7 @@ BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power)
if ( !object_is_group_owned
&& (gAgent.getID() == object_owner_id) )
{
- return TRUE;
+ return true;
}
else
{
@@ -7098,7 +7098,7 @@ BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power)
// no proxy allowed.
if (mObject->isAttachment() && object_owner_id != gAgent.getID())
{
- return FALSE;
+ return false;
}
}
@@ -7111,7 +7111,7 @@ BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power)
// Gods can always operate.
if (gAgent.isGodlike())
{
- return TRUE;
+ return true;
}
// Check if the agent is in the same group as the object.
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 4df80cb2b9..fb5ca2c3f4 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -227,8 +227,8 @@ void LLSettingsVOBase::updateInventoryItem(const LLSettingsBase::ptr_t &settings
if (settings->getFlag(LLSettingsBase::FLAG_NOTRANS) && new_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
{
LLPermissions perm(inv_item->getPermissions());
- perm.setBaseBits(LLUUID::null, FALSE, PERM_TRANSFER);
- perm.setOwnerBits(LLUUID::null, FALSE, PERM_TRANSFER);
+ perm.setBaseBits(LLUUID::null, false, PERM_TRANSFER);
+ perm.setOwnerBits(LLUUID::null, false, PERM_TRANSFER);
new_item->setPermissions(perm);
need_update |= true;
}
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 492a16f3a6..05ef79c217 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -1034,7 +1034,7 @@ void LLSidepanelItemInfo::updatePermissions()
LLViewerInventoryItem* item = findItem();
if(!item) return;
- BOOL is_group_owned;
+ bool is_group_owned;
LLUUID owner_id;
LLUUID group_id;
LLPermissions perm(item->getPermissions());
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index 08d5ff981b..c566ec8448 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -157,8 +157,8 @@ void LLVisualParamHint::preRender(BOOL clear_depth)
// [Legacy Bake]
//mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight);
//gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight);
- mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight, FALSE);
- gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight, FALSE);
+ mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight, false);
+ gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight, false);
// [Legacy Bake]
gAgentAvatarp->setVisualParamWeight("Blink_Left", 0.f);
gAgentAvatarp->setVisualParamWeight("Blink_Right", 0.f);
@@ -256,7 +256,7 @@ BOOL LLVisualParamHint::render()
gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight);
// [Legacy Bake]
//mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight);
- mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight, FALSE);
+ mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight, false);
LLViewerWearable* wearable = (LLViewerWearable*)mWearablePtr;
if (wearable)
{
diff --git a/indra/newview/llviewergesture.cpp b/indra/newview/llviewergesture.cpp
index 12e9abee5d..46b1c326ab 100644
--- a/indra/newview/llviewergesture.cpp
+++ b/indra/newview/llviewergesture.cpp
@@ -73,37 +73,37 @@ LLViewerGesture::LLViewerGesture(const LLViewerGesture &rhs)
{
}
-BOOL LLViewerGesture::trigger(KEY key, MASK mask)
+bool LLViewerGesture::trigger(KEY key, MASK mask)
{
if (mKey == key && mMask == mask)
{
- doTrigger( TRUE );
- return TRUE;
+ doTrigger( true );
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
-BOOL LLViewerGesture::trigger(const std::string &trigger_string)
+bool LLViewerGesture::trigger(const std::string &trigger_string)
{
// Assumes trigger_string is lowercase
if (mTriggerLower == trigger_string)
{
- doTrigger( FALSE );
- return TRUE;
+ doTrigger( false );
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
// private
-void LLViewerGesture::doTrigger( BOOL send_chat )
+void LLViewerGesture::doTrigger( bool send_chat )
{
if (mSoundItemID != LLUUID::null)
{
@@ -136,8 +136,8 @@ void LLViewerGesture::doTrigger( BOOL send_chat )
// with the gesture animation.
// [FS Communication UI]
//(LLFloaterReg::getTypedInstance("nearby_chat"))->
- // sendChatFromViewer(mOutputString, CHAT_TYPE_NORMAL, FALSE);
- FSNearbyChat::instance().sendChatFromViewer(mOutputString, CHAT_TYPE_NORMAL, FALSE);
+ // sendChatFromViewer(mOutputString, CHAT_TYPE_NORMAL, false);
+ FSNearbyChat::instance().sendChatFromViewer(mOutputString, CHAT_TYPE_NORMAL, false);
// [FS Communication UI]
}
}
@@ -146,7 +146,7 @@ void LLViewerGesture::doTrigger( BOOL send_chat )
LLViewerGestureList::LLViewerGestureList()
: LLGestureList()
{
- mIsLoaded = FALSE;
+ mIsLoaded = false;
}
@@ -160,7 +160,7 @@ LLGesture *LLViewerGestureList::create_gesture(U8 **buffer, S32 max_size)
// See if the prefix matches any gesture. If so, return TRUE
// and place the full text of the gesture trigger into
// output_str
-BOOL LLViewerGestureList::matchPrefix(const std::string& in_str, std::string* out_str)
+bool LLViewerGestureList::matchPrefix(const std::string& in_str, std::string* out_str)
{
S32 in_len = in_str.length();
@@ -183,10 +183,10 @@ BOOL LLViewerGestureList::matchPrefix(const std::string& in_str, std::string* ou
if (in_str_lc == trigger_trunc)
{
*out_str = trigger;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
diff --git a/indra/newview/llviewergesture.h b/indra/newview/llviewergesture.h
index 8b621850ea..fea0778b1c 100644
--- a/indra/newview/llviewergesture.h
+++ b/indra/newview/llviewergesture.h
@@ -46,12 +46,12 @@ public:
LLViewerGesture(const LLViewerGesture &gesture);
// Triggers if a key/mask matches it
- virtual BOOL trigger(KEY key, MASK mask);
+ virtual bool trigger(KEY key, MASK mask);
// Triggers if case-insensitive substring matches (assumes string is lowercase)
- virtual BOOL trigger(const std::string &string);
+ virtual bool trigger(const std::string &string);
- void doTrigger( BOOL send_chat );
+ void doTrigger( bool send_chat );
protected:
static const F32 SOUND_VOLUME;
@@ -63,14 +63,14 @@ public:
LLViewerGestureList();
//void requestFromServer();
- BOOL getIsLoaded() { return mIsLoaded; }
+ bool getIsLoaded() { return mIsLoaded; }
//void requestResetFromServer( BOOL is_male );
// See if the prefix matches any gesture. If so, return TRUE
// and place the full text of the gesture trigger into
// output_str
- BOOL matchPrefix(const std::string& in_str, std::string* out_str);
+ bool matchPrefix(const std::string& in_str, std::string* out_str);
static void xferCallback(void *data, S32 size, void** /*user_data*/, S32 status);
@@ -78,7 +78,7 @@ protected:
LLGesture *create_gesture(U8 **buffer, S32 max_size);
protected:
- BOOL mIsLoaded;
+ bool mIsLoaded;
};
extern LLViewerGestureList gGestureList;
diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp
index 9653e80b53..08b47d9df3 100644
--- a/indra/newview/llviewerjoint.cpp
+++ b/indra/newview/llviewerjoint.cpp
@@ -38,7 +38,7 @@
#include "llvoavatar.h"
#include "pipeline.h"
-static const S32 MIN_PIXEL_AREA_3PASS_HAIR = 64*64;
+static constexpr S32 MIN_PIXEL_AREA_3PASS_HAIR = 64*64;
//-----------------------------------------------------------------------------
// LLViewerJoint()
@@ -67,7 +67,7 @@ LLViewerJoint::~LLViewerJoint()
//--------------------------------------------------------------------
// render()
//--------------------------------------------------------------------
-U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
+U32 LLViewerJoint::render( F32 pixelArea, bool first_pass, bool is_dummy )
{
stop_glerror();
@@ -107,13 +107,13 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
// second pass writes to z buffer only
gGL.setColorMask(false, false);
{
- triangle_count += drawShape( pixelArea, FALSE, is_dummy );
+ triangle_count += drawShape( pixelArea, false, is_dummy );
}
// third past respects z buffer and writes color
gGL.setColorMask(true, false);
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
- triangle_count += drawShape( pixelArea, FALSE, is_dummy );
+ triangle_count += drawShape( pixelArea, false, is_dummy );
}
}
else
@@ -127,7 +127,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
// Render Outside (write to the Z buffer)
glCullFace(GL_BACK);
{
- triangle_count += drawShape( pixelArea, FALSE, is_dummy );
+ triangle_count += drawShape( pixelArea, false, is_dummy );
}
}
}
@@ -149,7 +149,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
F32 jointLOD = joint->getLOD();
if (pixelArea >= jointLOD || sDisableLOD)
{
- triangle_count += joint->render( pixelArea, TRUE, is_dummy );
+ triangle_count += joint->render( pixelArea, true, is_dummy );
if (jointLOD != DEFAULT_AVATAR_JOINT_LOD)
{
@@ -164,7 +164,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
//--------------------------------------------------------------------
// drawShape()
//--------------------------------------------------------------------
-U32 LLViewerJoint::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
+U32 LLViewerJoint::drawShape( F32 pixelArea, bool first_pass, bool is_dummy )
{
return 0;
}
diff --git a/indra/newview/llviewerjoint.h b/indra/newview/llviewerjoint.h
index abe11bbf5c..dec6b3d2a7 100644
--- a/indra/newview/llviewerjoint.h
+++ b/indra/newview/llviewerjoint.h
@@ -54,11 +54,11 @@ public:
// Traverses the entire joint hierarchy, setting up
// transforms and calling the drawShape().
// Derived classes may add text/graphic output.
- virtual U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ); // Returns triangle count
+ virtual U32 render( F32 pixelArea, bool first_pass = true, bool is_dummy = false ); // Returns triangle count
// Draws the shape attached to a joint.
// Called by render().
- virtual U32 drawShape( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE );
+ virtual U32 drawShape( F32 pixelArea, bool first_pass = true, bool is_dummy = false );
virtual void drawNormals() {}
};
diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp
index 3a472c94c8..148295e4e0 100644
--- a/indra/newview/llviewerjointattachment.cpp
+++ b/indra/newview/llviewerjointattachment.cpp
@@ -49,19 +49,19 @@
extern LLPipeline gPipeline;
// Moved to header file
-//const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters
+//constexpr F32 MAX_ATTACHMENT_DIST = 3.5f; // meters
//-----------------------------------------------------------------------------
// LLViewerJointAttachment()
//-----------------------------------------------------------------------------
LLViewerJointAttachment::LLViewerJointAttachment() :
- mVisibleInFirst(FALSE),
+ mVisibleInFirst(false),
mGroup(0),
- mIsHUDAttachment(FALSE),
+ mIsHUDAttachment(false),
mPieSlice(-1)
{
- mValid = FALSE;
- mUpdateXform = FALSE;
+ mValid = false;
+ mUpdateXform = false;
mAttachedObjects.clear();
}
@@ -75,15 +75,15 @@ LLViewerJointAttachment::~LLViewerJointAttachment()
//-----------------------------------------------------------------------------
// isTransparent()
//-----------------------------------------------------------------------------
-BOOL LLViewerJointAttachment::isTransparent()
+bool LLViewerJointAttachment::isTransparent()
{
- return FALSE;
+ return false;
}
//-----------------------------------------------------------------------------
// drawShape()
//-----------------------------------------------------------------------------
-U32 LLViewerJointAttachment::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
+U32 LLViewerJointAttachment::drawShape( F32 pixelArea, bool first_pass, bool is_dummy )
{
if (LLVOAvatar::sShowAttachmentPoints)
{
@@ -120,7 +120,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object)
return;
if (object->mDrawable->isActive())
{
- object->mDrawable->makeStatic(FALSE);
+ object->mDrawable->makeStatic(false);
}
object->mDrawable->mXform.setParent(getXform()); // LLViewerJointAttachment::lazyAttach
@@ -179,7 +179,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object)
//-----------------------------------------------------------------------------
// addObject()
//-----------------------------------------------------------------------------
-BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
+bool LLViewerJointAttachment::addObject(LLViewerObject* object)
{
// object->extractAttachmentItemID();
@@ -223,7 +223,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
//
// // If this happens to be attached to self, then detach.
// LLVOAvatarSelf::detachAttachmentIntoInventory(object->getAttachmentItemID());
-// return FALSE;
+// return false;
// }
mAttachedObjects.push_back(object);
@@ -233,7 +233,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
{
if (object->mText.notNull())
{
- object->mText->setOnHUDAttachment(TRUE);
+ object->mText->setOnHUDAttachment(true);
}
LLViewerObject::const_child_list_t& child_list = object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
@@ -242,14 +242,14 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
LLViewerObject* childp = *iter;
if (childp && childp->mText.notNull())
{
- childp->mText->setOnHUDAttachment(TRUE);
+ childp->mText->setOnHUDAttachment(true);
}
}
}
calcLOD();
- mUpdateXform = TRUE;
+ mUpdateXform = true;
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -275,7 +275,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
}
// force object visibile
- setAttachmentVisibility(TRUE);
+ setAttachmentVisibility(true);
mAttachedObjects.erase(iter);
if (object->mDrawable.notNull())
@@ -348,7 +348,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
}
if (mAttachedObjects.size() == 0)
{
- mUpdateXform = FALSE;
+ mUpdateXform = false;
}
object->setAttachmentItemID(LLUUID::null);
}
@@ -356,7 +356,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
//-----------------------------------------------------------------------------
// setAttachmentVisibility()
//-----------------------------------------------------------------------------
-void LLViewerJointAttachment::setAttachmentVisibility(BOOL visible)
+void LLViewerJointAttachment::setAttachmentVisibility(bool visible)
{
for (attachedobjs_vec_t::const_iterator iter = mAttachedObjects.begin();
iter != mAttachedObjects.end();
@@ -465,16 +465,16 @@ void LLViewerJointAttachment::calcLOD()
//-----------------------------------------------------------------------------
bool LLViewerJointAttachment::updateLOD(F32 pixel_area, bool activate)
{
- BOOL res = FALSE;
+ bool res{ false };
if (!mValid)
{
- setValid(TRUE, TRUE);
- res = TRUE;
+ setValid(true, true);
+ res = true;
}
return res;
}
-BOOL LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_object) const
+bool LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_object) const
{
for (attachedobjs_vec_t::const_iterator iter = mAttachedObjects.begin();
iter != mAttachedObjects.end();
@@ -483,10 +483,10 @@ BOOL LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_obje
const LLViewerObject* attached_object = iter->get();
if (attached_object == viewer_object)
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
const LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &object_id) const
@@ -504,7 +504,7 @@ const LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &o
return attached_object;
}
}
- return NULL;
+ return nullptr;
}
LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &object_id)
@@ -519,5 +519,5 @@ LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &object_
return attached_object;
}
}
- return NULL;
+ return nullptr;
}
diff --git a/indra/newview/llviewerjointattachment.h b/indra/newview/llviewerjointattachment.h
index f1303b7670..58356f75d0 100644
--- a/indra/newview/llviewerjointattachment.h
+++ b/indra/newview/llviewerjointattachment.h
@@ -38,7 +38,7 @@ class LLDrawable;
class LLViewerObject;
// Moved here to make it publically available
-const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters?
+constexpr F32 MAX_ATTACHMENT_DIST = 3.5f; // meters?
//-----------------------------------------------------------------------------
// class LLViewerJointAttachment
@@ -50,32 +50,30 @@ public:
LLViewerJointAttachment();
virtual ~LLViewerJointAttachment();
- //virtual U32 render( F32 pixelArea ); // Returns triangle count
-
// Returns true if this object is transparent.
// This is used to determine in which order to draw objects.
- /*virtual*/ BOOL isTransparent();
+ bool isTransparent() override;
// Draws the shape attached to a joint.
// Called by render().
- /*virtual*/ U32 drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy );
+ U32 drawShape( F32 pixelArea, bool first_pass, bool is_dummy ) override;
- /*virtual*/ bool updateLOD(F32 pixel_area, bool activate);
+ bool updateLOD(F32 pixel_area, bool activate) override;
//
// accessors
//
void setPieSlice(S32 pie_slice) { mPieSlice = pie_slice; }
- void setVisibleInFirstPerson(BOOL visibility) { mVisibleInFirst = visibility; }
- BOOL getVisibleInFirstPerson() const { return mVisibleInFirst; }
+ void setVisibleInFirstPerson(bool visibility) { mVisibleInFirst = visibility; }
+ bool getVisibleInFirstPerson() const { return mVisibleInFirst; }
void setGroup(S32 group) { mGroup = group; }
void setOriginalPosition(LLVector3 &position);
- void setAttachmentVisibility(BOOL visible);
- void setIsHUDAttachment(BOOL is_hud) { mIsHUDAttachment = is_hud; }
- BOOL getIsHUDAttachment() const { return mIsHUDAttachment; }
+ void setAttachmentVisibility(bool visible);
+ void setIsHUDAttachment(bool is_hud) { mIsHUDAttachment = is_hud; }
+ bool getIsHUDAttachment() const { return mIsHUDAttachment; }
- BOOL isAnimatable() const { return FALSE; }
+ bool isAnimatable() const override { return false; }
S32 getGroup() const { return mGroup; }
S32 getPieSlice() const { return mPieSlice; }
@@ -87,13 +85,13 @@ public:
//
// unique methods
//
- BOOL addObject(LLViewerObject* object);
+ bool addObject(LLViewerObject* object);
void removeObject(LLViewerObject *object);
//
// attachments operations
//
- BOOL isObjectAttached(const LLViewerObject *viewer_object) const;
+ bool isObjectAttached(const LLViewerObject *viewer_object) const;
const LLViewerObject *getAttachedObject(const LLUUID &object_id) const;
LLViewerObject *getAttachedObject(const LLUUID &object_id);
@@ -106,10 +104,10 @@ protected:
void setupDrawable(LLViewerObject *object);
private:
- BOOL mVisibleInFirst;
+ bool mVisibleInFirst;
LLVector3 mOriginalPos;
S32 mGroup;
- BOOL mIsHUDAttachment;
+ bool mIsHUDAttachment;
S32 mPieSlice;
};
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 53d356b4db..900f07bc59 100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -108,7 +108,7 @@ void LLViewerJointMesh::uploadJointMatrices()
S32 joint_num;
LLPolyMesh *reference_mesh = mMesh->getReferenceMesh();
LLDrawPool *poolp = mFace ? mFace->getPool() : NULL;
- BOOL hardware_skinning = (poolp && poolp->getShaderLevel() > 0) ? TRUE : FALSE;
+ bool hardware_skinning = (poolp && poolp->getShaderLevel() > 0);
//calculate joint matrices
for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.size(); joint_num++)
@@ -123,7 +123,7 @@ void LLViewerJointMesh::uploadJointMatrices()
gJointRotUnaligned[joint_num] = joint_mat.getMat3();
}
- BOOL last_pivot_uploaded = FALSE;
+ bool last_pivot_uploaded{ false };
S32 j = 0;
//upload joint pivots
@@ -144,11 +144,11 @@ void LLViewerJointMesh::uploadJointMatrices()
gJointPivot[j++] = child_pivot;
- last_pivot_uploaded = TRUE;
+ last_pivot_uploaded = true;
}
else
{
- last_pivot_uploaded = FALSE;
+ last_pivot_uploaded = false;
}
}
@@ -216,7 +216,7 @@ int compare_int(const void *a, const void *b)
//--------------------------------------------------------------------
// LLViewerJointMesh::drawShape()
//--------------------------------------------------------------------
-U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
+U32 LLViewerJointMesh::drawShape( F32 pixelArea, bool first_pass, bool is_dummy)
{
LL_PROFILE_ZONE_SCOPED;
if (!mValid || !mMesh || !mFace || !mVisible ||
@@ -347,7 +347,7 @@ void LLViewerJointMesh::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32
// updateFaceData()
//-----------------------------------------------------------------------------
-void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update)
+void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind, bool terse_update)
{
//IF THIS FUNCTION BREAKS, SEE LLPOLYMESH CONSTRUCTOR AND CHECK ALIGNMENT OF INPUT ARRAYS
@@ -359,7 +359,7 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_w
}
LLDrawPool *poolp = mFace->getPool();
- BOOL hardware_skinning = (poolp && poolp->getShaderLevel() > 0) ? TRUE : FALSE;
+ bool hardware_skinning = (poolp && poolp->getShaderLevel() > 0);
if (!hardware_skinning && terse_update)
{ //no need to do terse updates if we're doing software vertex skinning
diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h
index 1fe58c60ad..1b4fa397ac 100644
--- a/indra/newview/llviewerjointmesh.h
+++ b/indra/newview/llviewerjointmesh.h
@@ -54,19 +54,19 @@ public:
void uploadJointMatrices();
// overloaded from base class
- /*virtual*/ U32 drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy );
+ U32 drawShape( F32 pixelArea, bool first_pass, bool is_dummy ) override;
// necessary because MS's compiler warns on function inheritance via dominance in the diamond inheritance here.
// warns even though LLViewerJoint holds the only non virtual implementation.
- /*virtual*/ U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ) { return LLViewerJoint::render(pixelArea,first_pass,is_dummy);}
+ U32 render(F32 pixelArea, bool first_pass = true, bool is_dummy = false) override { return LLViewerJoint::render(pixelArea, first_pass, is_dummy); }
- /*virtual*/ void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area);
- /*virtual*/ void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE, bool terse_update = false);
- /*virtual*/ bool updateLOD(F32 pixel_area, bool activate);
- /*virtual*/ void updateJointGeometry();
- /*virtual*/ void dump();
+ void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area) override;
+ void updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind = false, bool terse_update = false) override;
+ bool updateLOD(F32 pixel_area, bool activate) override;
+ void updateJointGeometry() override;
+ void dump() override;
- /*virtual*/ BOOL isAnimatable() const { return FALSE; }
+ bool isAnimatable() const override { return false; }
private:
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index d89c7b4fac..004d748fda 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2668,7 +2668,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LL_PROFILE_ZONE_SCOPED;
LLUUID from_id;
- BOOL from_group;
+ bool from_group;
LLUUID to_id;
U8 offline;
U8 d = 0;
@@ -5448,7 +5448,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
LLVector3 sitPosition;
LLQuaternion sitRotation;
LLUUID sitObjectID;
- BOOL use_autopilot;
+ bool use_autopilot;
mesgsys->getUUIDFast(_PREHASH_SitObject, _PREHASH_ID, sitObjectID);
mesgsys->getBOOLFast(_PREHASH_SitTransform, _PREHASH_AutoPilot, use_autopilot);
mesgsys->getVector3Fast(_PREHASH_SitTransform, _PREHASH_SitPosition, sitPosition);
@@ -5457,7 +5457,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
mesgsys->getVector3Fast(_PREHASH_SitTransform, _PREHASH_CameraEyeOffset, camera_eye);
LLVector3 camera_at;
mesgsys->getVector3Fast(_PREHASH_SitTransform, _PREHASH_CameraAtOffset, camera_at);
- BOOL force_mouselook;
+ bool force_mouselook;
mesgsys->getBOOLFast(_PREHASH_SitTransform, _PREHASH_ForceMouselook, force_mouselook);
if (isAgentAvatarValid() && dist_vec_squared(camera_eye, camera_at) > CAMERA_POSITION_THRESHOLD_SQUARED)
@@ -5916,12 +5916,12 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
// and agent ids for name lookup.
S32 transaction_type = 0;
LLUUID source_id;
- BOOL is_source_group = FALSE;
+ bool is_source_group = false;
LLUUID dest_id;
- BOOL is_dest_group = FALSE;
+ bool is_dest_group = false;
S32 amount = 0;
std::string item_description;
- BOOL success = FALSE;
+ bool success = false;
// If we output to chat history and probably console,
// don't create an SLURL for the name or we will end
// up with a SLURL in the console
@@ -6680,7 +6680,7 @@ void process_agent_alert_message(LLMessageSystem* msgsystem, void** user_data)
if (!attempt_standard_notification(msgsystem))
{
- BOOL modal = FALSE;
+ bool modal = false;
msgsystem->getBOOL("AlertData", "Modal", modal);
process_alert_core(message, modal);
}
@@ -7068,7 +7068,7 @@ void process_frozen_message(LLMessageSystem *msgsystem, void **user_data)
// make sure the cursor is back to the usual default since the
// alert is probably due to some kind of error.
gViewerWindow->getWindow()->resetBusyCount();
- BOOL b_frozen;
+ bool b_frozen;
msgsystem->getBOOL("FrozenData", "Data", b_frozen);
@@ -8241,7 +8241,7 @@ void process_user_info_reply(LLMessageSystem* msg, void**)
}
// Keep this for OpenSim
- BOOL im_via_email = FALSE;
+ bool im_via_email{ false };
if (!LLGridManager::instance().isInSecondLife())
msg->getBOOLFast(_PREHASH_UserData, _PREHASH_IMViaEMail, im_via_email);
//
@@ -8499,7 +8499,7 @@ void process_load_url(LLMessageSystem* msg, void**)
{
LLUUID object_id;
LLUUID owner_id;
- BOOL owner_is_group;
+ bool owner_is_group;
char object_name[256]; /* Flawfinder: ignore */
char message[256]; /* Flawfinder: ignore */
char url[256]; /* Flawfinder: ignore */
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 8f675ee1ac..4ad209e4b1 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1586,13 +1586,13 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
{
S32 request_result;
S32 sequence_id;
- BOOL snap_selection = FALSE;
+ bool snap_selection = false;
S32 self_count = 0;
S32 other_count = 0;
S32 public_count = 0;
S32 local_id;
LLUUID owner_id;
- BOOL is_group_owned;
+ bool is_group_owned;
U32 auction_id = 0;
S32 claim_price_per_meter = 0;
S32 rent_price_per_meter = 0;
@@ -1611,15 +1611,15 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
S32 other_prims = 0;
S32 selected_prims = 0;
F32 parcel_prim_bonus = 1.f;
- BOOL region_push_override = false;
- BOOL region_deny_anonymous_override = false;
- BOOL region_deny_identified_override = false; // Deprecated
- BOOL region_deny_transacted_override = false; // Deprecated
- BOOL region_deny_age_unverified_override = false;
- BOOL region_allow_access_override = true;
- BOOL region_allow_environment_override = true;
+ bool region_push_override = false;
+ bool region_deny_anonymous_override = false;
+ bool region_deny_identified_override = false; // Deprecated
+ bool region_deny_transacted_override = false; // Deprecated
+ bool region_deny_age_unverified_override = false;
+ bool region_allow_access_override = true;
+ bool region_allow_environment_override = true;
S32 parcel_environment_version = 0;
- BOOL agent_parcel_update = false; // updating previous(existing) agent parcel
+ bool agent_parcel_update = false; // updating previous(existing) agent parcel
U32 extended_flags = 0; //obscure MOAP
S32 other_clean_time = 0;
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 080f213ddd..7a4613cf79 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -3103,7 +3103,7 @@ void LLViewerRegion::unpackRegionHandshake()
U8 sim_access;
std::string sim_name;
LLUUID sim_owner;
- BOOL is_estate_manager;
+ bool is_estate_manager;
F32 water_height;
F32 billable_factor;
LLUUID cache_id;
diff --git a/indra/newview/llviewertexlayer.cpp b/indra/newview/llviewertexlayer.cpp
index fea5d122a0..413152069c 100644
--- a/indra/newview/llviewertexlayer.cpp
+++ b/indra/newview/llviewertexlayer.cpp
@@ -61,12 +61,12 @@ LLViewerTexLayerSetBuffer::LLViewerTexLayerSetBuffer(LLTexLayerSet* const owner,
LLTexLayerSetBuffer(owner),
LLViewerDynamicTexture(width, height, 4, LLViewerDynamicTexture::ORDER_LAST, FALSE),
// [Legacy Bake]
- mUploadPending(FALSE), // Not used for any logic here, just to sync sending of updates
- mNeedsUpload(FALSE),
+ mUploadPending(false), // Not used for any logic here, just to sync sending of updates
+ mNeedsUpload(false),
mNumLowresUploads(0),
mUploadFailCount(0),
// [Legacy Bake]
- mNeedsUpdate(TRUE),
+ mNeedsUpdate(true),
mNumLowresUpdates(0)
{
mGLTexturep->setNeedsAlphaAndPickMask(FALSE);
@@ -114,7 +114,7 @@ void LLViewerTexLayerSetBuffer::dumpTotalByteCount()
void LLViewerTexLayerSetBuffer::requestUpdate()
{
restartUpdateTimer();
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
mNumLowresUpdates = 0;
// [Legacy Bake]
// If we're in the middle of uploading a baked texture, we don't care about it any more.
@@ -136,8 +136,8 @@ BOOL LLViewerTexLayerSetBuffer::needsRender()
if (!isAgentAvatarValid()) return FALSE;
// [Legacy Bake]
- const BOOL upload_now = mNeedsUpload && isReadyToUpload();
- const BOOL update_now = mNeedsUpdate && isReadyToUpdate();
+ const bool upload_now = mNeedsUpload && isReadyToUpload();
+ const bool update_now = mNeedsUpdate && isReadyToUpdate();
// Don't render if we don't want to (or aren't ready to) update.
// [Legacy Bake]
@@ -176,7 +176,7 @@ void LLViewerTexLayerSetBuffer::preRenderTexLayerSet()
}
// virtual
-void LLViewerTexLayerSetBuffer::postRenderTexLayerSet(BOOL success)
+void LLViewerTexLayerSetBuffer::postRenderTexLayerSet(bool success)
{
LLTexLayerSetBuffer::postRenderTexLayerSet(success);
@@ -186,15 +186,15 @@ void LLViewerTexLayerSetBuffer::postRenderTexLayerSet(BOOL success)
// virtual
// [Legacy Bake]
//void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(BOOL success)
-void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(BOOL success, LLRenderTarget* bound_target)
+void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(bool success, LLRenderTarget* bound_target)
// [Legacy Bake]
{
// [Legacy Bake]
// do we need to upload, and do we have sufficient data to create an uploadable composite?
// TODO: When do we upload the texture if gAgent.mNumPendingQueries is non-zero?
- const BOOL upload_now = mNeedsUpload && isReadyToUpload();
+ const bool upload_now = mNeedsUpload && isReadyToUpload();
// [Legacy Bake]
- const BOOL update_now = mNeedsUpdate && isReadyToUpdate();
+ const bool update_now = mNeedsUpdate && isReadyToUpdate();
// [Legacy Bake]
if(upload_now)
@@ -202,7 +202,7 @@ void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(BOOL success, LLRenderTarge
if (!success)
{
LL_INFOS() << "Failed attempt to bake " << mTexLayerSet->getBodyRegionName() << LL_ENDL;
- mUploadPending = FALSE;
+ mUploadPending = false;
}
else
{
@@ -210,12 +210,12 @@ void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(BOOL success, LLRenderTarge
if (layer_set->isVisible())
{
// OpenSim BOM fallback
- // layer_set->getAvatar()->debugBakedTextureUpload(layer_set->getBakedTexIndex(), FALSE); // FALSE for start of upload, TRUE for finish.
+ // layer_set->getAvatar()->debugBakedTextureUpload(layer_set->getBakedTexIndex(), false); // FALSE for start of upload, TRUE for finish.
//doUpload(bound_target);
auto bakedTexIdx = layer_set->getBakedTexIndex();
if(bakedTexIdx <= layer_set->getAvatar()->getNumBakes())
{
- layer_set->getAvatar()->debugBakedTextureUpload(bakedTexIdx, FALSE); // FALSE for start of upload, TRUE for finish.
+ layer_set->getAvatar()->debugBakedTextureUpload(bakedTexIdx, false); // FALSE for start of upload, TRUE for finish.
doUpload(bound_target);
}
else
@@ -226,8 +226,8 @@ void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(BOOL success, LLRenderTarge
}
else
{
- mUploadPending = FALSE;
- mNeedsUpload = FALSE;
+ mUploadPending = false;
+ mNeedsUpload = false;
mNeedsUploadTimer.pause();
layer_set->getAvatar()->setNewBakedTexture(layer_set->getBakedTexIndex(),IMG_INVISIBLE);
}
@@ -417,14 +417,14 @@ const std::string LLViewerTexLayerSetBuffer::dumpTextureInfo() const
if (!isAgentAvatarValid()) return "";
// [Legacy Bake]
- //const BOOL is_high_res = TRUE;
+ //const bool is_high_res = TRUE;
//const U32 num_low_res = 0;
//const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(getViewerTexLayerSet());
//std::string text = llformat("[HiRes:%d LoRes:%d] %s",
// is_high_res, num_low_res,
// local_texture_info.c_str());
- const BOOL is_high_res = !mNeedsUpload;
+ const bool is_high_res = !mNeedsUpload;
const U32 num_low_res = mNumLowresUploads;
const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32();
const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(getViewerTexLayerSet());
@@ -465,9 +465,9 @@ LLBakedUploadData::LLBakedUploadData(const LLVOAvatarSelf* avatar,
void LLViewerTexLayerSetBuffer::requestUpload()
{
conditionalRestartUploadTimer();
- mNeedsUpload = TRUE;
+ mNeedsUpload = true;
mNumLowresUploads = 0;
- mUploadPending = TRUE;
+ mUploadPending = true;
}
void LLViewerTexLayerSetBuffer::conditionalRestartUploadTimer()
@@ -488,39 +488,39 @@ void LLViewerTexLayerSetBuffer::conditionalRestartUploadTimer()
void LLViewerTexLayerSetBuffer::cancelUpload()
{
- mNeedsUpload = FALSE;
- mUploadPending = FALSE;
+ mNeedsUpload = false;
+ mUploadPending = false;
mNeedsUploadTimer.pause();
mUploadRetryTimer.reset();
}
-BOOL LLViewerTexLayerSetBuffer::uploadPending() const
+bool LLViewerTexLayerSetBuffer::uploadPending() const
{
return mUploadPending;
}
-BOOL LLViewerTexLayerSetBuffer::uploadNeeded() const
+bool LLViewerTexLayerSetBuffer::uploadNeeded() const
{
return mNeedsUpload;
}
-BOOL LLViewerTexLayerSetBuffer::uploadInProgress() const
+bool LLViewerTexLayerSetBuffer::uploadInProgress() const
{
return !mUploadID.isNull();
}
-BOOL LLViewerTexLayerSetBuffer::isReadyToUpload() const
+bool LLViewerTexLayerSetBuffer::isReadyToUpload() const
{
- if (!gAgentQueryManager.hasNoPendingQueries()) return FALSE; // Can't upload if there are pending queries.
- if (isAgentAvatarValid() && gAgentAvatarp->isEditingAppearance()) return FALSE; // Don't upload if avatar is being edited.
+ if (!gAgentQueryManager.hasNoPendingQueries()) return false; // Can't upload if there are pending queries.
+ if (isAgentAvatarValid() && gAgentAvatarp->isEditingAppearance()) return false; // Don't upload if avatar is being edited.
- BOOL ready = FALSE;
+ bool ready{ false };
if (getViewerTexLayerSet()->isLocalTextureDataFinal())
{
// If we requested an upload and have the final LOD ready, upload (or wait a while if this is a retry)
if (mUploadFailCount == 0)
{
- ready = TRUE;
+ ready = true;
}
else
{
@@ -539,8 +539,8 @@ BOOL LLViewerTexLayerSetBuffer::isReadyToUpload() const
const U32 texture_timeout_threshold = texture_timeout*(1 << mNumLowresUploads);
// If we hit our timeout and have textures available at even lower resolution, then upload.
- const BOOL is_upload_textures_timeout = mNeedsUploadTimer.getElapsedTimeF32() >= texture_timeout_threshold;
- const BOOL has_lower_lod = getViewerTexLayerSet()->isLocalTextureDataAvailable();
+ const bool is_upload_textures_timeout = mNeedsUploadTimer.getElapsedTimeF32() >= texture_timeout_threshold;
+ const bool has_lower_lod = getViewerTexLayerSet()->isLocalTextureDataAvailable();
ready = has_lower_lod && is_upload_textures_timeout;
}
}
@@ -586,15 +586,15 @@ public:
LL_INFOS() << "result: " << ll_pretty_print_sd( aResult ) << " new_id: " << newAssetId << LL_ENDL;
if (result == "complete"
- && mBakdedUploadData != NULL)
+ && mBakdedUploadData != nullptr)
{// Invoke
LLViewerTexLayerSetBuffer::onTextureUploadComplete(newAssetId, (void*) mBakdedUploadData, 0, LLExtStat::NONE);
- mBakdedUploadData = NULL;// deleted in onTextureUploadComplete()
+ mBakdedUploadData = nullptr;// deleted in onTextureUploadComplete()
}
else
{// Invoke the original callback with an error result
LLViewerTexLayerSetBuffer::onTextureUploadComplete(newAssetId, (void*) mBakdedUploadData, -1, LLExtStat::NONE);
- mBakdedUploadData = NULL;// deleted in onTextureUploadComplete()
+ mBakdedUploadData = nullptr;// deleted in onTextureUploadComplete()
}
}
else
@@ -602,7 +602,7 @@ public:
LL_WARNS() << "Uploading baked texture resulted in http " << status.getType() << ll_pretty_print_sd( aResult ) << LL_ENDL;
// Invoke the original callback with an error result
LLViewerTexLayerSetBuffer::onTextureUploadComplete(LLUUID(), (void*) mBakdedUploadData, -1, LLExtStat::NONE);
- mBakdedUploadData = NULL;// deleted in onTextureUploadComplete()
+ mBakdedUploadData = nullptr;// deleted in onTextureUploadComplete()
}
return newAssetId;
@@ -664,7 +664,7 @@ void LLViewerTexLayerSetBuffer::doUpload(LLRenderTarget* bound_target)
if (up_file.write(compressedImage->getData(), compressedImage->getDataSize()))
{
// Read back the file and validate.
- BOOL valid = FALSE;
+ bool valid{ false };
LLPointer integrity_test = new LLImageJ2C;
S32 file_size = 0;
LLFileSystem file(asset_id, LLAssetType::AT_TEXTURE);
@@ -713,9 +713,9 @@ void LLViewerTexLayerSetBuffer::doUpload(LLRenderTarget* bound_target)
LLAssetType::AT_TEXTURE,
LLViewerTexLayerSetBuffer::onTextureUploadComplete,
baked_upload_data,
- TRUE, // temp_file
- TRUE, // is_priority
- TRUE); // store_local
+ true, // temp_file
+ true, // is_priority
+ true); // store_local
LL_INFOS() << "Baked texture upload via Asset Store." << LL_ENDL;
}
@@ -723,7 +723,7 @@ void LLViewerTexLayerSetBuffer::doUpload(LLRenderTarget* bound_target)
{
// Sending the final LOD for the baked texture. All done, pause
// the upload timer so we know how long it took.
- mNeedsUpload = FALSE;
+ mNeedsUpload = false;
mNeedsUploadTimer.pause();
}
else
@@ -750,7 +750,7 @@ void LLViewerTexLayerSetBuffer::doUpload(LLRenderTarget* bound_target)
else
{
// The read back and validate operation failed. Remove the uploaded file.
- mUploadPending = FALSE;
+ mUploadPending = false;
LLFileSystem::removeFile(asset_id, LLAssetType::AT_TEXTURE);
LL_INFOS() << "Unable to create baked upload file (reason: corrupted)." << LL_ENDL;
}
@@ -759,7 +759,7 @@ void LLViewerTexLayerSetBuffer::doUpload(LLRenderTarget* bound_target)
else
{
// The VFS write file operation failed.
- mUploadPending = FALSE;
+ mUploadPending = false;
LL_INFOS() << "Unable to create baked upload file (reason: failed to write file)" << LL_ENDL;
}
@@ -802,7 +802,7 @@ void LLViewerTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid,
const std::string resolution = baked_upload_data->mIsHighestRes ? " full res " : " low res ";
if (result >= 0)
{
- layerset_buffer->mUploadPending = FALSE; // Allows sending of AgentSetAppearance later
+ layerset_buffer->mUploadPending = false; // Allows sending of AgentSetAppearance later
LLAvatarAppearanceDefines::ETextureIndex baked_te = gAgentAvatarp->getBakedTE(layerset_buffer->getViewerTexLayerSet());
// Update baked texture info with the new UUID
U64 now = LLFrameTimer::getTotalTime(); // Record starting time
diff --git a/indra/newview/llviewertexlayer.h b/indra/newview/llviewertexlayer.h
index c1a5dd6cdb..7eecea32e3 100644
--- a/indra/newview/llviewertexlayer.h
+++ b/indra/newview/llviewertexlayer.h
@@ -100,10 +100,10 @@ private:
//--------------------------------------------------------------------
virtual void preRenderTexLayerSet();
// [Legacy Bake]
- //virtual void midRenderTexLayerSet(BOOL success);
- virtual void midRenderTexLayerSet(BOOL success, LLRenderTarget* bound_target);
+ //virtual void midRenderTexLayerSet(bool success);
+ virtual void midRenderTexLayerSet(bool success, LLRenderTarget* bound_target);
// [Legacy Bake]
- virtual void postRenderTexLayerSet(BOOL success);
+ virtual void postRenderTexLayerSet(bool success);
virtual S32 getCompositeOriginX() const { return getOriginX(); }
virtual S32 getCompositeOriginY() const { return getOriginY(); }
virtual S32 getCompositeWidth() const { return getFullWidth(); }
@@ -127,20 +127,20 @@ protected:
public:
void requestUpload();
void cancelUpload();
- BOOL uploadNeeded() const; // We need to upload a new texture
- BOOL uploadInProgress() const; // We have started uploading a new texture and are awaiting the result
- BOOL uploadPending() const; // We are expecting a new texture to be uploaded at some point
+ bool uploadNeeded() const; // We need to upload a new texture
+ bool uploadInProgress() const; // We have started uploading a new texture and are awaiting the result
+ bool uploadPending() const; // We are expecting a new texture to be uploaded at some point
static void onTextureUploadComplete(const LLUUID& uuid,
void* userdata,
S32 result, LLExtStat ext_status);
protected:
- BOOL isReadyToUpload() const;
+ bool isReadyToUpload() const;
void doUpload(LLRenderTarget* bound_target); // Does a read back and upload.
void conditionalRestartUploadTimer();
private:
- BOOL mNeedsUpload; // Whether we need to send our baked textures to the server
+ bool mNeedsUpload; // Whether we need to send our baked textures to the server
U32 mNumLowresUploads; // Number of times we've sent a lowres version of our baked textures to the server
- BOOL mUploadPending; // Whether we have received back the new baked textures
+ bool mUploadPending; // Whether we have received back the new baked textures
LLUUID mUploadID; // The current upload process (null if none).
LLFrameTimer mNeedsUploadTimer; // Tracks time since upload was requested and performed.
S32 mUploadFailCount; // Number of consecutive upload failures
@@ -158,7 +158,7 @@ protected:
void doUpdate();
void restartUpdateTimer();
private:
- BOOL mNeedsUpdate; // Whether we need to locally update our baked textures
+ bool mNeedsUpdate; // Whether we need to locally update our baked textures
U32 mNumLowresUpdates; // Number of times we've locally updated with lowres version of our baked textures
LLFrameTimer mNeedsUpdateTimer; // Tracks time since update was requested and performed.
};
diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp
index 958eefdaf9..00da2094ff 100644
--- a/indra/newview/llviewerwearable.cpp
+++ b/indra/newview/llviewerwearable.cpp
@@ -275,7 +275,7 @@ void LLViewerWearable::setParamsToDefaults()
{
// [Legacy Bake]
//setVisualParamWeight(param->getID(),param->getDefaultWeight());
- setVisualParamWeight(param->getID(),param->getDefaultWeight(), FALSE);
+ setVisualParamWeight(param->getID(),param->getDefaultWeight(), false);
}
}
}
@@ -362,7 +362,7 @@ void LLViewerWearable::writeToAvatar(LLAvatarAppearance *avatarp)
{
// [Legacy Bake]
//viewer_avatar->updateSexDependentLayerSets();
- viewer_avatar->updateSexDependentLayerSets(FALSE);
+ viewer_avatar->updateSexDependentLayerSets(false);
}
}
@@ -371,7 +371,7 @@ void LLViewerWearable::writeToAvatar(LLAvatarAppearance *avatarp)
// static
// [Legacy Bake]
//void LLViewerWearable::removeFromAvatar( LLWearableType::EType type)
-void LLViewerWearable::removeFromAvatar( LLWearableType::EType type, BOOL upload_bake)
+void LLViewerWearable::removeFromAvatar( LLWearableType::EType type, bool upload_bake)
{
if (!isAgentAvatarValid()) return;
@@ -404,7 +404,7 @@ void LLViewerWearable::removeFromAvatar( LLWearableType::EType type, BOOL upload
gAgentAvatarp->updateVisualParams();
// [Legacy Bake]
//gAgentAvatarp->wearableUpdated(type);
- gAgentAvatarp->wearableUpdated(type, FALSE);
+ gAgentAvatarp->wearableUpdated(type, false);
}
// Does not copy mAssetID.
diff --git a/indra/newview/llviewerwearable.h b/indra/newview/llviewerwearable.h
index 6bf3e9a765..c6b9207fd5 100644
--- a/indra/newview/llviewerwearable.h
+++ b/indra/newview/llviewerwearable.h
@@ -65,8 +65,8 @@ public:
// [Legacy Bake]
//void removeFromAvatar() { LLViewerWearable::removeFromAvatar( mType); }
//static void removeFromAvatar( LLWearableType::EType type);
- void removeFromAvatar( BOOL upload_bake ) { LLViewerWearable::removeFromAvatar( mType, upload_bake ); }
- static void removeFromAvatar( LLWearableType::EType type, BOOL upload_bake );
+ void removeFromAvatar( bool upload_bake ) { LLViewerWearable::removeFromAvatar( mType, upload_bake ); }
+ static void removeFromAvatar( LLWearableType::EType type, bool upload_bake );
// [Legacy Bake]
/*virtual*/ EImportResult importStream( std::istream& input_stream, LLAvatarAppearance* avatarp );
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 08a40b0823..adcdbd8d6e 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -350,12 +350,12 @@ public:
// called when a motion is activated
// must return TRUE to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate() { return TRUE; }
+ virtual bool onActivate() { return true; }
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask)
+ virtual bool onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
F32 nx[2];
@@ -373,7 +373,7 @@ public:
tQn.setQuat( rx, ry, 0.0f );
mTorsoState->setRotation( tQn );
- return TRUE;
+ return true;
}
// called when a motion is deactivated
@@ -471,12 +471,12 @@ public:
// called when a motion is activated
// must return TRUE to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate() { return TRUE; }
+ virtual bool onActivate() { return true; }
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask)
+ virtual bool onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
mBreatheRate = 1.f;
@@ -485,7 +485,7 @@ public:
mChestState->setRotation(LLQuaternion(breathe_amt, LLVector3(0.f, 1.f, 0.f)));
- return TRUE;
+ return true;
}
// called when a motion is deactivated
@@ -573,17 +573,17 @@ public:
// called when a motion is activated
// must return TRUE to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate() { return TRUE; }
+ virtual bool onActivate() { return true; }
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask)
+ virtual bool onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
mPelvisState->setPosition(LLVector3::zero);
- return TRUE;
+ return true;
}
// called when a motion is deactivated
@@ -718,7 +718,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mIsEditingAppearance(FALSE),
mUseLocalAppearance(FALSE),
// [Legacy Bake]
- mUseServerBakes(FALSE),
+ mUseServerBakes(false),
// [Legacy Bake]
mLastUpdateRequestCOFVersion(-1),
mLastUpdateReceivedCOFVersion(-1),
@@ -1167,7 +1167,7 @@ void LLVOAvatar::restoreGL()
{
// [Legacy Bake]
//gAgentAvatarp->invalidateComposite(gAgentAvatarp->getTexLayerSet(i));
- gAgentAvatarp->invalidateComposite(gAgentAvatarp->getTexLayerSet(i), FALSE);
+ gAgentAvatarp->invalidateComposite(gAgentAvatarp->getTexLayerSet(i), false);
}
gAgentAvatarp->updateMeshTextures();
}
@@ -2239,7 +2239,7 @@ void LLVOAvatar::applyDefaultParams()
F32 newWeight = U8_to_F32(value, param->getMinWeight(), param->getMaxWeight());
// [Legacy Bake]
//param->setWeight(newWeight);
- param->setWeight(newWeight, FALSE); // Most likely FALSE is correct here because it's used in resetSkeleton, which is a local operation
+ param->setWeight(newWeight, false); // Most likely FALSE is correct here because it's used in resetSkeleton, which is a local operation
}
}
@@ -2647,7 +2647,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU
LL_DEBUGS("Avatar") << avString() << "get old-bake image from host " << uuid << LL_ENDL;
LLHost host = getObjectHost();
result = LLViewerTextureManager::getFetchedTexture(
- uuid, FTT_HOST_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host);
+ uuid, FTT_HOST_BAKE, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host);
// [Legacy Bake]
}
LL_DEBUGS("Avatar") << avString() << "get server-bake image from URL " << url << LL_ENDL;
@@ -2968,8 +2968,8 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
// [Legacy Bake]
//if( mOohMorph ) mOohMorph->setWeight(mOohMorph->getMinWeight());
//if( mAahMorph ) mAahMorph->setWeight(mAahMorph->getMinWeight());
- if( mOohMorph ) mOohMorph->setWeight(mOohMorph->getMinWeight(), FALSE);
- if( mAahMorph ) mAahMorph->setWeight(mAahMorph->getMinWeight(), FALSE);
+ if( mOohMorph ) mOohMorph->setWeight(mOohMorph->getMinWeight(), false);
+ if( mAahMorph ) mAahMorph->setWeight(mAahMorph->getMinWeight(), false);
// [Legacy Bake]
mLipSyncActive = false;
@@ -3203,7 +3203,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
{
// [Legacy Bake]
//param->stopAnimating();
- param->stopAnimating(FALSE);
+ param->stopAnimating(false);
}
}
updateVisualParams();
@@ -3230,7 +3230,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
{
// [Legacy Bake]
//param->animate(morph_amt);
- param->animate(morph_amt, FALSE);
+ param->animate(morph_amt, false);
}
}
}
@@ -3288,7 +3288,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
// [Legacy Bake]
//mOohMorph->setWeight( ooh_weight);
- mOohMorph->setWeight( ooh_weight, FALSE);
+ mOohMorph->setWeight( ooh_weight, false);
}
if( mAahMorph )
@@ -3298,7 +3298,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
// [Legacy Bake]
//mAahMorph->setWeight( aah_weight);
- mAahMorph->setWeight( aah_weight, FALSE);
+ mAahMorph->setWeight( aah_weight, false);
}
mLipSyncActive = true;
@@ -6795,7 +6795,7 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
// id is the asset if of the animation to start
// time_offset is the offset into the animation at which to start playing
//-----------------------------------------------------------------------------
-BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
+bool LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
{
LL_DEBUGS("Motion") << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
@@ -6841,7 +6841,7 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
//-----------------------------------------------------------------------------
// stopMotion()
//-----------------------------------------------------------------------------
-BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)
+bool LLVOAvatar::stopMotion(const LLUUID& id, bool stop_immediate)
{
LL_DEBUGS("Motion") << "Motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
@@ -8027,7 +8027,7 @@ BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable)
// invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet);
// invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet);
//}
-void LLVOAvatar::updateSexDependentLayerSets(BOOL upload_bake)
+void LLVOAvatar::updateSexDependentLayerSets(bool upload_bake)
{
invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake);
invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, upload_bake);
@@ -8864,7 +8864,7 @@ LLViewerObject * LLVOAvatar::findAttachmentByID( const LLUUID & target_id ) cons
// virtual
// [Legacy Bake]
//void LLVOAvatar::invalidateComposite( LLTexLayerSet* layerset)
-void LLVOAvatar::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_result)
+void LLVOAvatar::invalidateComposite( LLTexLayerSet* layerset, bool upload_result)
{
}
@@ -8875,7 +8875,7 @@ void LLVOAvatar::invalidateAll()
// virtual
// [Legacy Bake]
//void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color)
-void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake)
+void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, bool upload_bake)
{
if (global_color == mTexSkinColor)
{
@@ -9132,7 +9132,7 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse
record["grid_y"] = LLSD::Integer(grid_y);
// [Legacy Bake]
//record["is_using_server_bakes"] = true;
- record["is_using_server_bakes"] = ((bool) isUsingServerBakes());
+ record["is_using_server_bakes"] = isUsingServerBakes();
record["is_self"] = isSelf();
if (isAgentAvatarValid())
@@ -10624,14 +10624,14 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
//LL_DEBUGS("Avatar") << "param slam " << i << " " << newWeight << LL_ENDL;
// [Legacy Bake]
//param->setWeight(newWeight);
- param->setWeight(newWeight, FALSE);
+ param->setWeight(newWeight, false);
}
else
{
interp_params = TRUE;
// [Legacy Bake]
//param->setAnimationTarget(newWeight);
- param->setAnimationTarget(newWeight, FALSE);
+ param->setAnimationTarget(newWeight, false);
}
}
}
@@ -10656,7 +10656,7 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
{
// [Legacy Bake]
//updateSexDependentLayerSets();
- updateSexDependentLayerSets(FALSE);
+ updateSexDependentLayerSets(false);
}
}
@@ -12834,14 +12834,14 @@ void LLVOAvatar::bodySizeChanged()
}
}
-BOOL LLVOAvatar::isUsingServerBakes() const
+bool LLVOAvatar::isUsingServerBakes() const
{
#if 1
// Sanity check - visual param for appearance version should match mUseServerBakes
LLVisualParam* appearance_version_param = getVisualParam(11000);
llassert(appearance_version_param);
F32 wt = appearance_version_param->getWeight();
- F32 expect_wt = mUseServerBakes ? 1.0 : 0.0;
+ F32 expect_wt = mUseServerBakes ? 1.0f : 0.0f;
if (!is_approx_equal(wt,expect_wt))
{
LL_WARNS() << "wt " << wt << " differs from expected " << expect_wt << LL_ENDL;
@@ -12851,11 +12851,11 @@ BOOL LLVOAvatar::isUsingServerBakes() const
return mUseServerBakes;
}
-void LLVOAvatar::setIsUsingServerBakes(BOOL newval)
+void LLVOAvatar::setIsUsingServerBakes(bool newval)
{
mUseServerBakes = newval;
LLVisualParam* appearance_version_param = getVisualParam(11000);
llassert(appearance_version_param);
- appearance_version_param->setWeight(newval ? 1.0 : 0.0, false);
+ appearance_version_param->setWeight(newval ? 1.0f : 0.0f, false);
}
// [Legacy Bake]
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index e6da66429c..fe0cdec7b9 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -193,8 +193,8 @@ public:
/*virtual*/ LLVector3 getCharacterAngularVelocity();
/*virtual*/ LLUUID remapMotionID(const LLUUID& id);
- /*virtual*/ BOOL startMotion(const LLUUID& id, F32 time_offset = 0.f);
- /*virtual*/ BOOL stopMotion(const LLUUID& id, BOOL stop_immediate = FALSE);
+ /*virtual*/ bool startMotion(const LLUUID& id, F32 time_offset = 0.f);
+ /*virtual*/ bool stopMotion(const LLUUID& id, bool stop_immediate = FALSE);
virtual bool hasMotionFromSource(const LLUUID& source_id);
virtual void stopMotionFromSource(const LLUUID& source_id);
virtual void requestStopMotion(LLMotion* motion);
@@ -624,7 +624,7 @@ public:
public:
// [Legacy Bake]
///*virtual*/void onGlobalColorChanged(const LLTexGlobalColor* global_color);
- /*virtual*/void onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake);
+ /*virtual*/void onGlobalColorChanged(const LLTexGlobalColor* global_color, bool upload_bake);
//--------------------------------------------------------------------
// Visibility
@@ -794,7 +794,7 @@ protected:
public:
// [Legacy Bake]
//virtual void invalidateComposite(LLTexLayerSet* layerset);
- virtual void invalidateComposite(LLTexLayerSet* layerset, BOOL upload_result);
+ virtual void invalidateComposite(LLTexLayerSet* layerset, bool upload_result);
virtual void invalidateAll();
virtual void setCompositeUpdatesEnabled(bool b) {}
virtual void setCompositeUpdatesEnabled(U32 index, bool b) {}
@@ -830,7 +830,7 @@ public:
virtual void updateMeshTextures();
// [Legacy Bake]
//void updateSexDependentLayerSets();
- void updateSexDependentLayerSets(BOOL upload_bake);
+ void updateSexDependentLayerSets(bool upload_bake);
virtual void dirtyMesh(); // Dirty the avatar mesh
void updateMeshData();
void updateMeshVisibility();
@@ -915,14 +915,14 @@ public:
// [Legacy Bake]
// True if this avatar should fetch its baked textures via the new
// appearance mechanism.
- BOOL isUsingServerBakes() const;
- void setIsUsingServerBakes(BOOL newval);
+ bool isUsingServerBakes() const;
+ void setIsUsingServerBakes(bool newval);
// [Legacy Bake]
// True if we are currently in appearance editing mode. Often but
// not always the same as isUsingLocalAppearance().
/*virtual*/ bool isEditingAppearance() const { return mIsEditingAppearance; }
- void setIsEditingAppearance(BOOL editing) { mIsEditingAppearance = editing; } // for Built-in Posestand
+ void setIsEditingAppearance(bool editing) { mIsEditingAppearance = editing; } // for Built-in Posestand
// FIXME review isUsingLocalAppearance uses, some should be isEditing instead.
@@ -933,7 +933,7 @@ private:
bool mIsEditingAppearance; // flag for if we're actively in appearance editing mode
BOOL mUseLocalAppearance; // flag for if we're using a local composite
// [Legacy Bake]
- BOOL mUseServerBakes; // flag for if baked textures should be fetched from baking service (false if they're temporary uploads)
+ bool mUseServerBakes; // flag for if baked textures should be fetched from baking service (false if they're temporary uploads)
//--------------------------------------------------------------------
// Visibility
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 136d6aa61e..eff772f935 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1069,12 +1069,12 @@ LLJoint *LLVOAvatarSelf::getJoint( const JointKey &name )
// virtual
// [Legacy Bake]
-//BOOL LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight)
-BOOL LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight, BOOL upload_bake)
+//bool LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight)
+bool LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight, bool upload_bake)
{
if (!which_param)
{
- return FALSE;
+ return false;
}
LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(which_param->getID());
// [Legacy Bake]
@@ -1084,12 +1084,12 @@ BOOL LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32
// virtual
// [Legacy Bake]
-//BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight)
-BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake)
+//bool LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight)
+bool LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight, bool upload_bake)
{
if (!param_name)
{
- return FALSE;
+ return false;
}
LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(param_name);
// [Legacy Bake]
@@ -1099,8 +1099,8 @@ BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight, BO
// virtual
// [Legacy Bake]
-//BOOL LLVOAvatarSelf::setVisualParamWeight(const LLViewerVisualParam *param, F32 weight)
-BOOL LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake)
+//bool LLVOAvatarSelf::setVisualParamWeight(const LLViewerVisualParam *param, F32 weight)
+bool LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight, bool upload_bake)
{
LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(index);
// [Legacy Bake]
@@ -1109,12 +1109,12 @@ BOOL LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bak
}
// [Legacy Bake]
-//BOOL LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight)
-BOOL LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight, BOOL upload_bake)
+//bool LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight)
+bool LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight, bool upload_bake)
{
if (!param)
{
- return FALSE;
+ return false;
}
if (param->getCrossWearable())
@@ -1163,7 +1163,7 @@ void LLVOAvatarSelf::idleUpdateAppearanceAnimation()
// Animate all top-level wearable visual parameters
// [Legacy Bake]
//gAgentWearables.animateAllWearableParams(calcMorphAmount());
- gAgentWearables.animateAllWearableParams(calcMorphAmount(), FALSE);
+ gAgentWearables.animateAllWearableParams(calcMorphAmount(), false);
// Apply wearable visual params to avatar
writeWearablesToAvatar();
@@ -1259,7 +1259,7 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
layerset->setUpdatesEnabled(TRUE);
// [Legacy Bake]
//invalidateComposite(layerset);
- invalidateComposite(layerset, FALSE);
+ invalidateComposite(layerset, false);
}
updateMeshTextures();
// [Legacy Bake]
@@ -1511,7 +1511,7 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode)
//-----------------------------------------------------------------------------
// [Legacy Bake]
//void LLVOAvatarSelf::wearableUpdated(LLWearableType::EType type)
-void LLVOAvatarSelf::wearableUpdated(LLWearableType::EType type, BOOL upload_result)
+void LLVOAvatarSelf::wearableUpdated(LLWearableType::EType type, bool upload_result)
{
for (LLAvatarAppearanceDictionary::BakedTextures::const_iterator baked_iter = sAvatarDictionary->getBakedTextures().begin();
baked_iter != sAvatarDictionary->getBakedTextures().end();
@@ -2140,7 +2140,7 @@ bool LLVOAvatarSelf::areTexturesCurrent() const
// [Legacy Bake]
//void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset)
-void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_result)
+void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, bool upload_result)
{
LLViewerTexLayerSet *layer_set = dynamic_cast(layerset);
if( !layer_set || !layer_set->getUpdatesEnabled() )
@@ -2172,7 +2172,7 @@ void LLVOAvatarSelf::invalidateAll()
LLViewerTexLayerSet *layerset = getTexLayerSet(i);
// [Legacy Bake]
//invalidateComposite(layerset);
- invalidateComposite(layerset, TRUE);
+ invalidateComposite(layerset, true);
}
//mDebugSelfLoadTimer.reset();
}
@@ -3189,7 +3189,7 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug)
// [Legacy Bake]
//invalidateComposite(layer_set);
- invalidateComposite(layer_set, TRUE);
+ invalidateComposite(layer_set, true);
add(LLStatViewer::TEX_REBAKES, 1);
}
else
@@ -3552,12 +3552,12 @@ U32 LLVOAvatarSelf::processUpdateMessage(LLMessageSystem *mesgsys,
return retval;
}
-BOOL LLVOAvatarSelf::isBakedTextureFinal(const LLAvatarAppearanceDefines::EBakedTextureIndex index) const
+bool LLVOAvatarSelf::isBakedTextureFinal(const LLAvatarAppearanceDefines::EBakedTextureIndex index) const
{
const LLViewerTexLayerSet *layerset = getLayerSet(index);
- if (!layerset) return FALSE;
+ if (!layerset) return false;
const LLViewerTexLayerSetBuffer *layerset_buffer = layerset->getViewerComposite();
- if (!layerset_buffer) return FALSE;
+ if (!layerset_buffer) return false;
return !layerset_buffer->uploadNeeded();
}
@@ -3673,7 +3673,7 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearance::getDictionary()->getTexture(te);
if (texture_dict->mIsBakedTexture)
{
- debugBakedTextureUpload(texture_dict->mBakedTextureIndex, TRUE); // FALSE for start of upload, TRUE for finish.
+ debugBakedTextureUpload(texture_dict->mBakedTextureIndex, true); // FALSE for start of upload, TRUE for finish.
LL_INFOS() << "New baked texture: " << texture_dict->mName << " UUID: " << uuid <invalidateComposite(layer_set, TRUE);
- found = TRUE;
+ gAgentAvatarp->invalidateComposite(layer_set, true);
+ found = true;
add(LLStatViewer::TEX_REBAKES, 1);
}
}
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 752ddac029..12b6f5a0d1 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -97,12 +97,12 @@ public:
//
// [Legacy Bake]
- ///*virtual*/ BOOL setVisualParamWeight(const LLVisualParam *which_param, F32 weight);
- ///*virtual*/ BOOL setVisualParamWeight(const char* param_name, F32 weight);
- ///*virtual*/ BOOL setVisualParamWeight(S32 index, F32 weight);
- /*virtual*/ BOOL setVisualParamWeight(const LLVisualParam *which_param, F32 weight, BOOL upload_bake = FALSE);
- /*virtual*/ BOOL setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake = FALSE);
- /*virtual*/ BOOL setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake = FALSE);
+ ///*virtual*/ bool setVisualParamWeight(const LLVisualParam *which_param, F32 weight);
+ ///*virtual*/ bool setVisualParamWeight(const char* param_name, F32 weight);
+ ///*virtual*/ bool setVisualParamWeight(S32 index, F32 weight);
+ /*virtual*/ bool setVisualParamWeight(const LLVisualParam *which_param, F32 weight, bool upload_bake = false);
+ /*virtual*/ bool setVisualParamWeight(const char* param_name, F32 weight, bool upload_bake = false);
+ /*virtual*/ bool setVisualParamWeight(S32 index, F32 weight, bool upload_bake = false);
// [Legacy Bake]
/*virtual*/ void updateVisualParams();
void writeWearablesToAvatar();
@@ -120,7 +120,7 @@ private:
// helper function. Passed in param is assumed to be in avatar's parameter list.
// [Legacy Bake]
//BOOL setParamWeight(const LLViewerVisualParam *param, F32 weight);
- BOOL setParamWeight(const LLViewerVisualParam *param, F32 weight, BOOL upload_bake = FALSE);
+ bool setParamWeight(const LLViewerVisualParam *param, F32 weight, bool upload_bake = false);
/********************************************************************************
** **
@@ -208,7 +208,7 @@ public:
BOOL isLocalTextureDataAvailable(const LLViewerTexLayerSet* layerset) const;
BOOL isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset) const;
// [Legacy Bake]
- BOOL isBakedTextureFinal(const LLAvatarAppearanceDefines::EBakedTextureIndex index) const;
+ bool isBakedTextureFinal(const LLAvatarAppearanceDefines::EBakedTextureIndex index) const;
// If you want to check all textures of a given type, pass gAgentWearables.getWearableCount() for index
/*virtual*/ bool isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const;
/*virtual*/ BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const;
@@ -273,7 +273,7 @@ public:
public:
// [Legacy Bake]
///* virtual */ void invalidateComposite(LLTexLayerSet* layerset);
- /* virtual */ void invalidateComposite(LLTexLayerSet* layerset, BOOL upload_result);
+ /* virtual */ void invalidateComposite(LLTexLayerSet* layerset, bool upload_result);
/* virtual */ void invalidateAll();
/* virtual */ void setCompositeUpdatesEnabled(bool b); // only works for self
/* virtual */ void setCompositeUpdatesEnabled(U32 index, bool b);
@@ -317,7 +317,7 @@ protected:
public:
// [Legacy Bake]
//void wearableUpdated(LLWearableType::EType type);
- void wearableUpdated(LLWearableType::EType type, BOOL upload_result);
+ void wearableUpdated(LLWearableType::EType type, bool upload_result);
protected:
U32 getNumWearables(LLAvatarAppearanceDefines::ETextureIndex i) const;
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index cca8b047d8..c437643617 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -137,7 +137,7 @@ void LLVOGrass::initClass()
// FIRE-7802: Grass and tree selection in build tool
std::string name;
- BOOL success = TRUE;
+ bool success{ true };
S32 species;
static LLStdStringHandle species_id_string = LLXmlTree::addAttributeString("species_id");
@@ -198,7 +198,7 @@ void LLVOGrass::initClass()
}
}
- BOOL have_all_grass = TRUE;
+ bool have_all_grass{ true };
std::string err;
for (S32 i=0;i FIRE-7802: Grass and tree selection in build tool
std::string name;
- BOOL success = TRUE;
-
-
-
+ bool success{ true };
S32 species;
static LLStdStringHandle species_id_string = LLXmlTree::addAttributeString("species_id");
if (!tree_def->getFastAttributeS32(species_id_string, species))
@@ -261,7 +258,7 @@ void LLVOTree::initClass()
}
}
- BOOL have_all_trees = TRUE;
+ bool have_all_trees {true};
std::string err;
for (S32 i=0;i
-#include "macmain.h"
-
-resource 'MBAR' (rMenuBar, preload) {
- { /* array MenuArray: 3 elements */
- /* [1] */
- 128,
- /* [2] */
- 129,
- /* [3] */
- 130
- }
-};
-
-resource 'MENU' (mApple, preload) {
- 128,
- textMenuProc,
- 0x7FFFFFFD,
- enabled,
- apple,
- { /* array: 2 elements */
- /* [1] */
- "About Second Life", noIcon, noKey, noMark, plain,
- /* [2] */
- "-", noIcon, noKey, noMark, plain
- }
-};
-
-resource 'MENU' (mFile, preload) {
- 129,
- textMenuProc,
- 0x1400,
- enabled,
- "File",
- { /* array: 11 elements */
- /* [1] */
- "New", noIcon, "N", noMark, plain,
- /* [2] */
- "Open", noIcon, "O", noMark, plain,
- /* [3] */
- "-", noIcon, noKey, noMark, plain,
- /* [4] */
- "Close", noIcon, "W", noMark, plain,
- /* [5] */
- "Save", noIcon, "S", noMark, plain,
- /* [6] */
- "Save AsÉ", noIcon, noKey, noMark, plain,
- /* [7] */
- "-", noIcon, noKey, noMark, plain,
- /* [8] */
- "Page SetupÉ", noIcon, noKey, noMark, plain,
- /* [9] */
- "PrintÉ", noIcon, noKey, noMark, plain,
- /* [10] */
- "-", noIcon, noKey, noMark, plain,
- /* [11] */
- "Quit", noIcon, "Q", noMark, plain
- }
-};
-
-resource 'MENU' (mEdit, preload) {
- 130,
- textMenuProc,
- 0x0,
- enabled,
- "Edit",
- { /* array: 6 elements */
- /* [1] */
- "Undo", noIcon, "Z", noMark, plain,
- /* [2] */
- "-", noIcon, noKey, noMark, plain,
- /* [3] */
- "Cut", noIcon, "X", noMark, plain,
- /* [4] */
- "Copy", noIcon, "C", noMark, plain,
- /* [5] */
- "Paste", noIcon, "V", noMark, plain,
- /* [6] */
- "Clear", noIcon, noKey, noMark, plain
- }
-};
-
-resource 'DITL' (kAboutBox) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {16, 21, 38, 208},
- StaticText {
- disabled,
- "Hello hello hello..."
- },
- /* [2] */
- {116, 287, 136, 345},
- Button {
- enabled,
- "OK"
- },
- /* [3] */
- {54, 139, 74, 197},
- Button {
- enabled,
- "OK"
- }
- }
-};
-
-resource 'ALRT' (kAboutBox) {
- {40, 40, 139, 280},
- 200,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, sound1,
- /* [2] */
- OK, visible, sound1,
- /* [3] */
- OK, visible, sound1,
- /* [4] */
- OK, visible, sound1
- },
- noAutoCenter
-};
-
diff --git a/indra/newview/rlvextensions.cpp b/indra/newview/rlvextensions.cpp
index faffcd5bb3..d91d2e6ec0 100644
--- a/indra/newview/rlvextensions.cpp
+++ b/indra/newview/rlvextensions.cpp
@@ -217,7 +217,7 @@ ERlvCmdRet RlvExtGetSet::onSetDebug(std::string strSetting, const std::string& s
LLControlVariable* pSetting = gSavedSettings.getControl(strSetting);
if (pSetting)
{
- U32 u32Value; S32 s32Value; BOOL fValue;
+ U32 u32Value; S32 s32Value; bool fValue;
switch (pSetting->type())
{
case TYPE_U32:
@@ -265,7 +265,7 @@ ERlvCmdRet RlvExtGetSet::onSetPseudoDebug(const std::string& strSetting, const s
ERlvCmdRet eRet = RLV_RET_FAILED_OPTION;
if ("AvatarSex" == strSetting)
{
- BOOL fValue;
+ bool fValue;
if (LLStringUtil::convertToBOOL(strValue, fValue))
{
m_PseudoDebug[strSetting] = strValue;