diff options
Diffstat (limited to 'indra')
57 files changed, 515 insertions, 515 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 18b03c1f89..1dbca29a86 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -84,13 +84,13 @@ public: std::for_each(mChildren.begin(), mChildren.end(), DeletePointer()); mChildren.clear(); } - BOOL parseXml(LLXmlTreeNode* node); + bool parseXml(LLXmlTreeNode* node); private: std::string mName; std::string mSupport; std::string mAliases; - BOOL mIsJoint; + bool mIsJoint; LLVector3 mPos; LLVector3 mEnd; LLVector3 mRot; @@ -115,7 +115,7 @@ public: std::for_each(mBoneInfoList.begin(), mBoneInfoList.end(), DeletePointer()); mBoneInfoList.clear(); } - BOOL parseXml(LLXmlTreeNode* node); + bool parseXml(LLXmlTreeNode* node); S32 getNumBones() const { return mNumBones; } S32 getNumCollisionVolumes() const { return mNumCollisionVolumes; } @@ -345,7 +345,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; @@ -575,17 +575,17 @@ void LLAvatarAppearance::computeBodySize() //----------------------------------------------------------------------------- // parseSkeletonFile() //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename, LLXmlTree& skeleton_xml_tree) +bool LLAvatarAppearance::parseSkeletonFile(const std::string& filename, LLXmlTree& skeleton_xml_tree) { //------------------------------------------------------------------------- // parse the file //------------------------------------------------------------------------- - BOOL parsesuccess = skeleton_xml_tree.parseFile( filename, FALSE ); + bool parsesuccess = skeleton_xml_tree.parseFile( filename, FALSE ); if (!parsesuccess) { LL_ERRS() << "Can't parse skeleton file: " << filename << LL_ENDL; - return FALSE; + return false; } // now sanity check xml file @@ -593,13 +593,13 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename, LLXmlTre if (!root) { LL_ERRS() << "No root node found in avatar skeleton file: " << filename << LL_ENDL; - return FALSE; + return false; } if( !root->hasName( "linden_skeleton" ) ) { LL_ERRS() << "Invalid avatar skeleton file header: " << filename << LL_ENDL; - return FALSE; + return false; } std::string version; @@ -607,16 +607,16 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename, LLXmlTre if( !root->getFastAttributeString( version_string, version ) || ((version != "1.0") && (version != "2.0"))) { LL_ERRS() << "Invalid avatar skeleton file version: " << version << " in file: " << filename << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } //----------------------------------------------------------------------------- // setupBone() //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &volume_num, S32 &joint_num) +bool LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &volume_num, S32 &joint_num) { LLJoint* joint = NULL; @@ -632,7 +632,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent if (!joint) { LL_WARNS() << "Too many bones" << LL_ENDL; - return FALSE; + return false; } joint->setName( info->mName ); } @@ -641,7 +641,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent if (volume_num >= (S32)mNumCollisionVolumes) { LL_WARNS() << "Too many collision volumes" << LL_ENDL; - return FALSE; + return false; } joint = (&mCollisionVolumes[volume_num]); joint->setName( info->mName ); @@ -681,17 +681,17 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent { if (!setupBone(child_info, joint, volume_num, joint_num)) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- // allocateCharacterJoints() //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::allocateCharacterJoints( U32 num ) +bool LLAvatarAppearance::allocateCharacterJoints( U32 num ) { if (mSkeleton.size() != num) { @@ -700,14 +700,14 @@ BOOL LLAvatarAppearance::allocateCharacterJoints( U32 num ) mNumBones = num; } - return TRUE; + return true; } //----------------------------------------------------------------------------- // buildSkeleton() //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) +bool LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) { LL_DEBUGS("BVH") << "numBones " << info->mNumBones << " numCollisionVolumes " << info->mNumCollisionVolumes << LL_ENDL; @@ -715,7 +715,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) if (!allocateCharacterJoints(info->mNumBones)) { LL_ERRS() << "Can't allocate " << info->mNumBones << " joints" << LL_ENDL; - return FALSE; + return false; } // allocate volumes @@ -724,7 +724,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) if (!allocateCollisionVolumes(info->mNumCollisionVolumes)) { LL_ERRS() << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << LL_ENDL; - return FALSE; + return false; } } @@ -735,11 +735,11 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) if (!setupBone(bone_info, NULL, current_volume_num, current_joint_num)) { LL_ERRS() << "Error parsing bone in skeleton file" << LL_ENDL; - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -822,7 +822,7 @@ void LLAvatarAppearance::buildCharacter() //------------------------------------------------------------------------- LLTimer timer; - BOOL status = loadAvatar(); + bool status = loadAvatar(); stop_glerror(); // gPrintMessagesThisFrame = TRUE; @@ -900,7 +900,7 @@ void LLAvatarAppearance::buildCharacter() } -BOOL LLAvatarAppearance::loadAvatar() +bool LLAvatarAppearance::loadAvatar() { // LL_RECORD_BLOCK_TIME(FTM_LOAD_AVATAR); @@ -908,7 +908,7 @@ BOOL LLAvatarAppearance::loadAvatar() if( !buildSkeleton(sAvatarSkeletonInfo) ) { LL_ERRS() << "avatar file: buildSkeleton() failed" << LL_ENDL; - return FALSE; + return false; } // initialize mJointAliasMap @@ -918,14 +918,14 @@ BOOL LLAvatarAppearance::loadAvatar() if( !loadSkeletonNode() ) { LL_ERRS() << "avatar file: loadNodeSkeleton() failed" << LL_ENDL; - return FALSE; + return false; } // avatar_lad.xml : <mesh> if( !loadMeshNodes() ) { LL_ERRS() << "avatar file: loadNodeMesh() failed" << LL_ENDL; - return FALSE; + return false; } // avatar_lad.xml : <global_color> @@ -935,13 +935,13 @@ BOOL LLAvatarAppearance::loadAvatar() if( !mTexSkinColor->setInfo( sAvatarXmlInfo->mTexSkinColorInfo ) ) { LL_ERRS() << "avatar file: mTexSkinColor->setInfo() failed" << LL_ENDL; - return FALSE; + return false; } } else { LL_ERRS() << "<global_color> name=\"skin_color\" not found" << LL_ENDL; - return FALSE; + return false; } if( sAvatarXmlInfo->mTexHairColorInfo ) { @@ -949,13 +949,13 @@ BOOL LLAvatarAppearance::loadAvatar() if( !mTexHairColor->setInfo( sAvatarXmlInfo->mTexHairColorInfo ) ) { LL_ERRS() << "avatar file: mTexHairColor->setInfo() failed" << LL_ENDL; - return FALSE; + return false; } } else { LL_ERRS() << "<global_color> name=\"hair_color\" not found" << LL_ENDL; - return FALSE; + return false; } if( sAvatarXmlInfo->mTexEyeColorInfo ) { @@ -963,26 +963,26 @@ BOOL LLAvatarAppearance::loadAvatar() if( !mTexEyeColor->setInfo( sAvatarXmlInfo->mTexEyeColorInfo ) ) { LL_ERRS() << "avatar file: mTexEyeColor->setInfo() failed" << LL_ENDL; - return FALSE; + return false; } } else { LL_ERRS() << "<global_color> name=\"eye_color\" not found" << LL_ENDL; - return FALSE; + return false; } // avatar_lad.xml : <layer_set> if (sAvatarXmlInfo->mLayerInfoList.empty()) { LL_ERRS() << "avatar file: missing <layer_set> node" << LL_ENDL; - return FALSE; + return false; } if (sAvatarXmlInfo->mMorphMaskInfoList.empty()) { LL_ERRS() << "avatar file: missing <morph_masks> node" << LL_ENDL; - return FALSE; + return false; } // avatar_lad.xml : <morph_masks> @@ -996,7 +996,7 @@ BOOL LLAvatarAppearance::loadAvatar() morph_param = getVisualParam(name->c_str()); if (morph_param) { - BOOL invert = info->mInvert; + bool invert = info->mInvert; addMaskedMorph(baked, morph_param, invert, info->mLayer); } } @@ -1024,17 +1024,17 @@ BOOL LLAvatarAppearance::loadAvatar() { delete driver_param; LL_WARNS() << "avatar file: driver_param->parseData() failed" << LL_ENDL; - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- // loadSkeletonNode(): loads <skeleton> node from XML tree //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::loadSkeletonNode () +bool LLAvatarAppearance::loadSkeletonNode () { mRoot->addChild( mSkeleton[0] ); @@ -1078,7 +1078,7 @@ BOOL LLAvatarAppearance::loadSkeletonNode () if (!param->setInfo(info)) { delete param; - return FALSE; + return false; } else { @@ -1089,13 +1089,13 @@ BOOL LLAvatarAppearance::loadSkeletonNode () } - return TRUE; + return true; } //----------------------------------------------------------------------------- // loadMeshNodes(): loads <mesh> nodes from XML tree //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::loadMeshNodes() +bool LLAvatarAppearance::loadMeshNodes() { for (const LLAvatarXmlInfo::LLAvatarMeshInfo* info : sAvatarXmlInfo->mMeshInfoList) { @@ -1104,7 +1104,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,13 +1131,13 @@ BOOL LLAvatarAppearance::loadMeshNodes() else { LL_WARNS() << "Avatar file: <mesh> has invalid lod setting " << lod << LL_ENDL; - return FALSE; + return false; } } else { LL_WARNS() << "Ignoring unrecognized mesh type: " << type << LL_ENDL; - return FALSE; + return false; } // LL_INFOS() << "Parsing mesh data for " << type << "..." << LL_ENDL; @@ -1160,7 +1160,7 @@ BOOL LLAvatarAppearance::loadMeshNodes() { // This should never happen LL_WARNS("Avatar") << "Could not find avatar mesh: " << info->mReferenceMeshName << LL_ENDL; - return FALSE; + return false; } } else @@ -1172,7 +1172,7 @@ BOOL LLAvatarAppearance::loadMeshNodes() if( !poly_mesh ) { LL_WARNS() << "Failed to load mesh of type " << type << LL_ENDL; - return FALSE; + return false; } // Multimap insert @@ -1187,7 +1187,7 @@ BOOL LLAvatarAppearance::loadMeshNodes() if (!param->setInfo((LLPolyMorphTargetInfo*)info_pair.first)) { delete param; - return FALSE; + return false; } else { @@ -1205,15 +1205,15 @@ BOOL LLAvatarAppearance::loadMeshNodes() } } - return TRUE; + return true; } //----------------------------------------------------------------------------- // loadLayerSets() //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::loadLayersets() +bool LLAvatarAppearance::loadLayersets() { - BOOL success = TRUE; + bool success = true; for (LLTexLayerSetInfo* layerset_info : sAvatarXmlInfo->mLayerInfoList) { if (isSelf()) @@ -1226,7 +1226,7 @@ BOOL LLAvatarAppearance::loadLayersets() stop_glerror(); delete layer_set; LL_WARNS() << "avatar file: layer_set->setInfo() failed" << LL_ENDL; - return FALSE; + return false; } // scan baked textures and associate the layerset with the appropriate one @@ -1248,7 +1248,7 @@ BOOL LLAvatarAppearance::loadLayersets() { LL_WARNS() << "<layer_set> has invalid body_region attribute" << LL_ENDL; delete layer_set; - return FALSE; + return false; } // scan morph masks and let any affected layers know they have an associated morph @@ -1355,19 +1355,19 @@ LLPolyMesh* LLAvatarAppearance::getUpperBodyMesh() // virtual -BOOL LLAvatarAppearance::isValid() const +bool LLAvatarAppearance::isValid() const { // This should only be called on ourself. if (!isSelf()) { LL_ERRS() << "Called LLAvatarAppearance::isValid() on when isSelf() == false" << LL_ENDL; } - return TRUE; + return true; } // adds a morph mask to the appropriate baked texture structure -void LLAvatarAppearance::addMaskedMorph(EBakedTextureIndex index, LLVisualParam* morph_target, BOOL invert, std::string layer) +void LLAvatarAppearance::addMaskedMorph(EBakedTextureIndex index, LLVisualParam* morph_target, bool invert, std::string layer) { if (index < BAKED_NUM_INDICES) { @@ -1378,7 +1378,7 @@ void LLAvatarAppearance::addMaskedMorph(EBakedTextureIndex index, LLVisualParam* //static -BOOL LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name ) +bool LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name ) { switch( te ) { @@ -1462,10 +1462,10 @@ BOOL LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name ) default: llassert(0); - return FALSE; + return false; } - return TRUE; + return true; } void LLAvatarAppearance::setClothesColor( ETextureIndex te, const LLColor4& new_color) @@ -1521,7 +1521,7 @@ LLColor4 LLAvatarAppearance::getGlobalColor( const std::string& color_name ) con // Unlike most wearable functions, this works for both self and other. // virtual -BOOL LLAvatarAppearance::isWearingWearableType(LLWearableType::EType type) const +bool LLAvatarAppearance::isWearingWearableType(LLWearableType::EType type) const { return mWearableData->getWearableCount(type) > 0; } @@ -1538,7 +1538,7 @@ LLTexLayerSet* LLAvatarAppearance::getAvatarLayerSet(EBakedTextureIndex baked_in //----------------------------------------------------------------------------- // allocateCollisionVolumes() //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num ) +bool LLAvatarAppearance::allocateCollisionVolumes( U32 num ) { if (mNumCollisionVolumes !=num) { @@ -1549,18 +1549,18 @@ BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num ) if (!mCollisionVolumes) { LL_WARNS() << "Failed to allocate collision volumes" << LL_ENDL; - return FALSE; + return false; } mNumCollisionVolumes = num; } - return TRUE; + return true; } //----------------------------------------------------------------------------- // LLAvatarBoneInfo::parseXml() //----------------------------------------------------------------------------- -BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) +bool LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) { if (node->hasName("bone")) { @@ -1569,7 +1569,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) if (!node->getFastAttributeString(name_string, mName)) { LL_WARNS() << "Bone without name" << LL_ENDL; - return FALSE; + return false; } static LLStdStringHandle aliases_string = LLXmlTree::addAttributeString("aliases"); @@ -1587,28 +1587,28 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) else { LL_WARNS() << "Invalid node " << node->getName() << LL_ENDL; - return FALSE; + return false; } static LLStdStringHandle pos_string = LLXmlTree::addAttributeString("pos"); if (!node->getFastAttributeVector3(pos_string, mPos)) { LL_WARNS() << "Bone without position" << LL_ENDL; - return FALSE; + return false; } static LLStdStringHandle rot_string = LLXmlTree::addAttributeString("rot"); if (!node->getFastAttributeVector3(rot_string, mRot)) { LL_WARNS() << "Bone without rotation" << LL_ENDL; - return FALSE; + return false; } static LLStdStringHandle scale_string = LLXmlTree::addAttributeString("scale"); if (!node->getFastAttributeVector3(scale_string, mScale)) { LL_WARNS() << "Bone without scale" << LL_ENDL; - return FALSE; + return false; } static LLStdStringHandle end_string = LLXmlTree::addAttributeString("end"); @@ -1631,7 +1631,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) if (!node->getFastAttributeVector3(pivot_string, mPivot)) { LL_WARNS() << "Bone without pivot" << LL_ENDL; - return FALSE; + return false; } } @@ -1643,23 +1643,23 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) if (!child_info->parseXml(child)) { delete child_info; - return FALSE; + return false; } mChildren.push_back(child_info); } - return TRUE; + return true; } //----------------------------------------------------------------------------- // LLAvatarSkeletonInfo::parseXml() //----------------------------------------------------------------------------- -BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node) +bool LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node) { static LLStdStringHandle num_bones_string = LLXmlTree::addAttributeString("num_bones"); if (!node->getFastAttributeS32(num_bones_string, mNumBones)) { LL_WARNS() << "Couldn't find number of bones." << LL_ENDL; - return FALSE; + return false; } static LLStdStringHandle num_collision_volumes_string = LLXmlTree::addAttributeString("num_collision_volumes"); @@ -1673,11 +1673,11 @@ BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node) { delete info; LL_WARNS() << "Error parsing bone in skeleton file" << LL_ENDL; - return FALSE; + return false; } mBoneInfoList.push_back(info); } - return TRUE; + return true; } //Make aliases for joint and push to map. @@ -1745,13 +1745,13 @@ const LLAvatarAppearance::joint_alias_map_t& LLAvatarAppearance::getJointAliases //----------------------------------------------------------------------------- // parseXmlSkeletonNode(): parses <skeleton> nodes from XML tree //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* root) +bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* root) { LLXmlTreeNode* node = root->getChildByName( "skeleton" ); if( !node ) { LL_WARNS() << "avatar file: missing <skeleton>" << LL_ENDL; - return FALSE; + return false; } LLXmlTreeNode* child; @@ -1771,14 +1771,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro { LL_WARNS() << "Unknown param type." << LL_ENDL; } - return FALSE; + return false; } LLPolySkeletalDistortionInfo *info = new LLPolySkeletalDistortionInfo; if (!info->parseXml(child)) { delete info; - return FALSE; + return false; } mSkeletalDistortionInfoList.push_back(info); @@ -1796,7 +1796,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro { LL_WARNS() << "No name supplied for attachment point." << LL_ENDL; delete info; - return FALSE; + return false; } static LLStdStringHandle joint_string = LLXmlTree::addAttributeString("joint"); @@ -1804,7 +1804,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro { LL_WARNS() << "No bone declared in attachment point " << info->mName << LL_ENDL; delete info; - return FALSE; + return false; } static LLStdStringHandle position_string = LLXmlTree::addAttributeString("position"); @@ -1830,7 +1830,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro { LL_WARNS() << "No id supplied for attachment point " << info->mName << LL_ENDL; delete info; - return FALSE; + return false; } static LLStdStringHandle slot_string = LLXmlTree::addAttributeString("pie_slice"); @@ -1845,13 +1845,13 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro mAttachmentInfoList.push_back(info); } - return TRUE; + return true; } //----------------------------------------------------------------------------- // parseXmlMeshNodes(): parses <mesh> nodes from XML tree //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) +bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { for (LLXmlTreeNode* node = root->getChildByName( "mesh" ); node; @@ -1865,7 +1865,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { LL_WARNS() << "Avatar file: <mesh> is missing type attribute. Ignoring element. " << LL_ENDL; delete info; - return FALSE; // Ignore this element + return false; // Ignore this element } static LLStdStringHandle lod_string = LLXmlTree::addAttributeString("lod"); @@ -1873,7 +1873,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { LL_WARNS() << "Avatar file: <mesh> is missing lod attribute. Ignoring element. " << LL_ENDL; delete info; - return FALSE; // Ignore this element + return false; // Ignore this element } static LLStdStringHandle file_name_string = LLXmlTree::addAttributeString("file_name"); @@ -1881,7 +1881,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { LL_WARNS() << "Avatar file: <mesh> is missing file_name attribute. Ignoring: " << info->mType << LL_ENDL; delete info; - return FALSE; // Ignore this element + return false; // Ignore this element } static LLStdStringHandle reference_string = LLXmlTree::addAttributeString("reference"); @@ -1916,7 +1916,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { LL_WARNS() << "Unknown param type." << LL_ENDL; } - return FALSE; + return false; } LLPolyMorphTargetInfo *morphinfo = new LLPolyMorphTargetInfo(); @@ -1926,7 +1926,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) delete info; return -1; } - BOOL shared = FALSE; + BOOL shared = false; static LLStdStringHandle shared_string = LLXmlTree::addAttributeString("shared"); child->getFastAttributeBOOL(shared_string, shared); @@ -1935,13 +1935,13 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) mMeshInfoList.push_back(info); } - return TRUE; + return true; } //----------------------------------------------------------------------------- // parseXmlColorNodes(): parses <global_color> nodes from XML tree //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root) +bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root) { for (LLXmlTreeNode* color_node = root->getChildByName( "global_color" ); color_node; @@ -1956,14 +1956,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root if (mTexSkinColorInfo) { LL_WARNS() << "avatar file: multiple instances of skin_color" << LL_ENDL; - return FALSE; + return false; } mTexSkinColorInfo = new LLTexGlobalColorInfo; if( !mTexSkinColorInfo->parseXml( color_node ) ) { delete_and_clear(mTexSkinColorInfo); LL_WARNS() << "avatar file: mTexSkinColor->parseXml() failed" << LL_ENDL; - return FALSE; + return false; } } else if( global_color_name == "hair_color" ) @@ -1971,14 +1971,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root if (mTexHairColorInfo) { LL_WARNS() << "avatar file: multiple instances of hair_color" << LL_ENDL; - return FALSE; + return false; } mTexHairColorInfo = new LLTexGlobalColorInfo; if( !mTexHairColorInfo->parseXml( color_node ) ) { delete_and_clear(mTexHairColorInfo); LL_WARNS() << "avatar file: mTexHairColor->parseXml() failed" << LL_ENDL; - return FALSE; + return false; } } else if( global_color_name == "eye_color" ) @@ -1986,24 +1986,24 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root if (mTexEyeColorInfo) { LL_WARNS() << "avatar file: multiple instances of eye_color" << LL_ENDL; - return FALSE; + return false; } mTexEyeColorInfo = new LLTexGlobalColorInfo; if( !mTexEyeColorInfo->parseXml( color_node ) ) { LL_WARNS() << "avatar file: mTexEyeColor->parseXml() failed" << LL_ENDL; - return FALSE; + return false; } } } } - return TRUE; + return true; } //----------------------------------------------------------------------------- // parseXmlLayerNodes(): parses <layer_set> nodes from XML tree //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlLayerNodes(LLXmlTreeNode* root) +bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlLayerNodes(LLXmlTreeNode* root) { for (LLXmlTreeNode* layer_node = root->getChildByName( "layer_set" ); layer_node; @@ -2018,16 +2018,16 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlLayerNodes(LLXmlTreeNode* root { delete layer_info; LL_WARNS() << "avatar file: layer_set->parseXml() failed" << LL_ENDL; - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- // parseXmlDriverNodes(): parses <driver_parameters> nodes from XML tree //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* root) +bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* root) { LLXmlTreeNode* driver = root->getChildByName( "driver_parameters" ); if( driver ) @@ -2047,23 +2047,23 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* roo { delete driver_info; LL_WARNS() << "avatar file: driver_param->parseXml() failed" << LL_ENDL; - return FALSE; + return false; } } } } - return TRUE; + return true; } //----------------------------------------------------------------------------- // parseXmlDriverNodes(): parses <driver_parameters> nodes from XML tree //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root) +bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root) { LLXmlTreeNode* masks = root->getChildByName( "morph_masks" ); if( !masks ) { - return FALSE; + return false; } for (LLXmlTreeNode* grand_child = masks->getChildByName( "mask" ); @@ -2077,7 +2077,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root { LL_WARNS() << "No name supplied for morph mask." << LL_ENDL; delete info; - return FALSE; + return false; } static LLStdStringHandle region_string = LLXmlTree::addAttributeString("body_region"); @@ -2085,7 +2085,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root { LL_WARNS() << "No region supplied for morph mask." << LL_ENDL; delete info; - return FALSE; + return false; } static LLStdStringHandle layer_string = LLXmlTree::addAttributeString("layer"); @@ -2093,7 +2093,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root { LL_WARNS() << "No layer supplied for morph mask." << LL_ENDL; delete info; - return FALSE; + return false; } // optional parameter. don't throw a warning if not present. @@ -2103,12 +2103,12 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root mMorphMaskInfoList.push_back(info); } - return TRUE; + return true; } //virtual LLAvatarAppearance::LLMaskedMorph::LLMaskedMorph(LLVisualParam *morph_target, BOOL invert, std::string layer) : - mMorphTarget(morph_target), + mMorphTarget(morph_target), mInvert(invert), mLayer(layer) { diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index 787235b235..f3c74c052f 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -71,9 +71,9 @@ public: static void cleanupClass(); // Cleanup data that's only init'd once per class. virtual void initInstance(); // Called after construction to initialize the instance. S32 mInitFlags; - virtual BOOL loadSkeletonNode(); - BOOL loadMeshNodes(); - BOOL loadLayersets(); + virtual bool loadSkeletonNode(); + bool loadMeshNodes(); + bool loadLayersets(); /** Initialization @@ -108,9 +108,9 @@ public: **/ public: virtual bool isSelf() const { return false; } // True if this avatar is for this viewer's agent - virtual BOOL isValid() const; - virtual BOOL isUsingLocalAppearance() const = 0; - virtual BOOL isEditingAppearance() const = 0; + virtual bool isValid() const; + virtual bool isUsingLocalAppearance() const = 0; + virtual bool isEditingAppearance() const = 0; bool isBuilt() const { return mIsBuilt; } @@ -156,16 +156,16 @@ public: protected: - static BOOL parseSkeletonFile(const std::string& filename, LLXmlTree& skeleton_xml_tree); + static bool parseSkeletonFile(const std::string& filename, LLXmlTree& skeleton_xml_tree); virtual void buildCharacter(); - virtual BOOL loadAvatar(); + virtual bool loadAvatar(); - BOOL setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 ¤t_volume_num, S32 ¤t_joint_num); - BOOL allocateCharacterJoints(U32 num); - BOOL buildSkeleton(const LLAvatarSkeletonInfo *info); + bool setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 ¤t_volume_num, S32 ¤t_joint_num); + bool allocateCharacterJoints(U32 num); + bool buildSkeleton(const LLAvatarSkeletonInfo *info); void clearSkeleton(); - BOOL mIsBuilt; // state of deferred character building + bool mIsBuilt; // state of deferred character building avatar_joint_list_t mSkeleton; LLVector3OverrideMap mPelvisFixups; joint_alias_map_t mJointAliasMap; @@ -225,13 +225,13 @@ protected: ** RENDERING **/ public: - BOOL mIsDummy; // for special views and animated object controllers; local to viewer + bool mIsDummy; // for special views and animated object controllers; local to viewer //-------------------------------------------------------------------- // Morph masks //-------------------------------------------------------------------- public: - void addMaskedMorph(LLAvatarAppearanceDefines::EBakedTextureIndex index, LLVisualParam* morph_target, BOOL invert, std::string layer); + void addMaskedMorph(LLAvatarAppearanceDefines::EBakedTextureIndex index, LLVisualParam* morph_target, bool invert, std::string layer); virtual void applyMorphMask(const U8* tex_data, S32 width, S32 height, S32 num_components, LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES) = 0; /** Rendering @@ -279,7 +279,7 @@ protected: public: void setClothesColor(LLAvatarAppearanceDefines::ETextureIndex te, const LLColor4& new_color); LLColor4 getClothesColor(LLAvatarAppearanceDefines::ETextureIndex te); - static BOOL teToColorParams(LLAvatarAppearanceDefines::ETextureIndex te, U32 *param_name); + static bool teToColorParams(LLAvatarAppearanceDefines::ETextureIndex te, U32 *param_name); //-------------------------------------------------------------------- // Global colors @@ -309,8 +309,8 @@ public: public: LLWearableData* getWearableData() { return mWearableData; } const LLWearableData* getWearableData() const { return mWearableData; } - virtual BOOL isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U32 index = 0 ) const = 0; - virtual BOOL isWearingWearableType(LLWearableType::EType type ) const; + virtual bool isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U32 index = 0 ) const = 0; + virtual bool isWearingWearableType(LLWearableType::EType type ) const; private: LLWearableData* mWearableData; @@ -356,7 +356,7 @@ public: S32 mNumCollisionVolumes; LLAvatarJointCollisionVolume* mCollisionVolumes; protected: - BOOL allocateCollisionVolumes(U32 num); + bool allocateCollisionVolumes(U32 num); /** Physics ** ** @@ -372,12 +372,12 @@ protected: LLAvatarXmlInfo(); ~LLAvatarXmlInfo(); - BOOL parseXmlSkeletonNode(LLXmlTreeNode* root); - BOOL parseXmlMeshNodes(LLXmlTreeNode* root); - BOOL parseXmlColorNodes(LLXmlTreeNode* root); - BOOL parseXmlLayerNodes(LLXmlTreeNode* root); - BOOL parseXmlDriverNodes(LLXmlTreeNode* root); - BOOL parseXmlMorphNodes(LLXmlTreeNode* root); + bool parseXmlSkeletonNode(LLXmlTreeNode* root); + bool parseXmlMeshNodes(LLXmlTreeNode* root); + bool parseXmlColorNodes(LLXmlTreeNode* root); + bool parseXmlLayerNodes(LLXmlTreeNode* root); + bool parseXmlDriverNodes(LLXmlTreeNode* root); + bool parseXmlMorphNodes(LLXmlTreeNode* root); struct LLAvatarMeshInfo { @@ -421,8 +421,8 @@ protected: S32 mPieMenuSlice; BOOL mVisibleFirstPerson; BOOL mIsHUDAttachment; - BOOL mHasPosition; - BOOL mHasRotation; + bool mHasPosition; + bool mHasRotation; }; typedef std::vector<LLAvatarAttachmentInfo*> attachment_info_list_t; attachment_info_list_t mAttachmentInfoList; @@ -458,7 +458,7 @@ protected: LLMaskedMorph(LLVisualParam *morph_target, BOOL invert, std::string layer); LLVisualParam *mMorphTarget; - BOOL mInvert; + bool mInvert; std::string mLayer; }; /** Support Classes diff --git a/indra/llappearance/llavatarappearancedefines.cpp b/indra/llappearance/llavatarappearancedefines.cpp index 8759c387e8..f3f26be4b9 100644 --- a/indra/llappearance/llavatarappearancedefines.cpp +++ b/indra/llappearance/llavatarappearancedefines.cpp @@ -303,15 +303,15 @@ LLWearableType::EType LLAvatarAppearanceDictionary::getTEWearableType(ETextureIn } // static -BOOL LLAvatarAppearanceDictionary::isBakedImageId(const LLUUID& id) +bool LLAvatarAppearanceDictionary::isBakedImageId(const LLUUID& id) { if ((id == IMG_USE_BAKED_EYES) || (id == IMG_USE_BAKED_HAIR) || (id == IMG_USE_BAKED_HEAD) || (id == IMG_USE_BAKED_LOWER) || (id == IMG_USE_BAKED_SKIRT) || (id == IMG_USE_BAKED_UPPER) || (id == IMG_USE_BAKED_LEFTARM) || (id == IMG_USE_BAKED_LEFTLEG) || (id == IMG_USE_BAKED_AUX1) || (id == IMG_USE_BAKED_AUX2) || (id == IMG_USE_BAKED_AUX3) ) { - return TRUE; + return true; } - return FALSE; + return false; } // static diff --git a/indra/llappearance/llavatarappearancedefines.h b/indra/llappearance/llavatarappearancedefines.h index 49dfbebeea..b90c6664cc 100644 --- a/indra/llappearance/llavatarappearancedefines.h +++ b/indra/llappearance/llavatarappearancedefines.h @@ -244,7 +244,7 @@ public: // Given a texture entry, determine which wearable type owns it. LLWearableType::EType getTEWearableType(ETextureIndex index) const; - static BOOL isBakedImageId(const LLUUID& id); + static bool isBakedImageId(const LLUUID& id); static EBakedTextureIndex assetIdToBakedTextureIndex(const LLUUID& id); static LLUUID localTextureIndexToMagicId(ETextureIndex t); diff --git a/indra/llappearance/llavatarjoint.h b/indra/llappearance/llavatarjoint.h index fec91503c7..61b4e2b0a1 100644 --- a/indra/llappearance/llavatarjoint.h +++ b/indra/llappearance/llavatarjoint.h @@ -62,7 +62,7 @@ public: virtual BOOL isTransparent() { return mIsTransparent; } // Returns true if this object should inherit scale modifiers from its immediate parent - virtual BOOL inheritScale() { return FALSE; } + virtual BOOL inheritScale() { return false; } enum Components { @@ -127,7 +127,7 @@ public: LLAvatarJointCollisionVolume(); virtual ~LLAvatarJointCollisionVolume() {}; - /*virtual*/ BOOL inheritScale() { return TRUE; } + /*virtual*/ BOOL inheritScale() { return true; } /*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 ed39f78d28..7a6da9d33f 100644 --- a/indra/llappearance/llavatarjointmesh.cpp +++ b/indra/llappearance/llavatarjointmesh.cpp @@ -119,7 +119,7 @@ BOOL LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint) mRootToParentJointSkinOffset = totalSkinOffset(getBaseSkeletonAncestor(joint)); mRootToParentJointSkinOffset = -mRootToParentJointSkinOffset; - return TRUE; + return true; } @@ -186,7 +186,7 @@ BOOL LLAvatarJointMesh::allocateSkinData( U32 numSkinJoints ) { mSkinJoints = new LLSkinJoint[ numSkinJoints ]; mNumSkinJoints = numSkinJoints; - return TRUE; + return true; } //----------------------------------------------------------------------------- diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp index f46d0324a5..52d060571e 100644 --- a/indra/llappearance/lldriverparam.cpp +++ b/indra/llappearance/lldriverparam.cpp @@ -46,11 +46,11 @@ BOOL LLDriverParamInfo::parseXml(LLXmlTreeNode* node) llassert( node->hasName( "param" ) && node->getChildByName( "param_driver" ) ); if( !LLViewerVisualParamInfo::parseXml( node )) - return FALSE; + return false; LLXmlTreeNode* param_driver_node = node->getChildByName( "param_driver" ); if( !param_driver_node ) - return FALSE; + return false; for (LLXmlTreeNode* child = param_driver_node->getChildByName( "driven" ); child; @@ -90,10 +90,10 @@ BOOL LLDriverParamInfo::parseXml(LLXmlTreeNode* node) else { LL_ERRS() << "<driven> Unable to resolve driven parameter: " << driven_id << LL_ENDL; - return FALSE; + return false; } } - return TRUE; + return true; } //virtual @@ -191,14 +191,14 @@ BOOL LLDriverParam::setInfo(LLDriverParamInfo *info) { llassert(mInfo == NULL); if (info->mID < 0) - return FALSE; + return false; mInfo = info; mID = info->mID; info->mDriverParam = this; setWeight(getDefaultWeight()); - return TRUE; + return true; } /*virtual*/ LLViewerVisualParam* LLDriverParam::cloneParam(LLWearable* wearable) const diff --git a/indra/llappearance/lllocaltextureobject.cpp b/indra/llappearance/lllocaltextureobject.cpp index ab50db3a5a..7c17942c56 100644 --- a/indra/llappearance/lllocaltextureobject.cpp +++ b/indra/llappearance/lllocaltextureobject.cpp @@ -136,7 +136,7 @@ BOOL LLLocalTextureObject::setTexLayer(LLTexLayer *new_tex_layer, U32 index) { if (index >= getNumTexLayers() ) { - return FALSE; + return false; } if (new_tex_layer == NULL) @@ -153,47 +153,47 @@ BOOL LLLocalTextureObject::setTexLayer(LLTexLayer *new_tex_layer, U32 index) } mTexLayers[index] = layer; - return TRUE; + return true; } BOOL LLLocalTextureObject::addTexLayer(LLTexLayer *new_tex_layer, LLWearable *wearable) { if (new_tex_layer == NULL) { - return FALSE; + return false; } LLTexLayer *layer = new LLTexLayer(*new_tex_layer, wearable); layer->setLTO(this); mTexLayers.push_back(layer); - return TRUE; + return true; } BOOL LLLocalTextureObject::addTexLayer(LLTexLayerTemplate *new_tex_layer, LLWearable *wearable) { if (new_tex_layer == NULL) { - return FALSE; + return false; } LLTexLayer *layer = new LLTexLayer(*new_tex_layer, this, wearable); layer->setLTO(this); mTexLayers.push_back(layer); - return TRUE; + return true; } BOOL LLLocalTextureObject::removeTexLayer(U32 index) { if (index >= getNumTexLayers()) { - return FALSE; + return false; } tex_layer_vec_t::iterator iter = mTexLayers.begin(); iter += index; delete *iter; mTexLayers.erase(iter); - return TRUE; + return true; } void LLLocalTextureObject::setID(LLUUID new_id) diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp index dab14851c8..8bfc6572d7 100644 --- a/indra/llappearance/llpolymesh.cpp +++ b/indra/llappearance/llpolymesh.cpp @@ -243,7 +243,7 @@ BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices ) mWeights[i] = 0.f; } mNumVertices = numVertices; - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -254,7 +254,7 @@ BOOL LLPolyMeshSharedData::allocateFaceData( U32 numFaces ) mFaces = new LLPolyFace[ numFaces ]; mNumFaces = numFaces; mNumTriangleIndices = mNumFaces * 3; - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -264,7 +264,7 @@ BOOL LLPolyMeshSharedData::allocateJointNames( U32 numJointNames ) { mJointNames = new std::string[ numJointNames ]; mNumJointNames = numJointNames; - return TRUE; + return true; } //-------------------------------------------------------------------- @@ -278,13 +278,13 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if(fileName.empty()) { LL_ERRS() << "Filename is Empty!" << LL_ENDL; - return FALSE; + return false; } LLFILE* fp = LLFile::fopen(fileName, "rb"); /*Flawfinder: ignore*/ if (!fp) { LL_ERRS() << "can't open: " << fileName << LL_ENDL; - return FALSE; + return false; } //------------------------------------------------------------------------- @@ -317,7 +317,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 1) { LL_ERRS() << "can't read HasWeights flag from " << fileName << LL_ENDL; - return FALSE; + return false; } if (!isLOD()) { @@ -332,7 +332,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 1) { LL_ERRS() << "can't read HasDetailTexCoords flag from " << fileName << LL_ENDL; - return FALSE; + return false; } //---------------------------------------------------------------- @@ -344,7 +344,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 3) { LL_ERRS() << "can't read Position from " << fileName << LL_ENDL; - return FALSE; + return false; } setPosition( position ); @@ -357,7 +357,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 3) { LL_ERRS() << "can't read RotationAngles from " << fileName << LL_ENDL; - return FALSE; + return false; } U8 rotationOrder; @@ -366,7 +366,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 1) { LL_ERRS() << "can't read RotationOrder from " << fileName << LL_ENDL; - return FALSE; + return false; } rotationOrder = 0; @@ -385,7 +385,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 3) { LL_ERRS() << "can't read Scale from " << fileName << LL_ENDL; - return FALSE; + return false; } setScale( scale ); @@ -406,7 +406,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 1) { LL_ERRS() << "can't read NumVertices from " << fileName << LL_ENDL; - return FALSE; + return false; } allocateVertexData( numVertices ); @@ -421,7 +421,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 3) { LL_ERRS() << "can't read Coordinates from " << fileName << LL_ENDL; - return FALSE; + return false; } } @@ -435,7 +435,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 3) { LL_ERRS() << " can't read Normals from " << fileName << LL_ENDL; - return FALSE; + return false; } } @@ -449,7 +449,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 3) { LL_ERRS() << " can't read Binormals from " << fileName << LL_ENDL; - return FALSE; + return false; } } @@ -461,7 +461,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != numVertices) { LL_ERRS() << "can't read TexCoords from " << fileName << LL_ENDL; - return FALSE; + return false; } //---------------------------------------------------------------- @@ -474,7 +474,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != numVertices) { LL_ERRS() << "can't read DetailTexCoords from " << fileName << LL_ENDL; - return FALSE; + return false; } } @@ -488,7 +488,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != numVertices) { LL_ERRS() << "can't read Weights from " << fileName << LL_ENDL; - return FALSE; + return false; } } } @@ -502,7 +502,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 1) { LL_ERRS() << "can't read NumFaces from " << fileName << LL_ENDL; - return FALSE; + return false; } allocateFaceData( numFaces ); @@ -520,7 +520,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 3) { LL_ERRS() << "can't read Face[" << i << "] from " << fileName << LL_ENDL; - return FALSE; + return false; } if (mReferenceData) { @@ -577,7 +577,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 1) { LL_ERRS() << "can't read NumSkinJoints from " << fileName << LL_ENDL; - return FALSE; + return false; } allocateJointNames( numSkinJoints ); } @@ -593,7 +593,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 1) { LL_ERRS() << "can't read Skin[" << i << "].Name from " << fileName << LL_ENDL; - return FALSE; + return false; } std::string *jn = &mJointNames[i]; diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index 223b2b7f1c..c2f0289432 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -114,7 +114,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) if (numRead != 1) { LL_WARNS() << "Can't read number of morph target vertices" << LL_ENDL; - return FALSE; + return false; } //------------------------------------------------------------------------- @@ -151,14 +151,14 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) if (numRead != 1) { LL_WARNS() << "Can't read morph target vertex number" << LL_ENDL; - return FALSE; + return false; } if (mVertexIndices[v] > 10000) { // Bad install? These are usually .llm files from 'character' fodler LL_WARNS() << "Bad morph index " << v << ": " << mVertexIndices[v] << LL_ENDL; - return FALSE; + return false; } @@ -167,7 +167,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) if (numRead != 3) { LL_WARNS() << "Can't read morph target vertex coordinates" << LL_ENDL; - return FALSE; + return false; } F32 magnitude = mCoords[v].getLength3().getF32(); @@ -187,7 +187,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) if (numRead != 3) { LL_WARNS() << "Can't read morph target normal" << LL_ENDL; - return FALSE; + return false; } numRead = fread(&mBinormals[v], sizeof(F32), 3, fp); @@ -195,7 +195,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) if (numRead != 3) { LL_WARNS() << "Can't read morph target binormal" << LL_ENDL; - return FALSE; + return false; } @@ -204,7 +204,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) if (numRead != 2) { LL_WARNS() << "Can't read morph target uv" << LL_ENDL; - return FALSE; + return false; } mNumIndices++; @@ -213,7 +213,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) mAvgDistortion.mul(1.f/(F32)mNumIndices); mAvgDistortion.normalize3fast(); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -265,14 +265,14 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) llassert( node->hasName( "param" ) && node->getChildByName( "param_morph" ) ); if (!LLViewerVisualParamInfo::parseXml(node)) - return FALSE; + return false; // Get mixed-case name static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if( !node->getFastAttributeString( name_string, mMorphName ) ) { LL_WARNS() << "Avatar file: <param> is missing name attribute" << LL_ENDL; - return FALSE; // Continue, ignoring this tag + return false; // Continue, ignoring this tag } static LLStdStringHandle clothing_morph_string = LLXmlTree::addAttributeString("clothing_morph"); @@ -284,7 +284,7 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) { LL_WARNS() << "Failed to getChildByName(\"param_morph\")" << LL_ENDL; - return FALSE; + return false; } for (LLXmlTreeNode* child_node = paramNode->getFirstChild(); @@ -310,7 +310,7 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) } } - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -357,7 +357,7 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) { llassert(mInfo == NULL); if (info->mID < 0) - return FALSE; + return false; mInfo = info; mID = info->mID; setWeight(getDefaultWeight()); @@ -394,9 +394,9 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) if (!mMorphData) { LL_WARNS() << "No morph target named " << morph_param_name << " found in mesh." << LL_ENDL; - return FALSE; // Continue, ignoring this tag + return false; // Continue, ignoring this tag } - return TRUE; + return true; } /*virtual*/ LLViewerVisualParam* LLPolyMorphTarget::cloneParam(LLWearable* wearable) const @@ -416,9 +416,9 @@ BOOL LLPolyMorphTarget::parseData(LLXmlTreeNode* node) if (!setInfo(info)) { delete info; - return FALSE; + return false; } - return TRUE; + return true; } #endif diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index 586e631ded..d3401cb08f 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -50,7 +50,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) llassert( node->hasName( "param" ) && node->getChildByName( "param_skeleton" ) ); if (!LLViewerVisualParamInfo::parseXml(node)) - return FALSE; + return false; LLXmlTreeNode* skeletalParam = node->getChildByName("param_skeleton"); @@ -58,7 +58,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) { LL_WARNS() << "Failed to getChildByName(\"param_skeleton\")" << LL_ENDL; - return FALSE; + return false; } for( LLXmlTreeNode* bone = skeletalParam->getFirstChild(); bone; bone = skeletalParam->getNextChild() ) @@ -98,7 +98,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) continue; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -137,7 +137,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) { if (info->mID < 0) { - return FALSE; + return false; } mInfo = info; mID = info->mID; @@ -151,7 +151,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) // There's no point continuing after this error - means // that either the skeleton or lad file is broken. LL_WARNS() << "Joint " << bone_info.mBoneName << " not found." << LL_ENDL; - return FALSE; + return false; } // store it @@ -174,7 +174,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) mJointOffsets[joint] = bone_info.mPositionDeformation; } } - return TRUE; + return true; } /*virtual*/ LLViewerVisualParam* LLPolySkeletalDistortion::cloneParam(LLWearable* wearable) const diff --git a/indra/llappearance/lltexglobalcolor.cpp b/indra/llappearance/lltexglobalcolor.cpp index 75815482c9..9017067f98 100644 --- a/indra/llappearance/lltexglobalcolor.cpp +++ b/indra/llappearance/lltexglobalcolor.cpp @@ -61,12 +61,12 @@ BOOL LLTexGlobalColor::setInfo(LLTexGlobalColorInfo *info) if (!param_color->setInfo(color_info, TRUE)) { mInfo = NULL; - return FALSE; + return false; } mParamGlobalColorList.push_back(param_color); } - return TRUE; + return true; } LLColor4 LLTexGlobalColor::getColor() const @@ -142,7 +142,7 @@ BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node) if (!node->getFastAttributeString(name_string, mName)) { LL_WARNS() << "<global_color> element is missing name attribute." << LL_ENDL; - return FALSE; + return false; } // <param> sub-element for (LLXmlTreeNode* child = node->getChildByName("param"); @@ -156,10 +156,10 @@ BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node) if (!info->parseXml(child)) { delete info; - return FALSE; + return false; } mParamColorInfoList.push_back(info); } } - return TRUE; + return true; } diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index e426615f1c..91f5ba1996 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -190,7 +190,7 @@ BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node) llassert( node->hasName( "layer_set" ) ); if( !node->hasName( "layer_set" ) ) { - return FALSE; + return false; } // body_region @@ -198,20 +198,20 @@ BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node) if( !node->getFastAttributeString( body_region_string, mBodyRegion ) ) { LL_WARNS() << "<layer_set> is missing body_region attribute" << LL_ENDL; - return FALSE; + return false; } // width, height static LLStdStringHandle width_string = LLXmlTree::addAttributeString("width"); if( !node->getFastAttributeS32( width_string, mWidth ) ) { - return FALSE; + return false; } static LLStdStringHandle height_string = LLXmlTree::addAttributeString("height"); if( !node->getFastAttributeS32( height_string, mHeight ) ) { - return FALSE; + return false; } // Optional alpha component to apply after all compositing is complete. @@ -230,11 +230,11 @@ BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node) if( !info->parseXml( child )) { delete info; - return FALSE; + return false; } mLayerInfoList.push_back( info ); } - return TRUE; + return true; } // creates visual params without generating layersets or layers @@ -299,7 +299,7 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info) if (!layer->setInfo(layer_info, NULL)) { mInfo = NULL; - return FALSE; + return false; } if (!layer->isVisibilityMask()) { @@ -315,7 +315,7 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info) stop_glerror(); - return TRUE; + return true; } #if 0 // obsolete @@ -330,14 +330,14 @@ BOOL LLTexLayerSet::parseData(LLXmlTreeNode* node) if (!info->parseXml(node)) { delete info; - return FALSE; + return false; } if (!setInfo(info)) { delete info; - return FALSE; + return false; } - return TRUE; + return true; } #endif @@ -539,10 +539,10 @@ BOOL LLTexLayerSet::isMorphValid() const { if (layer && !layer->isMorphValid()) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLTexLayerSet::invalidateMorphMasks() @@ -587,7 +587,7 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if( !node->getFastAttributeString( name_string, mName ) ) { - return FALSE; + return false; } static LLStdStringHandle write_all_channels_string = LLXmlTree::addAttributeString("write_all_channels"); @@ -657,13 +657,13 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node) if (mLocalTexture == TEX_NUM_INDICES) { LL_WARNS() << "<texture> element has invalid local_texture attribute: " << mName << " " << local_texture_name << LL_ENDL; - return FALSE; + return false; } } else { LL_WARNS() << "<texture> element is missing a required attribute. " << mName << LL_ENDL; - return FALSE; + return false; } } @@ -694,7 +694,7 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node) if (!info->parseXml(child)) { delete info; - return FALSE; + return false; } mParamColorInfoList.push_back(info); } @@ -705,18 +705,18 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node) if (!info->parseXml(child)) { delete info; - return FALSE; + return false; } mParamAlphaInfoList.push_back(info); } } - return TRUE; + return true; } BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance) { - BOOL success = TRUE; + BOOL success = true; for (LLTexLayerParamColorInfo* color_info : mParamColorInfoList) { LLTexLayerParamColor* param_color = new LLTexLayerParamColor(appearance); @@ -781,7 +781,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab if (!param_color->setInfo(color_info, TRUE)) { mInfo = NULL; - return FALSE; + return false; } } else @@ -790,7 +790,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab if (!param_color) { mInfo = NULL; - return FALSE; + return false; } } mParamColorList.push_back( param_color ); @@ -806,7 +806,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab if (!param_alpha->setInfo(alpha_info, TRUE)) { mInfo = NULL; - return FALSE; + return false; } } else @@ -815,13 +815,13 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab if (!param_alpha) { mInfo = NULL; - return FALSE; + return false; } } mParamAlphaList.push_back( param_alpha ); } - return TRUE; + return true; } /*virtual*/ void LLTexLayerInterface::requestUpdate() @@ -1223,29 +1223,29 @@ BOOL LLTexLayer::findNetColor(LLColor4* net_color) const } calculateTexLayerColor(mParamColorList, *net_color); - return TRUE; + return true; } if( !getGlobalColor().empty() ) { net_color->setVec( mTexLayerSet->getAvatarAppearance()->getGlobalColor( getGlobalColor() ) ); - return TRUE; + return true; } if( getInfo()->mFixedColor.mV[VW] ) { net_color->setVec( getInfo()->mFixedColor ); - return TRUE; + return true; } net_color->setToWhite(); - return FALSE; // No need to draw a separate colored polygon + return false; // No need to draw a separate colored polygon } BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) { - BOOL success = TRUE; + BOOL success = true; gGL.flush(); @@ -1519,11 +1519,11 @@ void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 { if (mLocalTextureObject->getID() == IMG_INVISIBLE) { - return TRUE; + return true; } } - return FALSE; + return false; } LLUUID LLTexLayer::getUUID() const @@ -1726,12 +1726,12 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const { if (layer->isInvisibleAlphaMask()) { - return TRUE; + return true; } } } - return FALSE; + return false; } diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index 604e0124cb..16369533ca 100644 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -79,7 +79,7 @@ BOOL LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appeara this->setParamLocation(mAvatarAppearance->isSelf() ? LOC_AV_SELF : LOC_AV_OTHER); } - return TRUE; + return true; } @@ -235,7 +235,7 @@ BOOL LLTexLayerParamAlpha::getSkip() const { if (!mTexLayer) { - return TRUE; + return true; } const LLAvatarAppearance *appearance = mTexLayer->getTexLayerSet()->getAvatarAppearance(); @@ -245,24 +245,24 @@ BOOL LLTexLayerParamAlpha::getSkip() const F32 effective_weight = (appearance->getSex() & getSex()) ? mCurWeight : getDefaultWeight(); if (is_approx_zero(effective_weight)) { - return TRUE; + return true; } } LLWearableType::EType type = (LLWearableType::EType)getWearableType(); if ((type != LLWearableType::WT_INVALID) && !appearance->isWearingWearableType(type)) { - return TRUE; + return true; } - return FALSE; + return false; } BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) { LL_PROFILE_ZONE_SCOPED; - BOOL success = TRUE; + BOOL success = true; if (!mTexLayer) { @@ -300,7 +300,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) { LL_WARNS() << "Unable to load static file: " << info->mStaticImageFileName << LL_ENDL; mStaticImageInvalid = TRUE; // don't try again. - return FALSE; + return false; } } @@ -383,12 +383,12 @@ BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node) llassert(node->hasName("param") && node->getChildByName("param_alpha")); if (!LLViewerVisualParamInfo::parseXml(node)) - return FALSE; + return false; LLXmlTreeNode* param_alpha_node = node->getChildByName("param_alpha"); if (!param_alpha_node) { - return FALSE; + return false; } static LLStdStringHandle tga_file_string = LLXmlTree::addAttributeString("tga_file"); @@ -410,7 +410,7 @@ BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle domain_string = LLXmlTree::addAttributeString("domain"); param_alpha_node->getFastAttributeF32(domain_string, mDomain); - return TRUE; + return true; } @@ -543,12 +543,12 @@ BOOL LLTexLayerParamColorInfo::parseXml(LLXmlTreeNode *node) llassert(node->hasName("param") && node->getChildByName("param_color")); if (!LLViewerVisualParamInfo::parseXml(node)) - return FALSE; + return false; LLXmlTreeNode* param_color_node = node->getChildByName("param_color"); if (!param_color_node) { - return FALSE; + return false; } std::string op_string; @@ -581,14 +581,14 @@ BOOL LLTexLayerParamColorInfo::parseXml(LLXmlTreeNode *node) if (!mNumColors) { LL_WARNS() << "<param_color> is missing <value> sub-elements" << LL_ENDL; - return FALSE; + return false; } if ((mOperation == LLTexLayerParamColor::OP_BLEND) && (mNumColors != 1)) { LL_WARNS() << "<param_color> with operation\"blend\" must have exactly one <value>" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/indra/llappearance/llviewervisualparam.cpp b/indra/llappearance/llviewervisualparam.cpp index fb0d12f0af..07786e3c0c 100644 --- a/indra/llappearance/llviewervisualparam.cpp +++ b/indra/llappearance/llviewervisualparam.cpp @@ -62,7 +62,7 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) llassert( node->hasName( "param" ) ); if (!LLVisualParamInfo::parseXml(node)) - return FALSE; + return false; // VIEWER SPECIFIC PARAMS @@ -107,7 +107,7 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) params_loaded++; - return TRUE; + return true; } /*virtual*/ void LLViewerVisualParamInfo::toStream(std::ostream &out) @@ -150,11 +150,11 @@ BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info) { llassert(mInfo == NULL); if (info->mID < 0) - return FALSE; + return false; mInfo = info; mID = info->mID; setWeight(getDefaultWeight()); - return TRUE; + return true; } /* @@ -166,14 +166,14 @@ BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info) //----------------------------------------------------------------------------- // parseData() //----------------------------------------------------------------------------- -BOOL LLViewerVisualParam::parseData(LLXmlTreeNode *node) +bool LLViewerVisualParam::parseData(LLXmlTreeNode *node) { LLViewerVisualParamInfo* info = new LLViewerVisualParamInfo; info->parseXml(node); if (!setInfo(info)) - return FALSE; + return false; - return TRUE; + return true; } */ diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index fdf167aa94..db7db32b3e 100644 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -95,7 +95,7 @@ BOOL LLWearable::exportFile(const std::string& filename) const // virtual BOOL LLWearable::exportStream( std::ostream& output_stream ) const { - if (!output_stream.good()) return FALSE; + if (!output_stream.good()) return false; // header and version output_stream << "LLWearable version " << mDefinitionVersion << "\n"; @@ -107,13 +107,13 @@ BOOL LLWearable::exportStream( std::ostream& output_stream ) const // permissions if( !mPermissions.exportLegacyStream( output_stream ) ) { - return FALSE; + return false; } // sale info if( !mSaleInfo.exportLegacyStream( output_stream ) ) { - return FALSE; + return false; } // wearable type @@ -139,7 +139,7 @@ BOOL LLWearable::exportStream( std::ostream& output_stream ) const const LLUUID& image_id = te_pair.second->getID(); output_stream << te << " " << image_id << "\n"; } - return TRUE; + return true; } void LLWearable::createVisualParams(LLAvatarAppearance *avatarp) @@ -473,7 +473,7 @@ BOOL LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer, { if (!input_stream.good()) { - return FALSE; + return false; } do diff --git a/indra/llappearance/llwearabledata.cpp b/indra/llappearance/llwearabledata.cpp index 9fbbc57c87..2a0b77ee39 100644 --- a/indra/llappearance/llwearabledata.cpp +++ b/indra/llappearance/llwearabledata.cpp @@ -204,7 +204,7 @@ BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_fou { if (wearable == NULL) { - return FALSE; + return false; } const LLWearableType::EType type = wearable->getType(); @@ -212,7 +212,7 @@ BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_fou if (wearable_iter == mWearableDatas.end()) { LL_WARNS() << "tried to get wearable index with an invalid type!" << LL_ENDL; - return FALSE; + return false; } const wearableentry_vec_t& wearable_vec = wearable_iter->second; for(U32 index = 0; index < wearable_vec.size(); index++) @@ -220,11 +220,11 @@ BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_fou if (wearable_vec[index] == wearable) { index_found = index; - return TRUE; + return true; } } - return FALSE; + return false; } U32 LLWearableData::getClothingLayerCount() const @@ -255,13 +255,13 @@ BOOL LLWearableData::canAddWearable(const LLWearableType::EType type) const } else { - return FALSE; + return false; } } BOOL LLWearableData::isOnTop(LLWearable* wearable) const { - if (!wearable) return FALSE; + if (!wearable) return false; const LLWearableType::EType type = wearable->getType(); return ( getTopWearable(type) == wearable ); } diff --git a/indra/llappearance/llwearabletype.cpp b/indra/llappearance/llwearabletype.cpp index 4ac611b1de..056f7cf888 100644 --- a/indra/llappearance/llwearabletype.cpp +++ b/indra/llappearance/llwearabletype.cpp @@ -115,14 +115,14 @@ LLInventoryType::EIconName LLWearableType::getIconName(LLWearableType::EType typ BOOL LLWearableType::getDisableCameraSwitch(LLWearableType::EType type) { const WearableEntry *entry = mDictionary.lookup(type); - if (!entry) return FALSE; + if (!entry) return false; return entry->mDisableCameraSwitch; } BOOL LLWearableType::getAllowMultiwear(LLWearableType::EType type) { const WearableEntry *entry = mDictionary.lookup(type); - if (!entry) return FALSE; + if (!entry) return false; return entry->mAllowMultiwear; } diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index 5b1b28bf4f..567bdb8c95 100644 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp @@ -1266,15 +1266,15 @@ BOOL LLBVHLoader::getLine(apr_file_t* fp) { if (apr_file_eof(fp) == APR_EOF) { - return FALSE; + return false; } if ( apr_file_gets(mLine, BVH_PARSER_LINE_SIZE, fp) == APR_SUCCESS) { mLineNumber++; - return TRUE; + return true; } - return FALSE; + return false; } // returns required size of output buffer @@ -1496,5 +1496,5 @@ BOOL LLBVHLoader::serialize(LLDataPacker& dp) } - return TRUE; + return true; } diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index cf6be8daf0..b373bd75a3 100644 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -172,7 +172,7 @@ BOOL LLCharacter::isMotionActive(const LLUUID& id) return mMotionController.isMotionActive(motionp); } - return FALSE; + return false; } @@ -286,9 +286,9 @@ BOOL LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 wei if (index_iter != mVisualParamIndexMap.end()) { index_iter->second->setWeight(weight); - return TRUE; + return true; } - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -303,10 +303,10 @@ BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight) if (name_iter != mVisualParamNameMap.end()) { name_iter->second->setWeight(weight); - return TRUE; + return true; } LL_WARNS() << "LLCharacter::setVisualParamWeight() Invalid visual parameter: " << param_name << LL_ENDL; - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -318,10 +318,10 @@ BOOL LLCharacter::setVisualParamWeight(S32 index, F32 weight) if (index_iter != mVisualParamIndexMap.end()) { index_iter->second->setWeight(weight); - return TRUE; + return true; } LL_WARNS() << "LLCharacter::setVisualParamWeight() Invalid visual parameter index: " << index << LL_ENDL; - return FALSE; + return false; } //----------------------------------------------------------------------------- diff --git a/indra/llcharacter/lleditingmotion.cpp b/indra/llcharacter/lleditingmotion.cpp index c5757163d9..cf6438aad9 100644 --- a/indra/llcharacter/lleditingmotion.cpp +++ b/indra/llcharacter/lleditingmotion.cpp @@ -155,7 +155,7 @@ BOOL LLEditingMotion::onActivate() mShoulderJoint.setRotation( mShoulderState->getJoint()->getRotation() ); mElbowJoint.setRotation( mElbowState->getJoint()->getRotation() ); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -168,12 +168,12 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) LLVector3* pointAtPt = (LLVector3*)mCharacter->getAnimationData("PointAtPoint"); - BOOL result = TRUE; + BOOL result = true; if (!pointAtPt) { focus_pt = mLastSelectPt; - result = FALSE; + result = false; } else { diff --git a/indra/llcharacter/lleditingmotion.h b/indra/llcharacter/lleditingmotion.h index 80c1717a70..35d44c8761 100644 --- a/indra/llcharacter/lleditingmotion.h +++ b/indra/llcharacter/lleditingmotion.h @@ -69,7 +69,7 @@ public: //------------------------------------------------------------------------- // motions must specify whether or not they loop - virtual BOOL getLoop() { return TRUE; } + virtual BOOL getLoop() { return true; } // motions must report their total duration virtual F32 getDuration() { return 0.0; } diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp index 80717d8d26..d0c4139da7 100644 --- a/indra/llcharacter/llgesture.cpp +++ b/indra/llcharacter/llgesture.cpp @@ -94,14 +94,14 @@ const LLGesture &LLGesture::operator =(const LLGesture &rhs) BOOL LLGesture::trigger(KEY key, MASK mask) { LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL; - return FALSE; + return false; } BOOL LLGesture::trigger(const std::string& trigger_string) { LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL; - return FALSE; + return false; } // NOT endian-neutral @@ -267,7 +267,7 @@ BOOL LLGestureList::trigger(KEY key, MASK mask) { if (gesture->trigger(key, mask)) { - return TRUE; + return true; } } else @@ -275,7 +275,7 @@ BOOL LLGestureList::trigger(KEY key, MASK mask) LL_WARNS() << "NULL gesture in gesture list (" << i << ")" << LL_ENDL; } } - return FALSE; + return false; } // NOT endian-neutral diff --git a/indra/llcharacter/llhandmotion.cpp b/indra/llcharacter/llhandmotion.cpp index ceba956214..1aad9565fc 100644 --- a/indra/llcharacter/llhandmotion.cpp +++ b/indra/llcharacter/llhandmotion.cpp @@ -112,7 +112,7 @@ BOOL LLHandMotion::onActivate() mCharacter->setVisualParamWeight(gHandPoseNames[mCurrentPose], 1.f); mCharacter->updateVisualParams(); } - return TRUE; + return true; } @@ -233,7 +233,7 @@ BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask) } } - return TRUE; + return true; } diff --git a/indra/llcharacter/llhandmotion.h b/indra/llcharacter/llhandmotion.h index 08de7056c8..074ee29de9 100644 --- a/indra/llcharacter/llhandmotion.h +++ b/indra/llcharacter/llhandmotion.h @@ -82,7 +82,7 @@ public: //------------------------------------------------------------------------- // motions must specify whether or not they loop - virtual BOOL getLoop() { return TRUE; } + virtual BOOL getLoop() { return true; } // motions must report their total duration virtual F32 getDuration() { return 0.0; } diff --git a/indra/llcharacter/llheadrotmotion.cpp b/indra/llcharacter/llheadrotmotion.cpp index 07a3aaebb6..85d7611b2c 100644 --- a/indra/llcharacter/llheadrotmotion.cpp +++ b/indra/llcharacter/llheadrotmotion.cpp @@ -166,7 +166,7 @@ LLMotion::LLMotionInitStatus LLHeadRotMotion::onInitialize(LLCharacter *characte //----------------------------------------------------------------------------- BOOL LLHeadRotMotion::onActivate() { - return TRUE; + return true; } @@ -251,7 +251,7 @@ BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask) mHeadState->setRotation( nlerp(1.f - NECK_LAG, LLQuaternion::DEFAULT, head_rot_local)); } - return TRUE; + return true; } @@ -364,7 +364,7 @@ LLMotion::LLMotionInitStatus LLEyeMotion::onInitialize(LLCharacter *character) //----------------------------------------------------------------------------- BOOL LLEyeMotion::onActivate() { - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -537,7 +537,7 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask) adjustEyeTarget(targetPos, *mLeftEyeState, *mRightEyeState); adjustEyeTarget(targetPos, *mAltLeftEyeState, *mAltRightEyeState); - return TRUE; + return true; } diff --git a/indra/llcharacter/llheadrotmotion.h b/indra/llcharacter/llheadrotmotion.h index 53ae1813bc..6b460fc22e 100644 --- a/indra/llcharacter/llheadrotmotion.h +++ b/indra/llcharacter/llheadrotmotion.h @@ -64,7 +64,7 @@ public: //------------------------------------------------------------------------- // motions must specify whether or not they loop - virtual BOOL getLoop() { return TRUE; } + virtual BOOL getLoop() { return true; } // motions must report their total duration virtual F32 getDuration() { return 0.0; } @@ -147,7 +147,7 @@ public: //------------------------------------------------------------------------- // motions must specify whether or not they loop - virtual BOOL getLoop() { return TRUE; } + virtual BOOL getLoop() { return true; } // motions must report their total duration virtual F32 getDuration() { return 0.0; } diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index 63d99b9209..61ac6b4432 100644 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -280,7 +280,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/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index d95ec159f2..0345212695 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -653,7 +653,7 @@ BOOL LLKeyframeMotion::setupPose() setLoopIn(mJointMotionList->mLoopInPoint); setLoopOut(mJointMotionList->mLoopOutPoint); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -674,7 +674,7 @@ BOOL LLKeyframeMotion::onActivate() mLastLoopedTime = 0.f; - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -1992,7 +1992,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo setupPose(); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -2000,7 +2000,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo //----------------------------------------------------------------------------- BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const { - BOOL success = TRUE; + BOOL success = true; LL_DEBUGS("BVH") << "serializing" << LL_ENDL; diff --git a/indra/llcharacter/llkeyframemotionparam.cpp b/indra/llcharacter/llkeyframemotionparam.cpp index c80aabe294..88c1a7ebe4 100644 --- a/indra/llcharacter/llkeyframemotionparam.cpp +++ b/indra/llcharacter/llkeyframemotionparam.cpp @@ -143,7 +143,7 @@ BOOL LLKeyframeMotionParam::onActivate() paramMotion.mMotion->activate(mActivationTimestamp); } } - return TRUE; + return true; } @@ -262,7 +262,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) LL_INFOS() << "Param Motion weight " << mPoseBlender.getBlendedPose()->getWeight() << LL_ENDL; - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -289,7 +289,7 @@ BOOL LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char if (!newMotion) { - return FALSE; + return false; } newMotion->setName(name); @@ -297,7 +297,7 @@ BOOL LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char // now add motion to this list mParameterizedMotions[param].insert(ParameterizedMotion(newMotion, value)); - return TRUE; + return true; } @@ -344,7 +344,7 @@ BOOL LLKeyframeMotionParam::loadMotions() if (!fp || fileSize == 0) { LL_INFOS() << "ERROR: can't open: " << path << LL_ENDL; - return FALSE; + return false; } // allocate a text buffer @@ -383,7 +383,7 @@ BOOL LLKeyframeMotionParam::loadMotions() if ( error ) { LL_INFOS() << "ERROR: error while reading from " << path << LL_ENDL; - return FALSE; + return false; } LL_INFOS() << "Loading parametric keyframe data for: " << getName() << LL_ENDL; @@ -410,7 +410,7 @@ BOOL LLKeyframeMotionParam::loadMotions() if ((num != 3)) { LL_INFOS() << "WARNING: can't read parametric motion" << LL_ENDL; - return FALSE; + return false; } addKeyframeMotion(strA, gAnimLibrary.stringToAnimState(std::string(strA)), strB, floatA); @@ -430,7 +430,7 @@ BOOL LLKeyframeMotionParam::loadMotions() num = sscanf(p, "%79s %79s %f", strA, strB, &floatA); /* Flawfinder: ignore */ } - return TRUE; + return true; } // End diff --git a/indra/llcharacter/llkeyframemotionparam.h b/indra/llcharacter/llkeyframemotionparam.h index 0fac3724d1..1911460972 100644 --- a/indra/llcharacter/llkeyframemotionparam.h +++ b/indra/llcharacter/llkeyframemotionparam.h @@ -68,7 +68,7 @@ public: // motions must specify whether or not they loop virtual BOOL getLoop() { - return TRUE; + return true; } // motions must report their total duration diff --git a/indra/llcharacter/llkeyframestandmotion.cpp b/indra/llcharacter/llkeyframestandmotion.cpp index 02c1d3cdbd..f99492fd47 100644 --- a/indra/llcharacter/llkeyframestandmotion.cpp +++ b/indra/llcharacter/llkeyframestandmotion.cpp @@ -166,7 +166,7 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask) BOOL status = LLKeyframeMotion::onUpdate(time, joint_mask); if (!status) { - return FALSE; + return false; } LLVector3 root_world_pos = mPelvisState->getJoint()->getParent()->getWorldPosition(); @@ -174,7 +174,7 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask) // have we received a valid world position for this avatar? if (root_world_pos.isExactlyZero()) { - return TRUE; + return true; } //------------------------------------------------------------------------- @@ -255,7 +255,7 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask) else if (mFrameNum < 2) { mFrameNum++; - return TRUE; + return true; } mFrameNum++; @@ -336,7 +336,7 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask) //LL_INFOS() << "Stand drift amount " << (mCharacter->getCharacterPosition() - mLastGoodPosition).magVec() << LL_ENDL; // LL_INFOS() << "DEBUG: " << speed << " : " << mTrackAnkles << LL_ENDL; - return TRUE; + return true; } // End diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index 298b37e60c..ae0a03925d 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -191,7 +191,7 @@ BOOL LLWalkAdjustMotion::onActivate() F32 rightAnkleOffset = (mRightAnkleJoint->getWorldPosition() - mCharacter->getCharacterPosition()).magVec(); mAnkleOffset = llmax(leftAnkleOffset, rightAnkleOffset); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -315,7 +315,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) // need to update *some* joint to keep this animation active mPelvisState->setPosition(mPelvisOffset); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -367,7 +367,7 @@ BOOL LLFlyAdjustMotion::onActivate() mPelvisState->setPosition(LLVector3::zero); mPelvisState->setRotation(LLQuaternion::DEFAULT); mRoll = 0.f; - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -388,6 +388,6 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f)); mPelvisState->setRotation(roll); - return TRUE; + return true; } diff --git a/indra/llcharacter/llkeyframewalkmotion.h b/indra/llcharacter/llkeyframewalkmotion.h index 0e8d21b765..cb76995995 100644 --- a/indra/llcharacter/llkeyframewalkmotion.h +++ b/indra/llcharacter/llkeyframewalkmotion.h @@ -104,7 +104,7 @@ public: virtual void onDeactivate(); virtual BOOL onUpdate(F32 time, U8* joint_mask); virtual LLJoint::JointPriority getPriority(){return LLJoint::HIGH_PRIORITY;} - virtual BOOL getLoop() { return TRUE; } + virtual BOOL getLoop() { return true; } virtual F32 getDuration() { return 0.f; } virtual F32 getEaseInDuration() { return 0.f; } virtual F32 getEaseOutDuration() { return 0.f; } @@ -154,7 +154,7 @@ public: virtual void onDeactivate() {}; virtual BOOL onUpdate(F32 time, U8* joint_mask); virtual LLJoint::JointPriority getPriority(){return LLJoint::HIGHER_PRIORITY;} - virtual BOOL getLoop() { return TRUE; } + virtual BOOL getLoop() { return true; } virtual F32 getDuration() { return 0.f; } virtual F32 getEaseInDuration() { return 0.f; } virtual F32 getEaseOutDuration() { return 0.f; } diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp index 697efc8157..e07f8c5686 100644 --- a/indra/llcharacter/llmotion.cpp +++ b/indra/llcharacter/llmotion.cpp @@ -171,7 +171,7 @@ void LLMotion::deactivate() BOOL LLMotion::canDeprecate() { - return TRUE; + return true; } // End diff --git a/indra/llcharacter/llmotion.h b/indra/llcharacter/llmotion.h index aaa9a146d7..62c381aeb7 100644 --- a/indra/llcharacter/llmotion.h +++ b/indra/llcharacter/llmotion.h @@ -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; } }; @@ -225,7 +225,7 @@ public: static LLMotion *create(const LLUUID &id) { return new LLNullMotion(id); } // motions must specify whether or not they loop - /*virtual*/ BOOL getLoop() { return TRUE; } + /*virtual*/ BOOL getLoop() { return true; } // motions must report their total duration /*virtual*/ F32 getDuration() { return 1.f; } @@ -253,12 +253,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 activeTime, U8* joint_mask) { return TRUE; } + /*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 96e0d5e8d7..750547da93 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -82,10 +82,10 @@ BOOL LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor con if (!is_in_map(mMotionTable, id)) { mMotionTable[id] = constructor; - return TRUE; + return true; } - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -415,12 +415,12 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset) if (!motion) { - return FALSE; + return false; } //if the motion is already active and allows deprecation, then let it keep playing else if (motion->canDeprecate() && isMotionActive(motion)) { - return TRUE; + return true; } // LL_INFOS() << "Starting motion " << name << LL_ENDL; @@ -443,7 +443,7 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat { if (!motion) { - return FALSE; + return false; } @@ -455,15 +455,15 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat { deactivateMotionInstance(motion); } - return TRUE; + return true; } else if (isMotionLoading(motion)) { motion->setStopped(TRUE); - return TRUE; + return true; } - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -926,7 +926,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time) // hopefully this fixes it. if (motion == NULL || motion->getPose() == NULL) { - return FALSE; + return false; } if (mLoadingMotions.find(motion) != mLoadingMotions.end()) @@ -934,7 +934,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time) // we want to start this motion, but we can't yet, so flag it as started motion->setStopped(FALSE); // report pending animations as activated - return TRUE; + return true; } motion->mResidualWeight = motion->getPose()->getWeight(); @@ -978,7 +978,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time) } } - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -1001,7 +1001,7 @@ BOOL LLMotionController::deactivateMotionInstance(LLMotion *motion) mActiveMotions.remove(motion); } - return TRUE; + return true; } void LLMotionController::deprecateMotionInstance(LLMotion* motion) diff --git a/indra/llcharacter/llmultigesture.cpp b/indra/llcharacter/llmultigesture.cpp index 7ed242f90a..2938bf9473 100644 --- a/indra/llcharacter/llmultigesture.cpp +++ b/indra/llcharacter/llmultigesture.cpp @@ -133,10 +133,10 @@ BOOL LLMultiGesture::serialize(LLDataPacker& dp) const BOOL ok = step->serialize(dp); if (!ok) { - return FALSE; + return false; } } - return TRUE; + return true; } BOOL LLMultiGesture::deserialize(LLDataPacker& dp) @@ -148,7 +148,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) LL_WARNS() << "Bad LLMultiGesture version " << version << " should be " << GESTURE_VERSION << LL_ENDL; - return FALSE; + return false; } dp.unpackU8(mKey, "key"); @@ -164,7 +164,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) if (count < 0) { LL_WARNS() << "Bad LLMultiGesture step count " << count << LL_ENDL; - return FALSE; + return false; } S32 i; @@ -180,7 +180,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) { LLGestureStepAnimation* step = new LLGestureStepAnimation(); BOOL ok = step->deserialize(dp); - if (!ok) return FALSE; + if (!ok) return false; mSteps.push_back(step); break; } @@ -188,7 +188,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) { LLGestureStepSound* step = new LLGestureStepSound(); BOOL ok = step->deserialize(dp); - if (!ok) return FALSE; + if (!ok) return false; mSteps.push_back(step); break; } @@ -196,7 +196,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) { LLGestureStepChat* step = new LLGestureStepChat(); BOOL ok = step->deserialize(dp); - if (!ok) return FALSE; + if (!ok) return false; mSteps.push_back(step); break; } @@ -204,18 +204,18 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) { LLGestureStepWait* step = new LLGestureStepWait(); BOOL ok = step->deserialize(dp); - if (!ok) return FALSE; + if (!ok) return false; mSteps.push_back(step); break; } default: { LL_WARNS() << "Bad LLMultiGesture step type " << type << LL_ENDL; - return FALSE; + return false; } } } - return TRUE; + return true; } void LLMultiGesture::dump() @@ -267,7 +267,7 @@ BOOL LLGestureStepAnimation::serialize(LLDataPacker& dp) const dp.packString(mAnimName, "anim_name"); dp.packUUID(mAnimAssetID, "asset_id"); dp.packU32(mFlags, "flags"); - return TRUE; + return true; } BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp) @@ -284,7 +284,7 @@ BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp) dp.unpackUUID(mAnimAssetID, "asset_id"); dp.unpackU32(mFlags, "flags"); - return TRUE; + return true; } // *NOTE: result is translated in LLPreviewGesture::getLabel() std::vector<std::string> LLGestureStepAnimation::getLabel() const @@ -349,7 +349,7 @@ BOOL LLGestureStepSound::serialize(LLDataPacker& dp) const dp.packString(mSoundName, "sound_name"); dp.packUUID(mSoundAssetID, "asset_id"); dp.packU32(mFlags, "flags"); - return TRUE; + return true; } BOOL LLGestureStepSound::deserialize(LLDataPacker& dp) @@ -358,7 +358,7 @@ BOOL LLGestureStepSound::deserialize(LLDataPacker& dp) dp.unpackUUID(mSoundAssetID, "asset_id"); dp.unpackU32(mFlags, "flags"); - return TRUE; + return true; } // *NOTE: result is translated in LLPreviewGesture::getLabel() std::vector<std::string> LLGestureStepSound::getLabel() const @@ -408,7 +408,7 @@ BOOL LLGestureStepChat::serialize(LLDataPacker& dp) const { dp.packString(mChatText, "chat_text"); dp.packU32(mFlags, "flags"); - return TRUE; + return true; } BOOL LLGestureStepChat::deserialize(LLDataPacker& dp) @@ -416,7 +416,7 @@ BOOL LLGestureStepChat::deserialize(LLDataPacker& dp) dp.unpackString(mChatText, "chat_text"); dp.unpackU32(mFlags, "flags"); - return TRUE; + return true; } // *NOTE: result is translated in LLPreviewGesture::getLabel() std::vector<std::string> LLGestureStepChat::getLabel() const @@ -463,14 +463,14 @@ BOOL LLGestureStepWait::serialize(LLDataPacker& dp) const { dp.packF32(mWaitSeconds, "wait_seconds"); dp.packU32(mFlags, "flags"); - return TRUE; + return true; } BOOL LLGestureStepWait::deserialize(LLDataPacker& dp) { dp.unpackF32(mWaitSeconds, "wait_seconds"); dp.unpackU32(mFlags, "flags"); - return TRUE; + return true; } // *NOTE: result is translated in LLPreviewGesture::getLabel() std::vector<std::string> LLGestureStepWait::getLabel() const diff --git a/indra/llcharacter/llpose.cpp b/indra/llcharacter/llpose.cpp index 6f41a0e747..5acdfbf532 100644 --- a/indra/llcharacter/llpose.cpp +++ b/indra/llcharacter/llpose.cpp @@ -87,7 +87,7 @@ BOOL LLPose::addJointState(const LLPointer<LLJointState>& jointState) { mJointMap[jointState->getJoint()->getName()] = jointState; } - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -96,7 +96,7 @@ BOOL LLPose::addJointState(const LLPointer<LLJointState>& jointState) BOOL LLPose::removeJointState(const LLPointer<LLJointState>& jointState) { mJointMap.erase(jointState->getJoint()->getName()); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -105,7 +105,7 @@ BOOL LLPose::removeJointState(const LLPointer<LLJointState>& jointState) BOOL LLPose::removeAllJointStates() { mJointMap.clear(); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -199,7 +199,7 @@ BOOL LLJointStateBlender::addJointState(const LLPointer<LLJointState>& joint_sta if (!joint_state->getJoint()) // this joint state doesn't point to an actual joint, so we don't care about applying it - return FALSE; + return false; for(S32 i = 0; i < JSB_NUM_JOINT_STATES; i++) { @@ -208,7 +208,7 @@ BOOL LLJointStateBlender::addJointState(const LLPointer<LLJointState>& joint_sta mJointStates[i] = joint_state; mPriorities[i] = priority; mAdditiveBlends[i] = additive_blend; - return TRUE; + return true; } else if (priority > mPriorities[i]) { @@ -225,11 +225,11 @@ BOOL LLJointStateBlender::addJointState(const LLPointer<LLJointState>& joint_sta mJointStates[i] = joint_state; mPriorities[i] = priority; mAdditiveBlends[i] = additive_blend; - return TRUE; + return true; } } - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -503,7 +503,7 @@ BOOL LLPoseBlender::addMotion(LLMotion* motion) mActiveBlenders.push_front(joint_blender); } } - return TRUE; + return true; } //----------------------------------------------------------------------------- diff --git a/indra/llcharacter/llstatemachine.cpp b/indra/llcharacter/llstatemachine.cpp index 2e8214ffaf..30f37ce0c2 100644 --- a/indra/llcharacter/llstatemachine.cpp +++ b/indra/llcharacter/llstatemachine.cpp @@ -61,7 +61,7 @@ LLStateDiagram::~LLStateDiagram() BOOL LLStateDiagram::addState(LLFSMState *state) { mStates[state] = Transitions(); - return TRUE; + return true; } // add a directed transition between 2 states @@ -93,7 +93,7 @@ BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_stat } (*state_transitions)[&transition] = &end_state; - return TRUE; + return true; } // add an undirected transition between 2 states @@ -183,7 +183,7 @@ BOOL LLStateDiagram::stateIsValid(LLFSMState& state) { if (mStates.find(&state) != mStates.end()) { - return TRUE; + return true; } return FALSE; } @@ -248,7 +248,7 @@ BOOL LLStateDiagram::saveDotFile(const std::string& filename) apr_file_printf(dot_file, "}\n"); - return TRUE; + return true; } std::ostream& operator<<(std::ostream &s, LLStateDiagram &FSM) @@ -319,7 +319,7 @@ BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, { initial_state->onEntry(user_data); } - return TRUE; + return true; } return FALSE; @@ -338,7 +338,7 @@ BOOL LLStateMachine::setCurrentState(U32 state_id, void* user_data, BOOL skip_en { state->onEntry(user_data); } - return TRUE; + return true; } return FALSE; diff --git a/indra/llcharacter/lltargetingmotion.cpp b/indra/llcharacter/lltargetingmotion.cpp index ec75212a40..0697d04fd3 100644 --- a/indra/llcharacter/lltargetingmotion.cpp +++ b/indra/llcharacter/lltargetingmotion.cpp @@ -95,7 +95,7 @@ LLMotion::LLMotionInitStatus LLTargetingMotion::onInitialize(LLCharacter *charac //----------------------------------------------------------------------------- BOOL LLTargetingMotion::onActivate() { - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -113,7 +113,7 @@ BOOL LLTargetingMotion::onUpdate(F32 time, U8* joint_mask) if (!lookAtPoint) { - return TRUE; + return true; } else { diff --git a/indra/llcharacter/lltargetingmotion.h b/indra/llcharacter/lltargetingmotion.h index 0971417e1e..b9b838c197 100644 --- a/indra/llcharacter/lltargetingmotion.h +++ b/indra/llcharacter/lltargetingmotion.h @@ -66,7 +66,7 @@ public: //------------------------------------------------------------------------- // motions must specify whether or not they loop - virtual BOOL getLoop() { return TRUE; } + virtual BOOL getLoop() { return true; } // motions must report their total duration virtual F32 getDuration() { return 0.0; } diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp index 2235496ac5..9976de9f6f 100644 --- a/indra/llcharacter/llvisualparam.cpp +++ b/indra/llcharacter/llvisualparam.cpp @@ -138,7 +138,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node) mMaxName = "More"; } - return TRUE; + return true; } //virtual @@ -215,7 +215,7 @@ BOOL LLVisualParam::setInfo(LLVisualParamInfo *info) mInfo = info; mID = info->mID; setWeight(getDefaultWeight(), FALSE ); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -229,7 +229,7 @@ BOOL LLVisualParam::parseData(LLXmlTreeNode *node) if (!setInfo(info)) return FALSE; - return TRUE; + return true; } */ @@ -336,7 +336,7 @@ void LLVisualParam::stopAnimating() BOOL LLVisualParam::linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params) { // nothing to do for non-driver parameters - return TRUE; + return true; } //virtual diff --git a/indra/llcommon/is_approx_equal_fraction.h b/indra/llcommon/is_approx_equal_fraction.h index 4a9b2e2725..e86d58b70f 100644 --- a/indra/llcommon/is_approx_equal_fraction.h +++ b/indra/llcommon/is_approx_equal_fraction.h @@ -45,7 +45,7 @@ template <typename FTYPE> inline BOOL is_approx_equal_fraction_impl(FTYPE x, FTYPE y, U32 frac_bits) { - BOOL ret = TRUE; + BOOL ret = true; FTYPE diff = (FTYPE) fabs(x - y); S32 diffInt = (S32) diff; @@ -58,7 +58,7 @@ inline BOOL is_approx_equal_fraction_impl(FTYPE x, FTYPE y, U32 frac_bits) // based on the number of bits used for packing decimal portion. if (diffInt != 0 || diffFracTolerance > 1) { - ret = FALSE; + ret = false; } return ret; diff --git a/indra/llcommon/llcallbacklist.cpp b/indra/llcommon/llcallbacklist.cpp index 4ccf08cbbb..3b63d8f95a 100644 --- a/indra/llcommon/llcallbacklist.cpp +++ b/indra/llcommon/llcallbacklist.cpp @@ -194,7 +194,7 @@ private: BOOL tick() { mCallable(); - return TRUE; + return true; } nullary_func_t mCallable; diff --git a/indra/llcommon/llmainthreadtask.h b/indra/llcommon/llmainthreadtask.h index d509b687c0..878f57cab6 100644 --- a/indra/llcommon/llmainthreadtask.h +++ b/indra/llcommon/llmainthreadtask.h @@ -85,7 +85,7 @@ private: // obtained by get_future() mTask(); // tell LLEventTimer we're done (one shot) - return TRUE; + return true; } // Given arbitrary CALLABLE, which might be a lambda, how are we // supposed to obtain its signature for std::packaged_task? It seems diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 66ee42af2a..3620a5b211 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -314,7 +314,7 @@ public: static void toLower(string_type& string); // True if this is the head of s. - static BOOL isHead( const string_type& string, const T* s ); + static bool isHead( const string_type& string, const T* s ); /** * @brief Returns true if string starts with substr @@ -356,7 +356,7 @@ public: static void replaceChar( string_type& string, T target, T replacement ); static void replaceString( string_type& string, string_type target, string_type replacement ); - static BOOL containsNonprintable(const string_type& string); + static bool containsNonprintable(const string_type& string); static void stripNonprintable(string_type& string); /** @@ -382,15 +382,15 @@ public: static void _makeASCII(string_type& string); // Conversion to other data types - 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); - static BOOL convertToU16(const string_type& string, U16& value); - static BOOL convertToU32(const string_type& string, U32& value); - static BOOL convertToS32(const string_type& string, S32& value); - static BOOL convertToF32(const string_type& string, F32& value); - static BOOL convertToF64(const string_type& string, F64& 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); + static bool convertToU16(const string_type& string, U16& value); + static bool convertToU32(const string_type& string, U32& value); + static bool convertToS32(const string_type& string, S32& value); + static bool convertToF32(const string_type& string, F32& value); + static bool convertToF64(const string_type& string, F64& value); ///////////////////////////////////////////////////////////////////////////////////////// // Utility functions for working with char*'s and strings @@ -415,7 +415,7 @@ public: static S32 compareDictInsensitive(const string_type& a, const string_type& b); // Puts compareDict() in a form appropriate for LL container classes to use for sorting. - static BOOL precedesDict( const string_type& a, const string_type& b ); + static bool precedesDict( const string_type& a, const string_type& b ); // A replacement for strncpy. // If the dst buffer is dst_size bytes long or more, ensures that dst is null terminated and holds @@ -1362,7 +1362,7 @@ S32 LLStringUtilBase<T>::compareDictInsensitive(const string_type& astr, const s // Puts compareDict() in a form appropriate for LL container classes to use for sorting. // static template<class T> -BOOL LLStringUtilBase<T>::precedesDict( const string_type& a, const string_type& b ) +bool LLStringUtilBase<T>::precedesDict( const string_type& a, const string_type& b ) { if( a.size() && b.size() ) { @@ -1595,10 +1595,10 @@ void LLStringUtilBase<T>::replaceTabsWithSpaces( string_type& str, size_type spa //static template<class T> -BOOL LLStringUtilBase<T>::containsNonprintable(const string_type& string) +bool LLStringUtilBase<T>::containsNonprintable(const string_type& string) { const char MIN = 32; - BOOL rv = false; + bool rv = false; for (size_type i = 0; i < string.size(); i++) { if(string[i] < MIN) @@ -1732,12 +1732,12 @@ void LLStringUtilBase<T>::copyInto(string_type& dst, const string_type& src, siz // True if this is the head of s. //static template<class T> -BOOL LLStringUtilBase<T>::isHead( const string_type& string, const T* s ) -{ +bool LLStringUtilBase<T>::isHead( const string_type& string, const T* s ) +{ if( string.empty() ) { // Early exit - return FALSE; + return false; } else { @@ -1804,11 +1804,11 @@ auto LLStringUtilBase<T>::getenv(const std::string& key, const string_type& dflt } template<class T> -BOOL LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value) +bool LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value) { if( string.empty() ) { - return FALSE; + return false; } string_type temp( string ); @@ -1821,8 +1821,8 @@ BOOL LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value) (temp == "true") || (temp == "True") ) { - value = TRUE; - return TRUE; + value = true; + return true; } else if( @@ -1833,71 +1833,71 @@ BOOL LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value) (temp == "false") || (temp == "False") ) { - value = FALSE; - return TRUE; + value = false; + return true; } - return FALSE; + return false; } template<class T> -BOOL LLStringUtilBase<T>::convertToU8(const string_type& string, U8& value) +bool LLStringUtilBase<T>::convertToU8(const string_type& string, U8& value) { S32 value32 = 0; - BOOL success = convertToS32(string, value32); + bool success = convertToS32(string, value32); if( success && (U8_MIN <= value32) && (value32 <= U8_MAX) ) { value = (U8) value32; - return TRUE; + return true; } - return FALSE; + return false; } template<class T> -BOOL LLStringUtilBase<T>::convertToS8(const string_type& string, S8& value) +bool LLStringUtilBase<T>::convertToS8(const string_type& string, S8& value) { S32 value32 = 0; - BOOL success = convertToS32(string, value32); + bool success = convertToS32(string, value32); if( success && (S8_MIN <= value32) && (value32 <= S8_MAX) ) { value = (S8) value32; - return TRUE; + return true; } - return FALSE; + return false; } template<class T> -BOOL LLStringUtilBase<T>::convertToS16(const string_type& string, S16& value) +bool LLStringUtilBase<T>::convertToS16(const string_type& string, S16& value) { S32 value32 = 0; - BOOL success = convertToS32(string, value32); + bool success = convertToS32(string, value32); if( success && (S16_MIN <= value32) && (value32 <= S16_MAX) ) { value = (S16) value32; - return TRUE; + return true; } - return FALSE; + return false; } template<class T> -BOOL LLStringUtilBase<T>::convertToU16(const string_type& string, U16& value) +bool LLStringUtilBase<T>::convertToU16(const string_type& string, U16& value) { S32 value32 = 0; - BOOL success = convertToS32(string, value32); + bool success = convertToS32(string, value32); if( success && (U16_MIN <= value32) && (value32 <= U16_MAX) ) { value = (U16) value32; - return TRUE; + return true; } - return FALSE; + return false; } template<class T> -BOOL LLStringUtilBase<T>::convertToU32(const string_type& string, U32& value) +bool LLStringUtilBase<T>::convertToU32(const string_type& string, U32& value) { if( string.empty() ) { - return FALSE; + return false; } string_type temp( string ); @@ -1907,17 +1907,17 @@ BOOL LLStringUtilBase<T>::convertToU32(const string_type& string, U32& value) if(i_stream >> v) { value = v; - return TRUE; + return true; } - return FALSE; + return false; } template<class T> -BOOL LLStringUtilBase<T>::convertToS32(const string_type& string, S32& value) +bool LLStringUtilBase<T>::convertToS32(const string_type& string, S32& value) { if( string.empty() ) { - return FALSE; + return false; } string_type temp( string ); @@ -1930,34 +1930,34 @@ BOOL LLStringUtilBase<T>::convertToS32(const string_type& string, S32& value) //if((LONG_MAX == v) || (LONG_MIN == v)) //{ // // Underflow or overflow - // return FALSE; + // return false; //} value = v; - return TRUE; + return true; } - return FALSE; + return false; } template<class T> -BOOL LLStringUtilBase<T>::convertToF32(const string_type& string, F32& value) +bool LLStringUtilBase<T>::convertToF32(const string_type& string, F32& value) { F64 value64 = 0.0; - BOOL success = convertToF64(string, value64); + bool success = convertToF64(string, value64); if( success && (-F32_MAX <= value64) && (value64 <= F32_MAX) ) { value = (F32) value64; - return TRUE; + return true; } - return FALSE; + return false; } template<class T> -BOOL LLStringUtilBase<T>::convertToF64(const string_type& string, F64& value) +bool LLStringUtilBase<T>::convertToF64(const string_type& string, F64& value) { if( string.empty() ) { - return FALSE; + return false; } string_type temp( string ); @@ -1970,13 +1970,13 @@ BOOL LLStringUtilBase<T>::convertToF64(const string_type& string, F64& value) //if( ((-HUGE_VAL == v) || (HUGE_VAL == v))) ) //{ // // Underflow or overflow - // return FALSE; + // return false; //} value = v; - return TRUE; + return true; } - return FALSE; + return false; } template<class T> diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index bba2e2505d..aa9d9572be 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -370,20 +370,20 @@ BOOL LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) con if (agent_id == LLUUID::null) { // system always can enter - return TRUE; + return true; } else if (isPublic()) { - return TRUE; + return true; } else if (agent_id == mOwnerID) { // owner can always perform operations - return TRUE; + return true; } else if (mParcelFlags & PF_CREATE_OBJECTS) { - return TRUE; + return true; } else if ((mParcelFlags & PF_CREATE_GROUP_OBJECTS) && group_id.notNull() ) @@ -391,7 +391,7 @@ BOOL LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) con return (getGroupID() == group_id); } - return FALSE; + return false; } BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const @@ -399,14 +399,14 @@ BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const if (agent_id == LLUUID::null) { // system always can enter - return TRUE; + return true; } else if(OS_LEASED == mStatus) { if(agent_id == mOwnerID) { // owner can modify leased land - return TRUE; + return true; } else { @@ -416,7 +416,7 @@ BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const } else { - return FALSE; + return false; } } @@ -728,21 +728,21 @@ void LLParcel::expirePasses(S32 now) bool LLParcel::operator==(const LLParcel &rhs) const { if (mOwnerID != rhs.mOwnerID) - return FALSE; + return false; if (mParcelFlags != rhs.mParcelFlags) - return FALSE; + return false; if (mClaimDate != rhs.mClaimDate) - return FALSE; + return false; if (mClaimPricePerMeter != rhs.mClaimPricePerMeter) - return FALSE; + return false; if (mRentPricePerMeter != rhs.mRentPricePerMeter) - return FALSE; + return false; - return TRUE; + return true; } // Calculate rent @@ -791,12 +791,12 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time) { if (mAccessList.size() >= (U32) PARCEL_MAX_ACCESS_LIST) { - return FALSE; + return false; } if (agent_id == getOwnerID()) { // Can't add owner to these lists - return FALSE; + return false; } LLAccessEntry::map::iterator itor = mAccessList.begin(); while (itor != mAccessList.end()) @@ -811,7 +811,7 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time) else { // existing one expires later - return FALSE; + return false; } } else @@ -825,7 +825,7 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time) new_entry.mTime = time; new_entry.mFlags = 0x0; mAccessList[new_entry.mID] = new_entry; - return TRUE; + return true; } BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time) @@ -833,12 +833,12 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time) if (mBanList.size() >= (U32) PARCEL_MAX_ACCESS_LIST) { // Not using ban list, so not a rational thing to do - return FALSE; + return false; } if (agent_id == getOwnerID()) { // Can't add owner to these lists - return FALSE; + return false; } LLAccessEntry::map::iterator itor = mBanList.begin(); @@ -854,7 +854,7 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time) else { // existing one expires later - return FALSE; + return false; } } else @@ -868,7 +868,7 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time) new_entry.mTime = time; new_entry.mFlags = 0x0; mBanList[new_entry.mID] = new_entry; - return TRUE; + return true; } BOOL remove_from_access_array(std::map<LLUUID,LLAccessEntry>* list, @@ -951,7 +951,7 @@ BOOL LLParcel::isSaleTimerExpired(const U64& time) { if (mSaleTimerExpires.getStarted() == FALSE) { - return FALSE; + return false; } BOOL expired = mSaleTimerExpires.checkExpirationAndReset(0.0); if (expired) @@ -965,7 +965,7 @@ BOOL LLParcel::isMediaResetTimerExpired(const U64& time) { if (mMediaResetTimer.getStarted() == FALSE) { - return FALSE; + return false; } BOOL expired = mMediaResetTimer.checkExpirationAndReset(0.0); if (expired) @@ -1078,7 +1078,7 @@ BOOL LLParcel::isBuyerAuthorized(const LLUUID& buyer_id) const { if(mAuthBuyerID.isNull()) { - return TRUE; + return true; } return (mAuthBuyerID == buyer_id); } diff --git a/indra/llmath/llquaternion.cpp b/indra/llmath/llquaternion.cpp index 57a976b57a..1e7c39df65 100644 --- a/indra/llmath/llquaternion.cpp +++ b/indra/llmath/llquaternion.cpp @@ -963,7 +963,7 @@ BOOL LLQuaternion::parseQuat(const std::string& buf, LLQuaternion* value) { if( buf.empty() || value == NULL) { - return FALSE; + return false; } LLQuaternion quat; @@ -971,10 +971,10 @@ BOOL LLQuaternion::parseQuat(const std::string& buf, LLQuaternion* value) if( 4 == count ) { value->set( quat ); - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/indra/llmath/raytrace.cpp b/indra/llmath/raytrace.cpp index fde12876c7..314255374a 100644 --- a/indra/llmath/raytrace.cpp +++ b/indra/llmath/raytrace.cpp @@ -1226,7 +1226,7 @@ BOOL linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b, { if (segment_length >= (point_a - intersection).magVec()) { - return TRUE; + return true; } } return FALSE; diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h index 068f489020..31abf433a0 100644 --- a/indra/llmath/v3math.h +++ b/indra/llmath/v3math.h @@ -119,7 +119,7 @@ class LLVector3 const LLVector3& scaleVec(const LLVector3& vec); // scales per component by vec 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 isNull() const; // Returns TRUE if vector has a _very_small_ length BOOL isExactlyZero() const { return !mV[VX] && !mV[VY] && !mV[VZ]; } F32 operator[](int idx) const { return mV[idx]; } @@ -539,13 +539,13 @@ inline LLVector3 lerp(const LLVector3 &a, const LLVector3 &b, F32 u) } -inline BOOL LLVector3::isNull() const +inline bool LLVector3::isNull() const { if ( F_APPROXIMATELY_ZERO > mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ] ) { - return TRUE; + return true; } - return FALSE; + return false; } inline void update_min_max(LLVector3& min, LLVector3& max, const LLVector3& pos) @@ -598,9 +598,9 @@ inline BOOL are_parallel(const LLVector3 &a, const LLVector3 &b, F32 epsilon) F32 dot = an * bn; if ( (1.0f - fabs(dot)) < epsilon) { - return TRUE; + return true; } - return FALSE; + return false; } inline std::ostream& operator<<(std::ostream& s, const LLVector3 &a) diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index b53d573bae..1abf6832fb 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -179,7 +179,7 @@ LLSD LLControlVariable::getComparableValue(const LLSD& value) if(TYPE_BOOLEAN == type() && value.isString()) { BOOL temp; - if(LLStringUtil::convertToBOOL(value.asString(), temp)) + if(LLStringUtil::convertToBOOL(value.asString(), temp)) { storable_value = (bool)temp; } diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index 06d959ba3c..794bb78b9c 100644 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -572,7 +572,7 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value, // There's a token. check the string for true/false/1/0 etc. BOOL result = false; - BOOL gotSet = LLStringUtil::convertToBOOL(token, result); + bool gotSet = LLStringUtil::convertToBOOL(token, result); if (gotSet) { ctrl->setValue(LLSD(result), false); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c95648d62e..3332a2ef53 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6904,17 +6904,17 @@ void LLVOAvatar::requestStopMotion( LLMotion* motion ) // loadSkeletonNode(): loads <skeleton> node from XML tree //----------------------------------------------------------------------------- //virtual -BOOL LLVOAvatar::loadSkeletonNode () +bool LLVOAvatar::loadSkeletonNode () { if (!LLAvatarAppearance::loadSkeletonNode()) { - return FALSE; + return false; } bool ignore_hud_joints = false; initAttachmentPoints(ignore_hud_joints); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -7883,9 +7883,9 @@ S32 LLVOAvatar::getAttachmentCount() return count; } -BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const +bool LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const { - if (mIsDummy) return TRUE; + if (mIsDummy) return true; if (isSelf()) { @@ -7898,7 +7898,7 @@ BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const case LLWearableType::WT_SKIN: case LLWearableType::WT_HAIR: case LLWearableType::WT_EYES: - return TRUE; // everyone has all bodyparts + return true; // everyone has all bodyparts default: break; // Do nothing } @@ -7919,10 +7919,10 @@ BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; return isTextureDefined(LLAvatarAppearance::getDictionary()->getBakedTexture(baked_index)->mTextureIndex); } - return FALSE; + return false; } } - return FALSE; + return false; } LLViewerObject * LLVOAvatar::findAttachmentByID( const LLUUID & target_id ) const @@ -11462,17 +11462,17 @@ F32 calc_bouncy_animation(F32 x) } //virtual -BOOL LLVOAvatar::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U32 index ) const +bool LLVOAvatar::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U32 index ) const { if (isIndexLocalTexture(te)) { - return FALSE; + return false; } if( !getImage( te, index ) ) { LL_WARNS() << "getImage( " << te << ", " << index << " ) returned 0" << LL_ENDL; - return FALSE; + return false; } return (getImage(te, index)->getID() != IMG_DEFAULT_AVATAR && diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 759d02959c..81831c3829 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -461,7 +461,7 @@ public: void debugBodySize() const; void postPelvisSetRecalc( void ); - /*virtual*/ BOOL loadSkeletonNode(); + /*virtual*/ bool loadSkeletonNode(); void initAttachmentPoints(bool ignore_hud_joints = false); /*virtual*/ void buildCharacter(); void resetVisualParams(); @@ -701,7 +701,7 @@ public: // Loading status //-------------------------------------------------------------------- public: - virtual BOOL isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const; + virtual bool isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const; virtual BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const; virtual BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const; @@ -875,11 +875,11 @@ public: // True if we are computing our appearance via local compositing // instead of baked textures, as for example during wearable // editing or when waiting for a subsequent server rebake. - /*virtual*/ BOOL isUsingLocalAppearance() const { return mUseLocalAppearance; } + /*virtual*/ bool isUsingLocalAppearance() const { return mUseLocalAppearance; } // True if we are currently in appearance editing mode. Often but // not always the same as isUsingLocalAppearance(). - /*virtual*/ BOOL isEditingAppearance() const { return mIsEditingAppearance; } + /*virtual*/ bool isEditingAppearance() const { return mIsEditingAppearance; } // FIXME review isUsingLocalAppearance uses, some should be isEditing instead. @@ -887,7 +887,7 @@ private: BOOL mAppearanceAnimating; LLFrameTimer mAppearanceMorphTimer; F32 mLastAppearanceBlendTime; - BOOL mIsEditingAppearance; // flag for if we're actively in appearance editing mode + bool mIsEditingAppearance; // flag for if we're actively in appearance editing mode BOOL mUseLocalAppearance; // flag for if we're using a local composite //-------------------------------------------------------------------- @@ -919,7 +919,7 @@ public: void cleanupAttachedMesh( LLViewerObject* pVO ); bool hasPendingAttachedMeshes(); static LLVOAvatar* findAvatarFromAttachment(LLViewerObject* obj); - /*virtual*/ BOOL isWearingWearableType(LLWearableType::EType type ) const; + /*virtual*/ bool isWearingWearableType(LLWearableType::EType type ) const; LLViewerObject * findAttachmentByID( const LLUUID & target_id ) const; LLViewerJointAttachment* getTargetAttachmentPoint(LLViewerObject* viewer_object); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 7b24b9ee02..528407b82c 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -300,9 +300,9 @@ void LLVOAvatarSelf::markDead() LLVOAvatar::markDead(); } -/*virtual*/ BOOL LLVOAvatarSelf::loadAvatar() +/*virtual*/ bool LLVOAvatarSelf::loadAvatar() { - BOOL success = LLVOAvatar::loadAvatar(); + bool success = LLVOAvatar::loadAvatar(); // set all parameters stored directly in the avatar to have // the isSelfParam to be TRUE - this is used to prevent @@ -314,7 +314,7 @@ void LLVOAvatarSelf::markDead() { if (param->getWearableType() != LLWearableType::WT_INVALID) { - param->setIsDummy(TRUE); + param->setIsDummy(true); } } @@ -691,7 +691,7 @@ bool LLVOAvatarSelf::updateCharacter(LLAgent &agent) } // virtual -BOOL LLVOAvatarSelf::isValid() const +bool LLVOAvatarSelf::isValid() const { return ((getRegion() != NULL) && !isDead()); } @@ -1516,7 +1516,7 @@ BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const return TRUE; } -BOOL LLVOAvatarSelf::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const +bool LLVOAvatarSelf::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const { LLUUID id; BOOL isDefined = TRUE; diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 6384e2b844..a121ef356e 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -59,7 +59,7 @@ public: virtual void initInstance(); // Called after construction to initialize the class. void cleanup(); protected: - /*virtual*/ BOOL loadAvatar(); + /*virtual*/ bool loadAvatar(); BOOL loadAvatarSelf(); BOOL buildSkeletonSelf(const LLAvatarSkeletonInfo *info); BOOL buildMenus(); @@ -110,7 +110,7 @@ private: public: /*virtual*/ bool isSelf() const { return true; } - /*virtual*/ BOOL isValid() const; + /*virtual*/ bool isValid() const; //-------------------------------------------------------------------- // Updates @@ -180,7 +180,7 @@ public: BOOL isLocalTextureDataAvailable(const LLViewerTexLayerSet* layerset) const; BOOL isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset) 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 isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const; /*virtual*/ BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const; /*virtual*/ BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const; |