diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index e961658390..9adff997b0 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; } @@ -347,7 +347,7 @@ void LLAvatarAppearance::initClass(const std::string& avatar_file_name_arg, cons avatar_file_name = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,AVATAR_DEFAULT_CHAR + "_lad.xml"); } LLXmlTree xml_tree; - BOOL success = xml_tree.parseFile( avatar_file_name, FALSE ); + bool success = xml_tree.parseFile( avatar_file_name, FALSE ); if (!success) { LL_ERRS() << "Problem reading avatar configuration file:" << avatar_file_name << LL_ENDL; @@ -588,17 +588,17 @@ F32 LLAvatarAppearance::getAvatarOffset() /*const*/ //----------------------------------------------------------------------------- // 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 @@ -606,13 +606,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; @@ -620,16 +620,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; @@ -645,7 +645,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 ); } @@ -654,7 +654,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 ); @@ -694,17 +694,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( S32 num ) +bool LLAvatarAppearance::allocateCharacterJoints( S32 num ) { if (mSkeleton.size() != num) { @@ -714,14 +714,14 @@ BOOL LLAvatarAppearance::allocateCharacterJoints( S32 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; @@ -729,7 +729,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 @@ -738,7 +738,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; } } @@ -749,11 +749,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; } //----------------------------------------------------------------------------- @@ -836,7 +836,7 @@ void LLAvatarAppearance::buildCharacter() //------------------------------------------------------------------------- LLTimer timer; - BOOL status = loadAvatar(); + bool status = loadAvatar(); stop_glerror(); // gPrintMessagesThisFrame = TRUE; @@ -914,7 +914,7 @@ void LLAvatarAppearance::buildCharacter() } -BOOL LLAvatarAppearance::loadAvatar() +bool LLAvatarAppearance::loadAvatar() { // LL_RECORD_BLOCK_TIME(FTM_LOAD_AVATAR); @@ -922,7 +922,7 @@ BOOL LLAvatarAppearance::loadAvatar() if( !buildSkeleton(sAvatarSkeletonInfo) ) { LL_ERRS() << "avatar file: buildSkeleton() failed" << LL_ENDL; - return FALSE; + return false; } // initialize mJointAliasMap @@ -932,14 +932,14 @@ BOOL LLAvatarAppearance::loadAvatar() if( !loadSkeletonNode() ) { LL_ERRS() << "avatar file: loadNodeSkeleton() failed" << LL_ENDL; - return FALSE; + return false; } // avatar_lad.xml : if( !loadMeshNodes() ) { LL_ERRS() << "avatar file: loadNodeMesh() failed" << LL_ENDL; - return FALSE; + return false; } // avatar_lad.xml : @@ -949,13 +949,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() << " name=\"skin_color\" not found" << LL_ENDL; - return FALSE; + return false; } if( sAvatarXmlInfo->mTexHairColorInfo ) { @@ -963,13 +963,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() << " name=\"hair_color\" not found" << LL_ENDL; - return FALSE; + return false; } if( sAvatarXmlInfo->mTexEyeColorInfo ) { @@ -977,26 +977,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() << " name=\"eye_color\" not found" << LL_ENDL; - return FALSE; + return false; } // avatar_lad.xml : if (sAvatarXmlInfo->mLayerInfoList.empty()) { LL_ERRS() << "avatar file: missing node" << LL_ENDL; - return FALSE; + return false; } if (sAvatarXmlInfo->mMorphMaskInfoList.empty()) { LL_ERRS() << "avatar file: missing node" << LL_ENDL; - return FALSE; + return false; } // avatar_lad.xml : @@ -1010,7 +1010,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); } } @@ -1038,17 +1038,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 node from XML tree //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::loadSkeletonNode () +bool LLAvatarAppearance::loadSkeletonNode () { mRoot->addChild( mSkeleton[0] ); @@ -1092,7 +1092,7 @@ BOOL LLAvatarAppearance::loadSkeletonNode () if (!param->setInfo(info)) { delete param; - return FALSE; + return false; } else { @@ -1103,13 +1103,13 @@ BOOL LLAvatarAppearance::loadSkeletonNode () } - return TRUE; + return true; } //----------------------------------------------------------------------------- // loadMeshNodes(): loads nodes from XML tree //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::loadMeshNodes() +bool LLAvatarAppearance::loadMeshNodes() { for (const LLAvatarXmlInfo::LLAvatarMeshInfo* info : sAvatarXmlInfo->mMeshInfoList) { @@ -1118,7 +1118,7 @@ BOOL LLAvatarAppearance::loadMeshNodes() LLAvatarJointMesh* mesh = NULL; U8 mesh_id = 0; - BOOL found_mesh_id = FALSE; + bool found_mesh_id = FALSE; /* if (type == "hairMesh") switch(lod) @@ -1145,13 +1145,13 @@ BOOL LLAvatarAppearance::loadMeshNodes() else { LL_WARNS() << "Avatar file: 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; @@ -1174,7 +1174,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 @@ -1186,7 +1186,7 @@ BOOL LLAvatarAppearance::loadMeshNodes() if( !poly_mesh ) { LL_WARNS() << "Failed to load mesh of type " << type << LL_ENDL; - return FALSE; + return false; } // Multimap insert @@ -1201,7 +1201,7 @@ BOOL LLAvatarAppearance::loadMeshNodes() if (!param->setInfo((LLPolyMorphTargetInfo*)info_pair.first)) { delete param; - return FALSE; + return false; } else { @@ -1219,15 +1219,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()) @@ -1240,7 +1240,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 @@ -1262,7 +1262,7 @@ BOOL LLAvatarAppearance::loadLayersets() { LL_WARNS() << " 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 @@ -1369,19 +1369,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) { @@ -1392,7 +1392,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 ) { @@ -1476,10 +1476,10 @@ BOOL LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name ) default: llassert(0); - return FALSE; + return false; } - return TRUE; + return true; } // [Legacy Bake] @@ -1543,7 +1543,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; } @@ -1560,7 +1560,7 @@ LLTexLayerSet* LLAvatarAppearance::getAvatarLayerSet(EBakedTextureIndex baked_in //----------------------------------------------------------------------------- // allocateCollisionVolumes() //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num ) +bool LLAvatarAppearance::allocateCollisionVolumes( U32 num ) { if (mNumCollisionVolumes !=num) { @@ -1571,18 +1571,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")) { @@ -1591,7 +1591,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"); @@ -1609,28 +1609,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"); @@ -1653,7 +1653,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) if (!node->getFastAttributeVector3(pivot_string, mPivot)) { LL_WARNS() << "Bone without pivot" << LL_ENDL; - return FALSE; + return false; } } @@ -1665,23 +1665,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"); @@ -1695,11 +1695,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. @@ -1767,13 +1767,13 @@ const LLAvatarAppearance::joint_alias_map_t& LLAvatarAppearance::getJointAliases //----------------------------------------------------------------------------- // parseXmlSkeletonNode(): parses 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 " << LL_ENDL; - return FALSE; + return false; } LLXmlTreeNode* child; @@ -1793,14 +1793,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); @@ -1818,7 +1818,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"); @@ -1826,7 +1826,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"); @@ -1852,7 +1852,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"); @@ -1867,13 +1867,13 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro mAttachmentInfoList.push_back(info); } - return TRUE; + return true; } //----------------------------------------------------------------------------- // parseXmlMeshNodes(): parses nodes from XML tree //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) +bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { for (LLXmlTreeNode* node = root->getChildByName( "mesh" ); node; @@ -1887,7 +1887,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { LL_WARNS() << "Avatar file: 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"); @@ -1895,7 +1895,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { LL_WARNS() << "Avatar file: 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"); @@ -1903,7 +1903,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { LL_WARNS() << "Avatar file: 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"); @@ -1938,7 +1938,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { LL_WARNS() << "Unknown param type." << LL_ENDL; } - return FALSE; + return false; } LLPolyMorphTargetInfo *morphinfo = new LLPolyMorphTargetInfo(); @@ -1946,9 +1946,9 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { delete morphinfo; delete info; - return -1; + return false; } - BOOL shared = FALSE; + BOOL shared = false; static LLStdStringHandle shared_string = LLXmlTree::addAttributeString("shared"); child->getFastAttributeBOOL(shared_string, shared); @@ -1957,13 +1957,13 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) mMeshInfoList.push_back(info); } - return TRUE; + return true; } //----------------------------------------------------------------------------- // parseXmlColorNodes(): parses 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; @@ -1978,14 +1978,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" ) @@ -1993,14 +1993,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" ) @@ -2008,24 +2008,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 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; @@ -2040,16 +2040,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 nodes from XML tree //----------------------------------------------------------------------------- -BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* root) +bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* root) { LLXmlTreeNode* driver = root->getChildByName( "driver_parameters" ); if( driver ) @@ -2069,23 +2069,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 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" ); @@ -2099,7 +2099,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"); @@ -2107,7 +2107,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"); @@ -2115,7 +2115,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. @@ -2125,12 +2125,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 d9365af751..75fd5a9c20 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; } @@ -162,21 +162,21 @@ 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(); // [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8) virtual F32 getAvatarOffset() /*const*/; // [/RLVa:KB] // [Legacy Bake] virtual void bodySizeChanged() = 0; - BOOL setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 ¤t_volume_num, S32 ¤t_joint_num); - BOOL allocateCharacterJoints(S32 num); - BOOL buildSkeleton(const LLAvatarSkeletonInfo *info); + bool setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 ¤t_volume_num, S32 ¤t_joint_num); + bool allocateCharacterJoints(S32 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; @@ -240,13 +240,13 @@ public: ** 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 @@ -299,7 +299,7 @@ public: void setClothesColor(LLAvatarAppearanceDefines::ETextureIndex te, const LLColor4& new_color, BOOL upload_bake); // [Legacy Bake] LLColor4 getClothesColor(LLAvatarAppearanceDefines::ETextureIndex te); - static BOOL teToColorParams(LLAvatarAppearanceDefines::ETextureIndex te, U32 *param_name); + static bool teToColorParams(LLAvatarAppearanceDefines::ETextureIndex te, U32 *param_name); //-------------------------------------------------------------------- // Global colors @@ -332,8 +332,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; @@ -379,7 +379,7 @@ public: S32 mNumCollisionVolumes; LLAvatarJointCollisionVolume* mCollisionVolumes; protected: - BOOL allocateCollisionVolumes(U32 num); + bool allocateCollisionVolumes(U32 num); /** Physics ** ** @@ -395,12 +395,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 { @@ -444,8 +444,8 @@ protected: S32 mPieMenuSlice; BOOL mVisibleFirstPerson; BOOL mIsHUDAttachment; - BOOL mHasPosition; - BOOL mHasRotation; + bool mHasPosition; + bool mHasRotation; }; typedef std::vector attachment_info_list_t; attachment_info_list_t mAttachmentInfoList; @@ -481,7 +481,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 8df6e30e19..77ce670825 100644 --- a/indra/llappearance/llavatarappearancedefines.cpp +++ b/indra/llappearance/llavatarappearancedefines.cpp @@ -305,15 +305,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.cpp b/indra/llappearance/llavatarjoint.cpp index 9300b08b7b..e7bd831b49 100644 --- a/indra/llappearance/llavatarjoint.cpp +++ b/indra/llappearance/llavatarjoint.cpp @@ -167,10 +167,10 @@ void LLAvatarJoint::updateJointGeometry() } -BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate) +bool LLAvatarJoint::updateLOD(F32 pixel_area, bool activate) { - BOOL lod_changed = FALSE; - BOOL found_lod = FALSE; + bool lod_changed = false; + bool found_lod = false; for (LLJoint* child : mChildren) { @@ -187,7 +187,7 @@ BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate) if (pixel_area >= jointLOD || sDisableLOD) { lod_changed |= joint->updateLOD(pixel_area, TRUE); - found_lod = TRUE; + found_lod = true; } else { diff --git a/indra/llappearance/llavatarjoint.h b/indra/llappearance/llavatarjoint.h index fec91503c7..052852fa3d 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 { @@ -99,7 +99,7 @@ public: virtual U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ) = 0; virtual void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area); virtual void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE, bool terse_update = false); - virtual BOOL updateLOD(F32 pixel_area, BOOL activate); + virtual bool updateLOD(F32 pixel_area, bool activate); virtual void updateJointGeometry(); virtual void dump(); @@ -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..f34e23a966 100644 --- a/indra/llappearance/llavatarjointmesh.cpp +++ b/indra/llappearance/llavatarjointmesh.cpp @@ -102,7 +102,7 @@ LLSkinJoint::~LLSkinJoint() //----------------------------------------------------------------------------- // LLSkinJoint::setupSkinJoint() //----------------------------------------------------------------------------- -BOOL LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint) +bool LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint) { // find the named joint mJoint = joint; @@ -119,7 +119,7 @@ BOOL LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint) mRootToParentJointSkinOffset = totalSkinOffset(getBaseSkeletonAncestor(joint)); mRootToParentJointSkinOffset = -mRootToParentJointSkinOffset; - return TRUE; + return true; } @@ -129,7 +129,7 @@ BOOL LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint) //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -BOOL LLAvatarJointMesh::sPipelineRender = FALSE; +bool LLAvatarJointMesh::sPipelineRender = false; U32 LLAvatarJointMesh::sClothingMaskImageName = 0; LLColor4 LLAvatarJointMesh::sClothingInnerColor; @@ -149,7 +149,7 @@ LLAvatarJointMesh::LLAvatarJointMesh() mColor[2] = 1.0f; mColor[3] = 1.0f; mShiny = 0.0f; - mCullBackFaces = TRUE; + mCullBackFaces = true; mMesh = NULL; @@ -159,11 +159,11 @@ LLAvatarJointMesh::LLAvatarJointMesh() mFace = NULL; mMeshID = 0; - mUpdateXform = FALSE; + mUpdateXform = false; - mValid = FALSE; + mValid = false; - mIsTransparent = FALSE; + mIsTransparent = false; } @@ -182,11 +182,11 @@ LLAvatarJointMesh::~LLAvatarJointMesh() //----------------------------------------------------------------------------- // LLAvatarJointMesh::allocateSkinData() //----------------------------------------------------------------------------- -BOOL LLAvatarJointMesh::allocateSkinData( U32 numSkinJoints ) +bool LLAvatarJointMesh::allocateSkinData( U32 numSkinJoints ) { mSkinJoints = new LLSkinJoint[ numSkinJoints ]; mNumSkinJoints = numSkinJoints; - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -252,7 +252,7 @@ void LLAvatarJointMesh::setTexture( LLGLTexture *texture ) } -BOOL LLAvatarJointMesh::hasGLTexture() const +bool LLAvatarJointMesh::hasGLTexture() const { return mTexture.notNull() && mTexture->hasGLTexture(); } @@ -272,7 +272,7 @@ void LLAvatarJointMesh::setLayerSet( LLTexLayerSet* layer_set ) } } -BOOL LLAvatarJointMesh::hasComposite() const +bool LLAvatarJointMesh::hasComposite() const { return (mLayerSet && mLayerSet->hasComposite()); } diff --git a/indra/llappearance/llavatarjointmesh.h b/indra/llappearance/llavatarjointmesh.h index 5980b29b46..a3f6a61218 100644 --- a/indra/llappearance/llavatarjointmesh.h +++ b/indra/llappearance/llavatarjointmesh.h @@ -49,7 +49,7 @@ class LLSkinJoint public: LLSkinJoint(); ~LLSkinJoint(); - BOOL setupSkinJoint( LLAvatarJoint *joint); + bool setupSkinJoint( LLAvatarJoint *joint); LLAvatarJoint *mJoint; LLVector3 mRootToJointSkinOffset; @@ -79,7 +79,7 @@ protected: S32 mMeshID; public: - static BOOL sPipelineRender; + static bool sPipelineRender; //RN: this is here for testing purposes static U32 sClothingMaskImageName; static LLColor4 sClothingInnerColor; @@ -104,14 +104,14 @@ public: // Sets the shape texture void setTexture( LLGLTexture *texture ); - BOOL hasGLTexture() const; + bool hasGLTexture() const; void setTestTexture( U32 name ) { mTestImageName = name; } // Sets layer set responsible for a dynamic shape texture (takes precedence over normal texture) void setLayerSet( LLTexLayerSet* layer_set ); - BOOL hasComposite() const; + bool hasComposite() const; // Gets the poly mesh LLPolyMesh *getMesh(); @@ -135,7 +135,7 @@ public: private: // Allocate skin data - BOOL allocateSkinData( U32 numSkinJoints ); + bool allocateSkinData( U32 numSkinJoints ); // Free skin data void freeSkinData(); diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp index 0248f2c3ec..2322810293 100644 --- a/indra/llappearance/lldriverparam.cpp +++ b/indra/llappearance/lldriverparam.cpp @@ -41,16 +41,16 @@ LLDriverParamInfo::LLDriverParamInfo() : { } -BOOL LLDriverParamInfo::parseXml(LLXmlTreeNode* node) +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() << " Unable to resolve driven parameter: " << driven_id << LL_ENDL; - return FALSE; + return false; } } - return TRUE; + return true; } //virtual @@ -187,11 +187,11 @@ LLDriverParam::~LLDriverParam() { } -BOOL LLDriverParam::setInfo(LLDriverParamInfo *info) +bool LLDriverParam::setInfo(LLDriverParamInfo *info) { llassert(mInfo == NULL); if (info->mID < 0) - return FALSE; + return false; mInfo = info; mID = info->mID; info->mDriverParam = this; @@ -200,7 +200,7 @@ BOOL LLDriverParam::setInfo(LLDriverParamInfo *info) //setWeight(getDefaultWeight()); setWeight(getDefaultWeight(), FALSE ); - return TRUE; + return true; } /*virtual*/ LLViewerVisualParam* LLDriverParam::cloneParam(LLWearable* wearable) const @@ -492,20 +492,20 @@ void LLDriverParam::stopAnimating(BOOL upload_bake) } /*virtual*/ -BOOL LLDriverParam::linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params) +bool LLDriverParam::linkDrivenParams(visual_param_mapper mapper, bool only_cross_params) { - BOOL success = TRUE; + BOOL success = true; for (LLDrivenEntryInfo& driven_info : getInfo()->mDrivenInfoList) { S32 driven_id = driven_info.mDrivenID; // check for already existing links. Do not overwrite. - BOOL found = FALSE; + bool found = false; for (auto& driven : mDriven) { if (driven.mInfo->mDrivenID == driven_id) { - found = TRUE; + found = true; } } @@ -520,7 +520,7 @@ BOOL LLDriverParam::linkDrivenParams(visual_param_mapper mapper, BOOL only_cross } else { - success = FALSE; + success = false; } } } diff --git a/indra/llappearance/lldriverparam.h b/indra/llappearance/lldriverparam.h index 0848dc353a..a11baba6a5 100644 --- a/indra/llappearance/lldriverparam.h +++ b/indra/llappearance/lldriverparam.h @@ -65,7 +65,7 @@ public: LLDriverParamInfo(); /*virtual*/ ~LLDriverParamInfo() {}; - /*virtual*/ BOOL parseXml(LLXmlTreeNode* node); + /*virtual*/ bool parseXml(LLXmlTreeNode* node); /*virtual*/ void toStream(std::ostream &out); @@ -90,7 +90,7 @@ public: // Special: These functions are overridden by child classes LLDriverParamInfo* getInfo() const { return (LLDriverParamInfo*)mInfo; } // This sets mInfo and calls initialization functions - BOOL setInfo(LLDriverParamInfo* info); + bool setInfo(LLDriverParamInfo* info); LLAvatarAppearance* getAvatarAppearance() { return mAvatarAppearance; } const LLAvatarAppearance* getAvatarAppearance() const { return mAvatarAppearance; } @@ -109,7 +109,7 @@ public: /*virtual*/ void setAnimationTarget(F32 target_value, BOOL upload_bake); /*virtual*/ void stopAnimating(BOOL upload_bake); // [Legacy Bake] - /*virtual*/ BOOL linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params); + /*virtual*/ bool linkDrivenParams(visual_param_mapper mapper, bool only_cross_params); /*virtual*/ void resetDrivenParams(); // LLViewerVisualParam Virtual functions diff --git a/indra/llappearance/lllocaltextureobject.cpp b/indra/llappearance/lllocaltextureobject.cpp index ab50db3a5a..ff82e4e8e3 100644 --- a/indra/llappearance/lllocaltextureobject.cpp +++ b/indra/llappearance/lllocaltextureobject.cpp @@ -122,7 +122,7 @@ S32 LLLocalTextureObject::getDiscard() const return mDiscard; } -BOOL LLLocalTextureObject::getBakedReady() const +bool LLLocalTextureObject::getBakedReady() const { return mIsBakedReady; } @@ -132,11 +132,11 @@ void LLLocalTextureObject::setImage(LLGLTexture* new_image) mImage = new_image; } -BOOL LLLocalTextureObject::setTexLayer(LLTexLayer *new_tex_layer, U32 index) +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) +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) +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) +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/lllocaltextureobject.h b/indra/llappearance/lllocaltextureobject.h index 9b9f41fd19..5ca503baf4 100644 --- a/indra/llappearance/lllocaltextureobject.h +++ b/indra/llappearance/lllocaltextureobject.h @@ -53,13 +53,13 @@ public: U32 getNumTexLayers() const; LLUUID getID() const; S32 getDiscard() const; - BOOL getBakedReady() const; + bool getBakedReady() const; void setImage(LLGLTexture* new_image); - BOOL setTexLayer(LLTexLayer *new_tex_layer, U32 index); - BOOL addTexLayer(LLTexLayer *new_tex_layer, LLWearable *wearable); - BOOL addTexLayer(LLTexLayerTemplate *new_tex_layer, LLWearable *wearable); - BOOL removeTexLayer(U32 index); + bool setTexLayer(LLTexLayer *new_tex_layer, U32 index); + bool addTexLayer(LLTexLayer *new_tex_layer, LLWearable *wearable); + bool addTexLayer(LLTexLayerTemplate *new_tex_layer, LLWearable *wearable); + bool removeTexLayer(U32 index); void setID(LLUUID new_id); void setDiscard(S32 new_discard); diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp index b128f9eebf..6c04efed52 100644 --- a/indra/llappearance/llpolymesh.cpp +++ b/indra/llappearance/llpolymesh.cpp @@ -225,7 +225,7 @@ U32 LLPolyMeshSharedData::getNumKB() //----------------------------------------------------------------------------- // LLPolyMeshSharedData::allocateVertexData() //----------------------------------------------------------------------------- -BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices ) +bool LLPolyMeshSharedData::allocateVertexData( U32 numVertices ) { U32 i; mBaseCoords = (LLVector4a*) ll_aligned_malloc_16(numVertices*sizeof(LLVector4a)); @@ -243,34 +243,34 @@ BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices ) mWeights[i] = 0.f; } mNumVertices = numVertices; - return TRUE; + return true; } //----------------------------------------------------------------------------- // LLPolyMeshSharedData::allocateFaceData() //----------------------------------------------------------------------------- -BOOL LLPolyMeshSharedData::allocateFaceData( U32 numFaces ) +bool LLPolyMeshSharedData::allocateFaceData( U32 numFaces ) { mFaces = new LLPolyFace[ numFaces ]; mNumFaces = numFaces; mNumTriangleIndices = mNumFaces * 3; - return TRUE; + return true; } //----------------------------------------------------------------------------- // LLPolyMeshSharedData::allocateJointNames() //----------------------------------------------------------------------------- -BOOL LLPolyMeshSharedData::allocateJointNames( U32 numJointNames ) +bool LLPolyMeshSharedData::allocateJointNames( U32 numJointNames ) { mJointNames = new std::string[ numJointNames ]; mNumJointNames = numJointNames; - return TRUE; + return true; } //-------------------------------------------------------------------- // LLPolyMeshSharedData::loadMesh() //-------------------------------------------------------------------- -BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) +bool LLPolyMeshSharedData::loadMesh( const std::string& fileName ) { //------------------------------------------------------------------------- // Open the file @@ -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; } //------------------------------------------------------------------------- @@ -299,7 +299,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) //------------------------------------------------------------------------- // Check for proper binary header //------------------------------------------------------------------------- - BOOL status = FALSE; + bool status = false; if ( strncmp(header, HEADER_BINARY, strlen(HEADER_BINARY)) == 0 ) /*Flawfinder: ignore*/ { LL_DEBUGS() << "Loading " << fileName << LL_ENDL; @@ -317,11 +317,11 @@ 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()) { - mHasWeights = (hasWeights==0) ? FALSE : TRUE; + mHasWeights = (hasWeights==0) ? false : true; } //---------------------------------------------------------------- @@ -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/llpolymesh.h b/indra/llappearance/llpolymesh.h index 83659d9514..040868ea2a 100644 --- a/indra/llappearance/llpolymesh.h +++ b/indra/llappearance/llpolymesh.h @@ -119,17 +119,17 @@ private: void setRotation( const LLQuaternion &rot ) { mRotation = rot; } void setScale( const LLVector3 &scale ) { mScale = scale; } - BOOL allocateVertexData( U32 numVertices ); + bool allocateVertexData( U32 numVertices ); - BOOL allocateFaceData( U32 numFaces ); + bool allocateFaceData( U32 numFaces ); - BOOL allocateJointNames( U32 numJointNames ); + bool allocateJointNames( U32 numJointNames ); // Retrieve the number of KB of memory used by this instance U32 getNumKB(); // Load mesh data from file - BOOL loadMesh( const std::string& fileName ); + bool loadMesh( const std::string& fileName ); public: void genIndices(S32 offset); diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index fa4756d6cd..f0e51ae017 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -104,7 +104,7 @@ LLPolyMorphData::~LLPolyMorphData() //----------------------------------------------------------------------------- // loadBinary() //----------------------------------------------------------------------------- -BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) +bool LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) { S32 numVertices; S32 numRead; @@ -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; } //----------------------------------------------------------------------------- @@ -260,19 +260,19 @@ LLPolyMorphTargetInfo::LLPolyMorphTargetInfo() { } -BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) +bool LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) { llassert( node->hasName( "param" ) && node->getChildByName( "param_morph" ) ); if (!LLViewerVisualParamInfo::parseXml(node)) - return FALSE; + return false; // Get mixed-case name static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if( !node->getFastAttributeString( name_string, mMorphName ) ) { LL_WARNS() << "Avatar file: is missing name attribute" << LL_ENDL; - return FALSE; // Continue, ignoring this tag + return false; // Continue, ignoring this tag } static LLStdStringHandle clothing_morph_string = LLXmlTree::addAttributeString("clothing_morph"); @@ -284,7 +284,7 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) { LL_WARNS() << "Failed to getChildByName(\"param_morph\")" << LL_ENDL; - return FALSE; + return false; } for (LLXmlTreeNode* child_node = paramNode->getFirstChild(); @@ -310,7 +310,7 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) } } - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -353,11 +353,11 @@ LLPolyMorphTarget::~LLPolyMorphTarget() //----------------------------------------------------------------------------- // setInfo() //----------------------------------------------------------------------------- -BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) +bool LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) { llassert(mInfo == NULL); if (info->mID < 0) - return FALSE; + return false; mInfo = info; mID = info->mID; // [Legacy Bake] @@ -396,9 +396,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 @@ -410,7 +410,7 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) //----------------------------------------------------------------------------- // parseData() //----------------------------------------------------------------------------- -BOOL LLPolyMorphTarget::parseData(LLXmlTreeNode* node) +bool LLPolyMorphTarget::parseData(LLXmlTreeNode* node) { LLPolyMorphTargetInfo* info = new LLPolyMorphTargetInfo; @@ -418,9 +418,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/llpolymorph.h b/indra/llappearance/llpolymorph.h index 954f01811a..f52e9dce8d 100644 --- a/indra/llappearance/llpolymorph.h +++ b/indra/llappearance/llpolymorph.h @@ -49,7 +49,7 @@ public: ~LLPolyMorphData(); LLPolyMorphData(const LLPolyMorphData &rhs); - BOOL loadBinary(LLFILE* fp, LLPolyMeshSharedData *mesh); + bool loadBinary(LLFILE* fp, LLPolyMeshSharedData *mesh); const std::string& getName() { return mName; } public: @@ -129,7 +129,7 @@ public: LLPolyMorphTargetInfo(); /*virtual*/ ~LLPolyMorphTargetInfo() {}; - /*virtual*/ BOOL parseXml(LLXmlTreeNode* node); + /*virtual*/ bool parseXml(LLXmlTreeNode* node); protected: std::string mMorphName; @@ -154,7 +154,7 @@ public: // Special: These functions are overridden by child classes LLPolyMorphTargetInfo* getInfo() const { return (LLPolyMorphTargetInfo*)mInfo; } // This sets mInfo and calls initialization functions - BOOL setInfo(LLPolyMorphTargetInfo *info); + bool setInfo(LLPolyMorphTargetInfo *info); /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const; diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index 0d51ea0577..e0abef8c9d 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -45,12 +45,12 @@ LLPolySkeletalDistortionInfo::LLPolySkeletalDistortionInfo() { } -BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) +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() ) @@ -68,7 +68,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) std::string name; LLVector3 scale; LLVector3 pos; - BOOL haspos = FALSE; + BOOL haspos = false; static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if (!bone->getFastAttributeString(name_string, name)) @@ -88,7 +88,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle offset_string = LLXmlTree::addAttributeString("offset"); if (bone->getFastAttributeVector3(offset_string, pos)) { - haspos = TRUE; + haspos = true; } mBoneInfoList.push_back(LLPolySkeletalBoneInfo(name, scale, pos, haspos)); } @@ -98,7 +98,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) continue; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -133,11 +133,11 @@ LLPolySkeletalDistortion::~LLPolySkeletalDistortion() { } -BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) +bool LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) { if (info->mID < 0) { - return FALSE; + return false; } mInfo = info; mID = info->mID; @@ -153,7 +153,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 @@ -176,7 +176,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/llpolyskeletaldistortion.h b/indra/llappearance/llpolyskeletaldistortion.h index 2102a8e0f1..74de9344ff 100644 --- a/indra/llappearance/llpolyskeletaldistortion.h +++ b/indra/llappearance/llpolyskeletaldistortion.h @@ -71,7 +71,7 @@ public: LLPolySkeletalDistortionInfo(); /*virtual*/ ~LLPolySkeletalDistortionInfo() {}; - /*virtual*/ BOOL parseXml(LLXmlTreeNode* node); + /*virtual*/ bool parseXml(LLXmlTreeNode* node); protected: typedef std::vector bone_info_list_t; @@ -92,7 +92,7 @@ public: // Special: These functions are overridden by child classes LLPolySkeletalDistortionInfo* getInfo() const { return (LLPolySkeletalDistortionInfo*)mInfo; } // This sets mInfo and calls initialization functions - BOOL setInfo(LLPolySkeletalDistortionInfo *info); + bool setInfo(LLPolySkeletalDistortionInfo *info); /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const; diff --git a/indra/llappearance/lltexglobalcolor.cpp b/indra/llappearance/lltexglobalcolor.cpp index 347bf6f8ca..f65a76d654 100644 --- a/indra/llappearance/lltexglobalcolor.cpp +++ b/indra/llappearance/lltexglobalcolor.cpp @@ -48,7 +48,7 @@ LLTexGlobalColor::~LLTexGlobalColor() //std::for_each(mParamColorList.begin(), mParamColorList.end(), DeletePointer()); } -BOOL LLTexGlobalColor::setInfo(LLTexGlobalColorInfo *info) +bool LLTexGlobalColor::setInfo(LLTexGlobalColorInfo *info) { llassert(mInfo == NULL); mInfo = info; @@ -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 @@ -140,14 +140,14 @@ LLTexGlobalColorInfo::~LLTexGlobalColorInfo() mParamColorInfoList.clear(); } -BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node) +bool LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node) { // name attribute static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if (!node->getFastAttributeString(name_string, mName)) { LL_WARNS() << " element is missing name attribute." << LL_ENDL; - return FALSE; + return false; } // sub-element for (LLXmlTreeNode* child = node->getChildByName("param"); @@ -161,10 +161,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/lltexglobalcolor.h b/indra/llappearance/lltexglobalcolor.h index bcff494727..132a7f9d5e 100644 --- a/indra/llappearance/lltexglobalcolor.h +++ b/indra/llappearance/lltexglobalcolor.h @@ -42,7 +42,7 @@ public: LLTexGlobalColorInfo* getInfo() const { return mInfo; } // This sets mInfo and calls initialization functions - BOOL setInfo(LLTexGlobalColorInfo *info); + bool setInfo(LLTexGlobalColorInfo *info); LLAvatarAppearance* getAvatarAppearance() const { return mAvatarAppearance; } LLColor4 getColor() const; @@ -62,7 +62,7 @@ public: LLTexGlobalColorInfo(); ~LLTexGlobalColorInfo(); - BOOL parseXml(LLXmlTreeNode* node); + bool parseXml(LLXmlTreeNode* node); private: param_color_info_list_t mParamColorInfoList; diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index 80d116922e..4086755e2a 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -59,7 +59,7 @@ public: LLTexLayerInfo(); ~LLTexLayerInfo(); - BOOL parseXml(LLXmlTreeNode* node); + bool parseXml(LLXmlTreeNode* node); BOOL createVisualParams(LLAvatarAppearance *appearance); BOOL isUserSettable() { return mLocalTexture != -1; } S32 getLocalTexture() const { return mLocalTexture; } @@ -192,12 +192,12 @@ LLTexLayerSetInfo::~LLTexLayerSetInfo( ) mLayerInfoList.clear(); } -BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node) +bool LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node) { llassert( node->hasName( "layer_set" ) ); if( !node->hasName( "layer_set" ) ) { - return FALSE; + return false; } // body_region @@ -205,20 +205,20 @@ BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node) if( !node->getFastAttributeString( body_region_string, mBodyRegion ) ) { LL_WARNS() << " 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. @@ -237,11 +237,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 @@ -306,7 +306,7 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info) if (!layer->setInfo(layer_info, NULL)) { mInfo = NULL; - return FALSE; + return false; } if (!layer->isVisibilityMask()) { @@ -322,7 +322,7 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info) stop_glerror(); - return TRUE; + return true; } #if 0 // obsolete @@ -337,14 +337,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 @@ -546,10 +546,10 @@ BOOL LLTexLayerSet::isMorphValid() const { if (layer && !layer->isMorphValid()) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLTexLayerSet::invalidateMorphMasks() @@ -586,7 +586,7 @@ LLTexLayerInfo::~LLTexLayerInfo( ) mParamAlphaInfoList.clear(); } -BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node) +bool LLTexLayerInfo::parseXml(LLXmlTreeNode* node) { llassert( node->hasName( "layer" ) ); @@ -594,7 +594,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"); @@ -664,13 +664,13 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node) if (mLocalTexture == TEX_NUM_INDICES) { LL_WARNS() << " element has invalid local_texture attribute: " << mName << " " << local_texture_name << LL_ENDL; - return FALSE; + return false; } } else { LL_WARNS() << " element is missing a required attribute. " << mName << LL_ENDL; - return FALSE; + return false; } } @@ -701,7 +701,7 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node) if (!info->parseXml(child)) { delete info; - return FALSE; + return false; } mParamColorInfoList.push_back(info); } @@ -712,18 +712,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); @@ -788,7 +788,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab if (!param_color->setInfo(color_info, TRUE)) { mInfo = NULL; - return FALSE; + return false; } } else @@ -797,7 +797,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab if (!param_color) { mInfo = NULL; - return FALSE; + return false; } } mParamColorList.push_back( param_color ); @@ -813,7 +813,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab if (!param_alpha->setInfo(alpha_info, TRUE)) { mInfo = NULL; - return FALSE; + return false; } } else @@ -822,13 +822,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() @@ -1230,29 +1230,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(); @@ -1586,11 +1586,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 @@ -1793,12 +1793,12 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const { if (layer->isInvisibleAlphaMask()) { - return TRUE; + return true; } } } - return FALSE; + return false; } diff --git a/indra/llappearance/lltexlayer.h b/indra/llappearance/lltexlayer.h index 3ac76d7415..7a63c43e0f 100644 --- a/indra/llappearance/lltexlayer.h +++ b/indra/llappearance/lltexlayer.h @@ -243,7 +243,7 @@ class LLTexLayerSetInfo public: LLTexLayerSetInfo(); ~LLTexLayerSetInfo(); - BOOL parseXml(LLXmlTreeNode* node); + bool parseXml(LLXmlTreeNode* node); void createVisualParams(LLAvatarAppearance *appearance); S32 getWidth() const { return mWidth; } S32 getHeight() const { return mHeight; } diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index ab6261cd8b..7c1eceadc9 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; } @@ -253,7 +253,7 @@ BOOL LLTexLayerParamAlpha::getSkip() const { if (!mTexLayer) { - return TRUE; + return true; } const LLAvatarAppearance *appearance = mTexLayer->getTexLayerSet()->getAvatarAppearance(); @@ -263,24 +263,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) { @@ -318,7 +318,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; } } @@ -396,17 +396,17 @@ LLTexLayerParamAlphaInfo::LLTexLayerParamAlphaInfo() : { } -BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node) +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"); @@ -428,7 +428,7 @@ BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle domain_string = LLXmlTree::addAttributeString("domain"); param_alpha_node->getFastAttributeF32(domain_string, mDomain); - return TRUE; + return true; } @@ -572,17 +572,17 @@ LLTexLayerParamColorInfo::LLTexLayerParamColorInfo() : { } -BOOL LLTexLayerParamColorInfo::parseXml(LLXmlTreeNode *node) +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; @@ -615,14 +615,14 @@ BOOL LLTexLayerParamColorInfo::parseXml(LLXmlTreeNode *node) if (!mNumColors) { LL_WARNS() << " is missing sub-elements" << LL_ENDL; - return FALSE; + return false; } if ((mOperation == LLTexLayerParamColor::OP_BLEND) && (mNumColors != 1)) { LL_WARNS() << " with operation\"blend\" must have exactly one " << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/indra/llappearance/lltexlayerparams.h b/indra/llappearance/lltexlayerparams.h index c37e4659cf..d88ee259b4 100644 --- a/indra/llappearance/lltexlayerparams.h +++ b/indra/llappearance/lltexlayerparams.h @@ -131,7 +131,7 @@ public: LLTexLayerParamAlphaInfo(); /*virtual*/ ~LLTexLayerParamAlphaInfo() {}; - /*virtual*/ BOOL parseXml(LLXmlTreeNode* node); + /*virtual*/ bool parseXml(LLXmlTreeNode* node); private: std::string mStaticImageFileName; @@ -207,7 +207,7 @@ class LLTexLayerParamColorInfo : public LLViewerVisualParamInfo public: LLTexLayerParamColorInfo(); virtual ~LLTexLayerParamColorInfo() {}; - BOOL parseXml( LLXmlTreeNode* node ); + bool parseXml( LLXmlTreeNode* node ); LLTexLayerParamColor::EColorOperation getOperation() const { return mOperation; } private: enum { MAX_COLOR_VALUES = 20 }; diff --git a/indra/llappearance/llviewervisualparam.cpp b/indra/llappearance/llviewervisualparam.cpp index b9fad8540f..d6091f30bc 100644 --- a/indra/llappearance/llviewervisualparam.cpp +++ b/indra/llappearance/llviewervisualparam.cpp @@ -57,12 +57,12 @@ LLViewerVisualParamInfo::~LLViewerVisualParamInfo() //----------------------------------------------------------------------------- // parseXml() //----------------------------------------------------------------------------- -BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) +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,13 +150,13 @@ BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info) { llassert(mInfo == NULL); if (info->mID < 0) - return FALSE; + return false; mInfo = info; mID = info->mID; // [Legacy Bake] //setWeight(getDefaultWeight()); setWeight(getDefaultWeight(), FALSE); - return TRUE; + return true; } /* @@ -168,14 +168,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/llviewervisualparam.h b/indra/llappearance/llviewervisualparam.h index 1a710c0ca6..9ad3e6eae8 100644 --- a/indra/llappearance/llviewervisualparam.h +++ b/indra/llappearance/llviewervisualparam.h @@ -43,7 +43,7 @@ public: LLViewerVisualParamInfo(); /*virtual*/ ~LLViewerVisualParamInfo(); - /*virtual*/ BOOL parseXml(LLXmlTreeNode* node); + /*virtual*/ bool parseXml(LLXmlTreeNode* node); /*virtual*/ void toStream(std::ostream &out); diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index 7a7dc01ef9..ffa5310717 100644 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -98,7 +98,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"; @@ -110,13 +110,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 @@ -142,7 +142,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) @@ -310,7 +310,7 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, // permissions. Thus, we read that out, and fix legacy // objects. It's possible this op would fail, but it should pick // up the vast majority of the tasks. - BOOL has_perm_mask = FALSE; + bool has_perm_mask = false; U32 perm_mask = 0; if( !mSaleInfo.importLegacyStream(input_stream, has_perm_mask, perm_mask) ) { @@ -476,7 +476,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 bc3d83ee1e..6441b3f4df 100644 --- a/indra/llappearance/llwearabledata.cpp +++ b/indra/llappearance/llwearabledata.cpp @@ -215,7 +215,7 @@ BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_fou { if (wearable == NULL) { - return FALSE; + return false; } const LLWearableType::EType type = wearable->getType(); @@ -223,7 +223,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++) @@ -231,11 +231,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 @@ -267,13 +267,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 1f5054fa65..209b13d490 100644 --- a/indra/llappearance/llwearabletype.cpp +++ b/indra/llappearance/llwearabletype.cpp @@ -118,14 +118,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/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index c4149d992a..e032a9a43b 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -70,22 +70,22 @@ public: LLVorbisDecodeState(const LLUUID &uuid, const std::string &out_filename); - BOOL initDecode(); - BOOL decodeSection(); // Return TRUE if done. - BOOL finishDecode(); + bool initDecode(); + bool decodeSection(); // Return true if done. + bool finishDecode(); void flushBadFile(); void ioComplete(S32 bytes) { mBytesRead = bytes; } - BOOL isValid() const { return mValid; } - BOOL isDone() const { return mDone; } + bool isValid() const { return mValid; } + bool isDone() const { return mDone; } const LLUUID &getUUID() const { return mUUID; } protected: virtual ~LLVorbisDecodeState(); - BOOL mValid; - BOOL mDone; + bool mValid; + bool mDone; LLAtomicS32 mBytesRead; LLUUID mUUID; @@ -164,8 +164,8 @@ long cache_tell (void *datasource) LLVorbisDecodeState::LLVorbisDecodeState(const LLUUID &uuid, const std::string &out_filename) { - mDone = FALSE; - mValid = FALSE; + mDone = false; + mValid = false; mBytesRead = -1; mUUID = uuid; mInFilep = NULL; @@ -188,7 +188,7 @@ LLVorbisDecodeState::~LLVorbisDecodeState() } -BOOL LLVorbisDecodeState::initDecode() +bool LLVorbisDecodeState::initDecode() { ov_callbacks cache_callbacks; cache_callbacks.read_func = cache_read; @@ -204,14 +204,14 @@ BOOL LLVorbisDecodeState::initDecode() LL_WARNS("AudioEngine") << "unable to open vorbis source vfile for reading" << LL_ENDL; delete mInFilep; mInFilep = NULL; - return FALSE; + return false; } S32 r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, cache_callbacks); if(r < 0) { LL_WARNS("AudioEngine") << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << LL_ENDL; - return(FALSE); + return(false); } S32 sample_count = (S32)ov_pcm_total(&mVF, -1); @@ -260,7 +260,7 @@ BOOL LLVorbisDecodeState::initDecode() } delete mInFilep; mInFilep = NULL; - return FALSE; + return false; } try @@ -273,7 +273,7 @@ BOOL LLVorbisDecodeState::initDecode() LL_WARNS("AudioEngine") << "Out of memory when trying to alloc buffer: " << size_guess << LL_ENDL; delete mInFilep; mInFilep = NULL; - return FALSE; + return false; } { @@ -360,31 +360,31 @@ BOOL LLVorbisDecodeState::initDecode() // fprintf(stderr,"\nDecoded length: %ld samples\n", (long)ov_pcm_total(&vf,-1)); // fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor); //} - return TRUE; + return true; } -BOOL LLVorbisDecodeState::decodeSection() +bool LLVorbisDecodeState::decodeSection() { if (!mInFilep) { LL_WARNS("AudioEngine") << "No cache file to decode in vorbis!" << LL_ENDL; - return TRUE; + return true; } if (mDone) { // LL_WARNS("AudioEngine") << "Already done with decode, aborting!" << LL_ENDL; - return TRUE; + return true; } char pcmout[4096]; /*Flawfinder: ignore*/ - BOOL eof = FALSE; + bool eof = false; long ret=ov_read(&mVF, pcmout, sizeof(pcmout), 0, 2, 1, &mCurrentSection); if (ret == 0) { /* EOF */ - eof = TRUE; - mDone = TRUE; - mValid = TRUE; + eof = true; + mDone = true; + mValid = true; // LL_INFOS("AudioEngine") << "Vorbis EOF" << LL_ENDL; } else if (ret < 0) @@ -394,10 +394,10 @@ BOOL LLVorbisDecodeState::decodeSection() LL_WARNS("AudioEngine") << "BAD vorbis decode in decodeSection." << LL_ENDL; - mValid = FALSE; - mDone = TRUE; - // We're done, return TRUE. - return TRUE; + mValid = false; + mDone = true; + // We're done, return true. + return true; } else { @@ -409,12 +409,12 @@ BOOL LLVorbisDecodeState::decodeSection() return eof; } -BOOL LLVorbisDecodeState::finishDecode() +bool LLVorbisDecodeState::finishDecode() { if (!isValid()) { LL_WARNS("AudioEngine") << "Bogus vorbis decode state for " << getUUID() << ", aborting!" << LL_ENDL; - return TRUE; // We've finished + return true; // We've finished } if (mFileHandle == LLLFSThread::nullHandle()) @@ -487,8 +487,8 @@ BOOL LLVorbisDecodeState::finishDecode() if (36 == data_length) { LL_WARNS("AudioEngine") << "BAD Vorbis decode in finishDecode!" << LL_ENDL; - mValid = FALSE; - return TRUE; // we've finished + mValid = false; + return true; // we've finished } mBytesRead = -1; mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, mWAVBuffer.size(), @@ -502,21 +502,21 @@ BOOL LLVorbisDecodeState::finishDecode() if (mBytesRead == 0) { LL_WARNS("AudioEngine") << "Unable to write file in LLVorbisDecodeState::finishDecode" << LL_ENDL; - mValid = FALSE; - return TRUE; // we've finished + mValid = false; + return true; // we've finished } } else { - return FALSE; // not done + return false; // not done } } - mDone = TRUE; + mDone = true; LL_DEBUGS("AudioEngine") << "Finished decode for " << getUUID() << LL_ENDL; - return TRUE; + return true; } void LLVorbisDecodeState::flushBadFile() @@ -790,7 +790,7 @@ void LLAudioDecodeMgr::processQueue() mImpl->processQueue(); } -BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid) +bool LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid) { // Protect against corrupted sounds. Just do a quit exit instead of trying to decode over and over. if (gAudiop && gAudiop->isCorruptSound(uuid)) @@ -801,7 +801,7 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid) { // Already have a decoded version, don't need to decode it. LL_DEBUGS("AudioEngine") << "addDecodeRequest for " << uuid << " has decoded file already" << LL_ENDL; - return TRUE; + return true; } if (gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND)) @@ -816,9 +816,9 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid) mImpl->mDecodeQueue.push_back(uuid); } // - return TRUE; + return true; } LL_DEBUGS("AudioEngine") << "addDecodeRequest for " << uuid << " no file available" << LL_ENDL; - return FALSE; + return false; } diff --git a/indra/llaudio/llaudiodecodemgr.h b/indra/llaudio/llaudiodecodemgr.h index 4c17b46156..8c8d103c40 100644 --- a/indra/llaudio/llaudiodecodemgr.h +++ b/indra/llaudio/llaudiodecodemgr.h @@ -43,7 +43,7 @@ class LLAudioDecodeMgr : public LLSingleton ~LLAudioDecodeMgr(); public: void processQueue(); - BOOL addDecodeRequest(const LLUUID &uuid); + bool addDecodeRequest(const LLUUID &uuid); void addAudioRequest(const LLUUID &uuid); protected: diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h index 08e1d7a716..319f240d99 100644 --- a/indra/llaudio/llaudioengine.h +++ b/indra/llaudio/llaudioengine.h @@ -309,7 +309,7 @@ public: void preload(const LLUUID &audio_id); // Only used for preloading UI sounds, now. - void addAudioData(LLAudioData *adp, bool set_current = TRUE); + void addAudioData(LLAudioData *adp, bool set_current = true); void setForcedPriority(const bool ambient) { mForcedPriority = ambient; } bool isForcedPriority() const { return mForcedPriority; } diff --git a/indra/llaudio/llvorbisencode.cpp b/indra/llaudio/llvorbisencode.cpp index f11e33e577..23c94aba79 100644 --- a/indra/llaudio/llvorbisencode.cpp +++ b/indra/llaudio/llvorbisencode.cpp @@ -78,7 +78,7 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro U32 chunk_length = 0; U32 raw_data_length = 0; U32 bytes_per_sec = 0; - BOOL uncompressed_pcm = FALSE; + bool uncompressed_pcm = false; unsigned char wav_header[44]; /*Flawfinder: ignore*/ @@ -136,7 +136,7 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro { if ((wav_header[8] == 0x01) && (wav_header[9] == 0x00)) { - uncompressed_pcm = TRUE; + uncompressed_pcm = true; } num_channels = ((U16) wav_header[11] << 8) + wav_header[10]; sample_rate = ((U32) wav_header[15] << 24) diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index 44ad5851e0..d03d3d8958 100644 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp @@ -1275,15 +1275,15 @@ BOOL LLBVHLoader::getLine(LLAPRFile::tFiletype* 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 @@ -1505,5 +1505,5 @@ BOOL LLBVHLoader::serialize(LLDataPacker& dp) } - return TRUE; + return true; } diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index af5f679015..9460498fc9 100644 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -180,7 +180,7 @@ BOOL LLCharacter::isMotionActive(const LLUUID& id) return mMotionController.isMotionActive(motionp); } - return FALSE; + return false; } @@ -298,9 +298,9 @@ BOOL LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 wei // [Legacy Bake] //index_iter->second->setWeight(weight); index_iter->second->setWeight(weight, upload_bake); - return TRUE; + return true; } - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -319,10 +319,10 @@ BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight, BOOL // [Legacy Bake] //name_iter->second->setWeight(weight); name_iter->second->setWeight(weight, upload_bake); - return TRUE; + return true; } LL_WARNS() << "LLCharacter::setVisualParamWeight() Invalid visual parameter: " << param_name << LL_ENDL; - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -338,10 +338,10 @@ BOOL LLCharacter::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake) // [Legacy Bake] //index_iter->second->setWeight(weight); index_iter->second->setWeight(weight, upload_bake); - 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..63295983e0 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..a37e50f595 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; } @@ -119,7 +119,7 @@ public: // called when a motion is deactivated virtual void onDeactivate(); - virtual BOOL canDeprecate() { return FALSE; } + virtual bool canDeprecate() { return false; } static std::string getHandPoseName(eHandPose pose); static eHandPose getHandPose(std::string posename); diff --git a/indra/llcharacter/llheadrotmotion.cpp b/indra/llcharacter/llheadrotmotion.cpp index af1616c9f1..f8350484e3 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; } //----------------------------------------------------------------------------- @@ -540,7 +540,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..fbc0885039 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 2b6d217a53..30aa1ee89d 100644 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -305,7 +305,7 @@ public: void clampRotation(LLQuaternion old_rot, LLQuaternion new_rot); - virtual BOOL isAnimatable() const { return TRUE; } + virtual BOOL isAnimatable() const { return true; } void addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh_id, const std::string& av_info, bool& active_override_changed ); void removeAttachmentPosOverride( const LLUUID& mesh_id, const std::string& av_info, bool& active_override_changed ); diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 84df81e048..b0acbbb285 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -648,7 +648,7 @@ BOOL LLKeyframeMotion::setupPose() mPelvisp = mCharacter->getJoint("mPelvis"); if (!mPelvisp) { - return FALSE; + return false; } } @@ -656,7 +656,7 @@ BOOL LLKeyframeMotion::setupPose() setLoopIn(mJointMotionList->mLoopInPoint); setLoopOut(mJointMotionList->mLoopOutPoint); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -677,7 +677,7 @@ BOOL LLKeyframeMotion::onActivate() mLastLoopedTime = 0.f; - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -1243,13 +1243,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo if (!dp.unpackU16(version, "version")) { LL_WARNS() << "can't read version number for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackU16(sub_version, "sub_version")) { LL_WARNS() << "can't read sub version number for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (version == 0 && sub_version == 1) @@ -1261,7 +1261,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo #if LL_RELEASE LL_WARNS() << "Bad animation version " << version << "." << sub_version << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; #else LL_ERRS() << "Bad animation version " << version << "." << sub_version << " for animation " << asset_id << LL_ENDL; @@ -1272,7 +1272,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read animation base_priority" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } joint_motion_list->mBasePriority = (LLJoint::JointPriority) temp_priority; @@ -1285,7 +1285,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "bad animation base_priority " << joint_motion_list->mBasePriority << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } //------------------------------------------------------------------------- @@ -1295,7 +1295,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read duration" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (joint_motion_list->mDuration > MAX_ANIM_DURATION || @@ -1303,7 +1303,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "invalid animation duration" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } //------------------------------------------------------------------------- @@ -1313,14 +1313,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read optional_emote_animation" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if(joint_motion_list->mEmoteName==mID.asString()) { LL_WARNS() << "Malformed animation mEmoteName==mID" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } //------------------------------------------------------------------------- @@ -1331,7 +1331,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read loop point" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackF32(joint_motion_list->mLoopOutPoint, "loop_out_point") || @@ -1339,14 +1339,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read loop point" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackS32(joint_motion_list->mLoop, "loop")) { LL_WARNS() << "can't read loop" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } //SL-17206 hack to alter Female_land loop setting, while current behavior won't be changed serverside @@ -1366,7 +1366,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read easeIn" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackF32(joint_motion_list->mEaseOutDuration, "ease_out_duration") || @@ -1374,7 +1374,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read easeOut" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } //------------------------------------------------------------------------- @@ -1385,14 +1385,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read hand pose" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if(word > LLHandMotion::NUM_HAND_POSES) { LL_WARNS() << "invalid LLHandMotion::eHandPose index: " << word << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } joint_motion_list->mHandPose = (LLHandMotion::eHandPose)word; @@ -1407,20 +1407,20 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read number of joints" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (num_motions == 0) { LL_WARNS() << "no joints" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } else if (num_motions > LL_CHARACTER_MAX_ANIMATED_JOINTS) { LL_WARNS() << "too many joints" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } joint_motion_list->mJointMotionArray.clear(); @@ -1442,14 +1442,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read joint name" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (joint_name == "mScreen" || joint_name == "mRoot") { LL_WARNS() << "attempted to animate special " << joint_name << " joint" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } //--------------------------------------------------------------------- @@ -1476,7 +1476,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo << " for animation " << asset_id << LL_ENDL; if (!allow_invalid_joints) { - return FALSE; + return false; } } @@ -1495,14 +1495,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read joint priority." << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (joint_priority < LLJoint::USE_MOTION_PRIORITY) { LL_WARNS() << "joint priority unknown - too low." << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } joint_motion->mPriority = (LLJoint::JointPriority)joint_priority; @@ -1521,7 +1521,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read number of rotation keys" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } joint_motion->mRotationCurve.mInterpolationType = IT_LINEAR; @@ -1547,7 +1547,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read rotation key (" << k << ")" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } } @@ -1557,7 +1557,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read rotation key (" << k << ")" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } time = U16_to_F32(time_short, 0.f, joint_motion_list->mDuration); @@ -1566,7 +1566,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "invalid frame time" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } } @@ -1580,12 +1580,12 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo if (!dp.unpackVector3(rot_angles, "rot_angles")) { LL_WARNS() << "can't read rot_angles in rotation key (" << k << ")" << LL_ENDL; - return FALSE; + return false; } if (!rot_angles.isFinite()) { LL_WARNS() << "non-finite angle in rotation key (" << k << ")" << LL_ENDL; - return FALSE; + return false; } LLQuaternion::Order ro = StringToOrder("ZYX"); @@ -1596,17 +1596,17 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo if (!dp.unpackU16(x, "rot_angle_x")) { LL_WARNS() << "can't read rot_angle_x in rotation key (" << k << ")" << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackU16(y, "rot_angle_y")) { LL_WARNS() << "can't read rot_angle_y in rotation key (" << k << ")" << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackU16(z, "rot_angle_z")) { LL_WARNS() << "can't read rot_angle_z in rotation key (" << k << ")" << LL_ENDL; - return FALSE; + return false; } LLVector3 rot_vec; @@ -1618,7 +1618,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "non-finite angle in rotation key (" << k << ")" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } rot_key.mRotation.unpackFromVector3(rot_vec); } @@ -1627,7 +1627,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "non-finite angle in rotation key (" << k << ")" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } rCurve->mKeys[time] = rot_key; @@ -1646,7 +1646,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read number of position keys" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } joint_motion->mPositionCurve.mInterpolationType = IT_LINEAR; @@ -1672,7 +1672,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read position key (" << k << ")" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } } else @@ -1681,7 +1681,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read position key (" << k << ")" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } pos_key.mTime = U16_to_F32(time_short, 0.f, joint_motion_list->mDuration); @@ -1692,7 +1692,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo if (!dp.unpackVector3(pos_key.mPosition, "pos")) { LL_WARNS() << "can't read pos in position key (" << k << ")" << LL_ENDL; - return FALSE; + return false; } //MAINT-6162 @@ -1708,17 +1708,17 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo if (!dp.unpackU16(x, "pos_x")) { LL_WARNS() << "can't read pos_x in position key (" << k << ")" << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackU16(y, "pos_y")) { LL_WARNS() << "can't read pos_y in position key (" << k << ")" << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackU16(z, "pos_z")) { LL_WARNS() << "can't read pos_z in position key (" << k << ")" << LL_ENDL; - return FALSE; + return false; } pos_key.mPosition.mV[VX] = U16_to_F32(x, -LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET); @@ -1730,7 +1730,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "non-finite position in key" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } pCurve->mKeys[pos_key.mTime] = pos_key; @@ -1767,7 +1767,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read number of constraints" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (num_constraints > MAX_CONSTRAINTS || num_constraints < 0) @@ -1791,7 +1791,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read constraint chain length" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } constraintp->mChainLength = (S32) byte; @@ -1799,21 +1799,21 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "invalid constraint chain length" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackU8(byte, "constraint_type")) { LL_WARNS() << "can't read constraint type" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if( byte >= NUM_CONSTRAINT_TYPES ) { LL_WARNS() << "invalid constraint type" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } constraintp->mConstraintType = (EConstraintType)byte; @@ -1823,7 +1823,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read source volume name" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } bin_data[BIN_DATA_LENGTH] = 0; // Ensure null termination @@ -1833,28 +1833,28 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "not a valid source constraint volume " << str << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackVector3(constraintp->mSourceConstraintOffset, "source_offset")) { LL_WARNS() << "can't read constraint source offset" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if( !(constraintp->mSourceConstraintOffset.isFinite()) ) { LL_WARNS() << "non-finite constraint source offset" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "target_volume")) { LL_WARNS() << "can't read target volume name" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } bin_data[BIN_DATA_LENGTH] = 0; // Ensure null termination @@ -1872,7 +1872,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "not a valid target constraint volume " << str << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } } @@ -1880,28 +1880,28 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read constraint target offset" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if( !(constraintp->mTargetConstraintOffset.isFinite()) ) { LL_WARNS() << "non-finite constraint target offset" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackVector3(constraintp->mTargetConstraintDir, "target_dir")) { LL_WARNS() << "can't read constraint target direction" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if( !(constraintp->mTargetConstraintDir.isFinite()) ) { LL_WARNS() << "non-finite constraint target direction" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (!constraintp->mTargetConstraintDir.isExactlyZero()) @@ -1914,35 +1914,35 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "can't read constraint ease in start time" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackF32(constraintp->mEaseInStopTime, "ease_in_stop") || !llfinite(constraintp->mEaseInStopTime)) { LL_WARNS() << "can't read constraint ease in stop time" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackF32(constraintp->mEaseOutStartTime, "ease_out_start") || !llfinite(constraintp->mEaseOutStartTime)) { LL_WARNS() << "can't read constraint ease out start time" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if (!dp.unpackF32(constraintp->mEaseOutStopTime, "ease_out_stop") || !llfinite(constraintp->mEaseOutStopTime)) { LL_WARNS() << "can't read constraint ease out stop time" << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } LLJoint* joint = mCharacter->findCollisionVolume(constraintp->mSourceConstraintVolume); // get joint to which this collision volume is attached if (!joint) { - return FALSE; + return false; } constraintp->mJointStateIndices = new S32[constraintp->mChainLength + 1]; // note: mChainLength is size-limited - comes from a byte @@ -1955,7 +1955,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo LL_WARNS() << "Joint with no parent: " << joint->getName() << " Emote: " << joint_motion_list->mEmoteName << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } joint = parent; constraintp->mJointStateIndices[i] = -1; @@ -1967,7 +1967,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "Invalid joint " << j << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } if(constraint_joint == joint) @@ -1980,7 +1980,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo { LL_WARNS() << "No joint index for constraint " << i << " for animation " << asset_id << LL_ENDL; - return FALSE; + return false; } } @@ -1995,7 +1995,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo setupPose(); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -2003,7 +2003,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/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h index 96746f57c9..59a1d39a62 100644 --- a/indra/llcharacter/llkeyframemotion.h +++ b/indra/llcharacter/llkeyframemotion.h @@ -86,9 +86,9 @@ public: //------------------------------------------------------------------------- // motions must specify whether or not they loop - virtual BOOL getLoop() { - if (mJointMotionList) return mJointMotionList->mLoop; - else return FALSE; + virtual bool getLoop() { + if (mJointMotionList) return mJointMotionList->mLoop; + else return false; } // motions must report their total duration diff --git a/indra/llcharacter/llkeyframemotionparam.cpp b/indra/llcharacter/llkeyframemotionparam.cpp index 1dc4a70c6b..fc1eaf9103 100644 --- a/indra/llcharacter/llkeyframemotionparam.cpp +++ b/indra/llcharacter/llkeyframemotionparam.cpp @@ -146,7 +146,7 @@ BOOL LLKeyframeMotionParam::onActivate() paramMotion.mMotion->activate(mActivationTimestamp); } } - return TRUE; + return true; } @@ -265,7 +265,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) LL_INFOS() << "Param Motion weight " << mPoseBlender.getBlendedPose()->getWeight() << LL_ENDL; - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -292,7 +292,7 @@ BOOL LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char if (!newMotion) { - return FALSE; + return false; } newMotion->setName(name); @@ -300,7 +300,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; } @@ -352,7 +352,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 @@ -391,7 +391,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; @@ -418,7 +418,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); @@ -438,7 +438,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..3b0bc36012 100644 --- a/indra/llcharacter/llkeyframemotionparam.h +++ b/indra/llcharacter/llkeyframemotionparam.h @@ -67,8 +67,8 @@ 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 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 935582f6d0..89621ab0a9 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; } //----------------------------------------------------------------------------- @@ -318,7 +318,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; } //----------------------------------------------------------------------------- @@ -370,7 +370,7 @@ BOOL LLFlyAdjustMotion::onActivate() mPelvisState->setPosition(LLVector3::zero); mPelvisState->setRotation(LLQuaternion::DEFAULT); mRoll = 0.f; - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -391,6 +391,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..d9e9322c82 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..a3c23a9c94 100644 --- a/indra/llcharacter/llmotion.cpp +++ b/indra/llcharacter/llmotion.cpp @@ -169,9 +169,9 @@ void LLMotion::deactivate() onDeactivate(); } -BOOL LLMotion::canDeprecate() +bool LLMotion::canDeprecate() { - return TRUE; + return true; } // End diff --git a/indra/llcharacter/llmotion.h b/indra/llcharacter/llmotion.h index aaa9a146d7..1453979764 100644 --- a/indra/llcharacter/llmotion.h +++ b/indra/llcharacter/llmotion.h @@ -115,7 +115,7 @@ public: //------------------------------------------------------------------------- // motions must specify whether or not they loop - virtual BOOL getLoop() = 0; + virtual bool getLoop() = 0; // motions must report their total duration virtual F32 getDuration() = 0; @@ -154,7 +154,7 @@ public: // can we crossfade this motion with a new instance when restarted? // should ultimately always be TRUE, but lack of emote blending, etc // requires this - virtual BOOL canDeprecate(); + virtual bool canDeprecate(); // optional callback routine called when animation deactivated. void setDeactivateCallback( void (*cb)(void *), void* userdata ); @@ -199,7 +199,7 @@ public: LLTestMotion(const LLUUID &id) : LLMotion(id){} ~LLTestMotion() {} static LLMotion *create(const LLUUID& id) { return new LLTestMotion(id); } - BOOL getLoop() { return FALSE; } + bool getLoop() { return false; } F32 getDuration() { return 0.0f; } F32 getEaseInDuration() { return 0.0f; } F32 getEaseOutDuration() { return 0.0f; } @@ -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 6ff3230f14..36878880c7 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; } //----------------------------------------------------------------------------- @@ -425,12 +425,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; @@ -453,7 +453,7 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat { if (!motion) { - return FALSE; + return false; } @@ -465,15 +465,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; } //----------------------------------------------------------------------------- @@ -939,7 +939,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()) @@ -947,7 +947,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(); @@ -991,7 +991,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time) } } - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -1014,7 +1014,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 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 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 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 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& jointState) { mJointMap[jointState->getJoint()->getName()] = jointState; } - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -96,7 +96,7 @@ BOOL LLPose::addJointState(const LLPointer& jointState) BOOL LLPose::removeJointState(const LLPointer& jointState) { mJointMap.erase(jointState->getJoint()->getName()); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -105,7 +105,7 @@ BOOL LLPose::removeJointState(const LLPointer& jointState) BOOL LLPose::removeAllJointStates() { mJointMap.clear(); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -199,7 +199,7 @@ BOOL LLJointStateBlender::addJointState(const LLPointer& 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& 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& 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 2716bd36bc..80813965ea 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 @@ -89,11 +89,11 @@ BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_stat if (transition_it != state_transitions->end()) { LL_ERRS() << "LLStateTable::addDirectedTransition() : transition already exists" << LL_ENDL; - return FALSE; // transition already exists + return false; // transition already exists } (*state_transitions)[&transition] = &end_state; - return TRUE; + return true; } // add an undirected transition between 2 states @@ -183,9 +183,9 @@ BOOL LLStateDiagram::stateIsValid(LLFSMState& state) { if (mStates.find(&state) != mStates.end()) { - return TRUE; + return true; } - return FALSE; + return false; } LLFSMState* LLStateDiagram::getState(U32 state_id) @@ -213,7 +213,7 @@ BOOL LLStateDiagram::saveDotFile(const std::string& filename) if (!dot_file) { LL_WARNS() << "LLStateDiagram::saveDotFile() : Couldn't open " << filename << " to save state diagram." << LL_ENDL; - return FALSE; + return false; } apr_file_printf(dot_file, "digraph StateMachine {\n\tsize=\"100,100\";\n\tfontsize=40;\n\tlabel=\"Finite State Machine\";\n\torientation=landscape\n\tratio=.77\n"); @@ -252,7 +252,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) @@ -323,10 +323,10 @@ BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, { initial_state->onEntry(user_data); } - return TRUE; + return true; } - return FALSE; + return false; } BOOL LLStateMachine::setCurrentState(U32 state_id, void* user_data, BOOL skip_entry) @@ -342,10 +342,10 @@ BOOL LLStateMachine::setCurrentState(U32 state_id, void* user_data, BOOL skip_en { state->onEntry(user_data); } - return TRUE; + return true; } - return FALSE; + return false; } void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_data) 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..85749a0882 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 c6d5fb0444..600d86343d 100644 --- a/indra/llcharacter/llvisualparam.cpp +++ b/indra/llcharacter/llvisualparam.cpp @@ -48,7 +48,7 @@ LLVisualParamInfo::LLVisualParamInfo() //----------------------------------------------------------------------------- // parseXml() //----------------------------------------------------------------------------- -BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node) +bool LLVisualParamInfo::parseXml(LLXmlTreeNode *node) { // attribute: id static LLStdStringHandle id_string = LLXmlTree::addAttributeString("id"); @@ -102,7 +102,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node) else { LL_WARNS() << "Avatar file: has invalid sex attribute: " << sex << LL_ENDL; - return FALSE; + return false; } // attribute: name @@ -110,7 +110,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node) if( !node->getFastAttributeString( name_string, mName ) ) { LL_WARNS() << "Avatar file: is missing name attribute" << LL_ENDL; - return FALSE; + return false; } // attribute: label @@ -138,7 +138,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node) mMaxName = "More"; } - return TRUE; + return true; } //virtual @@ -211,11 +211,11 @@ BOOL LLVisualParam::setInfo(LLVisualParamInfo *info) { llassert(mInfo == NULL); if (info->mID < 0) - return FALSE; + return false; mInfo = info; mID = info->mID; setWeight(getDefaultWeight(), FALSE ); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -227,9 +227,9 @@ BOOL LLVisualParam::parseData(LLXmlTreeNode *node) info->parseXml(node); if (!setInfo(info)) - return FALSE; + return false; - return TRUE; + return true; } */ @@ -351,10 +351,10 @@ void LLVisualParam::stopAnimating(BOOL upload_bake) } //virtual -BOOL LLVisualParam::linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params) +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/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h index d9fd22b5f5..33806fbc34 100644 --- a/indra/llcharacter/llvisualparam.h +++ b/indra/llcharacter/llvisualparam.h @@ -74,7 +74,7 @@ public: LLVisualParamInfo(); virtual ~LLVisualParamInfo() {}; - virtual BOOL parseXml(LLXmlTreeNode *node); + virtual bool parseXml(LLXmlTreeNode *node); S32 getID() const { return mID; } @@ -131,7 +131,7 @@ public: virtual void stopAnimating(BOOL upload_bake); // [Legacy Bake] - virtual BOOL linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params); + virtual bool linkDrivenParams(visual_param_mapper mapper, bool only_cross_params); virtual void resetDrivenParams(); // Interface methods diff --git a/indra/llcommon/is_approx_equal_fraction.h b/indra/llcommon/is_approx_equal_fraction.h index 4a9b2e2725..732d168986 100644 --- a/indra/llcommon/is_approx_equal_fraction.h +++ b/indra/llcommon/is_approx_equal_fraction.h @@ -43,9 +43,9 @@ * signatures. */ template -inline BOOL is_approx_equal_fraction_impl(FTYPE x, FTYPE y, U32 frac_bits) +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,20 +58,20 @@ 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; } /// F32 flavor -inline BOOL is_approx_equal_fraction(F32 x, F32 y, U32 frac_bits) +inline bool is_approx_equal_fraction(F32 x, F32 y, U32 frac_bits) { return is_approx_equal_fraction_impl(x, y, frac_bits); } /// F64 flavor -inline BOOL is_approx_equal_fraction(F64 x, F64 y, U32 frac_bits) +inline bool is_approx_equal_fraction(F64 x, F64 y, U32 frac_bits) { return is_approx_equal_fraction_impl(x, y, frac_bits); } diff --git a/indra/llcommon/llbase64.cpp b/indra/llcommon/llbase64.cpp index bb85fe32a3..6591e9b49a 100644 --- a/indra/llcommon/llbase64.cpp +++ b/indra/llcommon/llbase64.cpp @@ -59,3 +59,19 @@ std::string LLBase64::encode(const U8* input, size_t input_size) return output; } +std::string LLBase64::decodeAsString(const std::string &input) +{ + int b64_buffer_length = apr_base64_decode_len(input.c_str()); + char* b64_buffer = new char[b64_buffer_length]; + + // This is faster than apr_base64_encode() if you know + // you're not on an EBCDIC machine. Also, the output is + // null terminated, even though the documentation doesn't + // specify. See apr_base64.c for details. JC + b64_buffer_length = apr_base64_decode(b64_buffer, input.c_str()); + std::string res; + res.assign(b64_buffer); + delete[] b64_buffer; + return res; +} + diff --git a/indra/llcommon/llbase64.h b/indra/llcommon/llbase64.h index 16d2c217d0..b985963fc4 100644 --- a/indra/llcommon/llbase64.h +++ b/indra/llcommon/llbase64.h @@ -32,6 +32,7 @@ class LL_COMMON_API LLBase64 { public: static std::string encode(const U8* input, size_t input_size); + static std::string decodeAsString(const std::string& input); }; #endif diff --git a/indra/llcommon/llcallbacklist.cpp b/indra/llcommon/llcallbacklist.cpp index 9f23ce5317..a2800d42ce 100644 --- a/indra/llcommon/llcallbacklist.cpp +++ b/indra/llcommon/llcallbacklist.cpp @@ -70,11 +70,11 @@ bool LLCallbackList::containsFunction( callback_t func, void *data) callback_list_t::iterator iter = find(func,data); if (iter != mCallbackList.end()) { - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -85,11 +85,11 @@ bool LLCallbackList::deleteFunction( callback_t func, void *data) if (iter != mCallbackList.end()) { mCallbackList.erase(iter); - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -191,10 +191,10 @@ public: } private: - BOOL tick() + bool tick() { mCallable(); - return TRUE; + return true; } nullary_func_t mCallable; @@ -215,7 +215,7 @@ public: { } private: - BOOL tick() + bool tick() { return mCallable(); } diff --git a/indra/llcommon/lleventtimer.h b/indra/llcommon/lleventtimer.h index dbbfe0c6e6..9bd34915a5 100644 --- a/indra/llcommon/lleventtimer.h +++ b/indra/llcommon/lleventtimer.h @@ -43,7 +43,7 @@ public: //function to be called at the supplied frequency // Normally return FALSE; TRUE will delete the timer after the function returns. - virtual BOOL tick() = 0; + virtual bool tick() = 0; static void updateClass(); @@ -86,7 +86,7 @@ public: mOnce(once), mCallable(callable) {} - BOOL tick() override + bool tick() override { mCallable(); // true tells updateClass() to delete this instance diff --git a/indra/llcommon/lllivefile.cpp b/indra/llcommon/lllivefile.cpp index ea485c2d86..852ddb45e9 100644 --- a/indra/llcommon/lllivefile.cpp +++ b/indra/llcommon/lllivefile.cpp @@ -170,10 +170,10 @@ namespace : LLEventTimer(refresh), mLiveFile(f) { } - BOOL tick() - { + bool tick() + { mLiveFile.checkAndReload(); - return FALSE; + return false; } private: diff --git a/indra/llcommon/llmainthreadtask.h b/indra/llcommon/llmainthreadtask.h index d509b687c0..5fae0212c4 100644 --- a/indra/llcommon/llmainthreadtask.h +++ b/indra/llcommon/llmainthreadtask.h @@ -79,13 +79,13 @@ private: LLEventTimer(0), mTask(std::forward(callable)) {} - BOOL tick() override + bool tick() override { // run the task on the main thread, will populate the future // 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 d1e44efc22..0f6f2a7928 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -323,7 +323,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 @@ -365,7 +365,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); /** @@ -391,15 +391,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 @@ -424,7 +424,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 @@ -1376,7 +1376,7 @@ S32 LLStringUtilBase::compareDictInsensitive(const string_type& astr, const s // Puts compareDict() in a form appropriate for LL container classes to use for sorting. // static template -BOOL LLStringUtilBase::precedesDict( const string_type& a, const string_type& b ) +bool LLStringUtilBase::precedesDict( const string_type& a, const string_type& b ) { if( a.size() && b.size() ) { @@ -1609,15 +1609,15 @@ void LLStringUtilBase::replaceTabsWithSpaces( string_type& str, size_type spa //static template -BOOL LLStringUtilBase::containsNonprintable(const string_type& string) +bool LLStringUtilBase::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) { - rv = TRUE; + rv = true; break; } } @@ -1746,12 +1746,12 @@ void LLStringUtilBase::copyInto(string_type& dst, const string_type& src, siz // True if this is the head of s. //static template -BOOL LLStringUtilBase::isHead( const string_type& string, const T* s ) -{ +bool LLStringUtilBase::isHead( const string_type& string, const T* s ) +{ if( string.empty() ) { // Early exit - return FALSE; + return false; } else { @@ -1818,11 +1818,11 @@ auto LLStringUtilBase::getenv(const std::string& key, const string_type& dflt } template -BOOL LLStringUtilBase::convertToBOOL(const string_type& string, BOOL& value) +bool LLStringUtilBase::convertToBOOL(const string_type& string, BOOL& value) { if( string.empty() ) { - return FALSE; + return false; } string_type temp( string ); @@ -1835,8 +1835,8 @@ BOOL LLStringUtilBase::convertToBOOL(const string_type& string, BOOL& value) (temp == "true") || (temp == "True") ) { - value = TRUE; - return TRUE; + value = true; + return true; } else if( @@ -1847,71 +1847,71 @@ BOOL LLStringUtilBase::convertToBOOL(const string_type& string, BOOL& value) (temp == "false") || (temp == "False") ) { - value = FALSE; - return TRUE; + value = false; + return true; } - return FALSE; + return false; } template -BOOL LLStringUtilBase::convertToU8(const string_type& string, U8& value) +bool LLStringUtilBase::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 -BOOL LLStringUtilBase::convertToS8(const string_type& string, S8& value) +bool LLStringUtilBase::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 -BOOL LLStringUtilBase::convertToS16(const string_type& string, S16& value) +bool LLStringUtilBase::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 -BOOL LLStringUtilBase::convertToU16(const string_type& string, U16& value) +bool LLStringUtilBase::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 -BOOL LLStringUtilBase::convertToU32(const string_type& string, U32& value) +bool LLStringUtilBase::convertToU32(const string_type& string, U32& value) { if( string.empty() ) { - return FALSE; + return false; } string_type temp( string ); @@ -1921,17 +1921,17 @@ BOOL LLStringUtilBase::convertToU32(const string_type& string, U32& value) if(i_stream >> v) { value = v; - return TRUE; + return true; } - return FALSE; + return false; } template -BOOL LLStringUtilBase::convertToS32(const string_type& string, S32& value) +bool LLStringUtilBase::convertToS32(const string_type& string, S32& value) { if( string.empty() ) { - return FALSE; + return false; } string_type temp( string ); @@ -1944,34 +1944,34 @@ BOOL LLStringUtilBase::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 -BOOL LLStringUtilBase::convertToF32(const string_type& string, F32& value) +bool LLStringUtilBase::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 -BOOL LLStringUtilBase::convertToF64(const string_type& string, F64& value) +bool LLStringUtilBase::convertToF64(const string_type& string, F64& value) { if( string.empty() ) { - return FALSE; + return false; } string_type temp( string ); @@ -1984,13 +1984,13 @@ BOOL LLStringUtilBase::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 diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp index 5d33b74365..e76f48b0dc 100644 --- a/indra/llfilesystem/llfilesystem.cpp +++ b/indra/llfilesystem/llfilesystem.cpp @@ -135,14 +135,14 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp if (LLFile::rename(old_filename, new_filename) != 0) { - // We would like to return FALSE here indicating the operation + // We would like to return false here indicating the operation // failed but the original code does not and doing so seems to // break a lot of things so we go with the flow... - //return FALSE; + //return false; LL_WARNS() << "Failed to rename " << old_file_id << " to " << new_id_str << " reason: " << strerror(errno) << LL_ENDL; } - return TRUE; + return true; } // static @@ -172,10 +172,10 @@ S32 LLFileSystem::getFileSize(const LLUUID& file_id, const LLAssetType::EType fi return file_size; } -BOOL LLFileSystem::read(U8* buffer, S32 bytes) +bool LLFileSystem::read(U8* buffer, S32 bytes) { LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance - BOOL success = FALSE; + bool success = false; std::string id; mFileID.toString(id); @@ -204,7 +204,7 @@ BOOL LLFileSystem::read(U8* buffer, S32 bytes) // mPosition += mBytesRead; // if (mBytesRead) // { - // success = TRUE; + // success = true; // } //} LLFILE* file = LLFile::fopen(filename, "rb"); @@ -220,7 +220,7 @@ BOOL LLFileSystem::read(U8* buffer, S32 bytes) // but that will break avatar rezzing... if (mBytesRead) { - success = TRUE; + success = true; } } } @@ -235,13 +235,13 @@ S32 LLFileSystem::getLastBytesRead() return mBytesRead; } -BOOL LLFileSystem::eof() +bool LLFileSystem::eof() { LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance return mPosition >= getSize(); } -BOOL LLFileSystem::write(const U8* buffer, S32 bytes) +bool LLFileSystem::write(const U8* buffer, S32 bytes) { LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance std::string id_str; @@ -249,7 +249,7 @@ BOOL LLFileSystem::write(const U8* buffer, S32 bytes) const std::string extra_info = ""; const std::string filename = LLDiskCache::getInstance()->metaDataToFilepath(id_str, mFileType, extra_info); - BOOL success = FALSE; + bool success = false; // IO-streams replacement //if (mMode == APPEND) @@ -261,7 +261,7 @@ BOOL LLFileSystem::write(const U8* buffer, S32 bytes) // mPosition = ofs.tellp(); // Fix asset caching - // success = TRUE; + // success = true; // } //} //// Fix asset caching @@ -274,7 +274,7 @@ BOOL LLFileSystem::write(const U8* buffer, S32 bytes) // ofs.seekp(mPosition, std::ios::beg); // ofs.write((const char*)buffer, bytes); // mPosition += bytes; - // success = TRUE; + // success = true; // } // else // { @@ -284,7 +284,7 @@ BOOL LLFileSystem::write(const U8* buffer, S32 bytes) // { // ofs.write((const char*)buffer, bytes); // mPosition += bytes; - // success = TRUE; + // success = true; // } // } //} @@ -298,7 +298,7 @@ BOOL LLFileSystem::write(const U8* buffer, S32 bytes) // mPosition += bytes; - // success = TRUE; + // success = true; // } //} if (mMode == APPEND) @@ -353,7 +353,7 @@ BOOL LLFileSystem::write(const U8* buffer, S32 bytes) return success; } -BOOL LLFileSystem::seek(S32 offset, S32 origin) +bool LLFileSystem::seek(S32 offset, S32 origin) { LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance if (-1 == origin) @@ -370,18 +370,18 @@ BOOL LLFileSystem::seek(S32 offset, S32 origin) LL_WARNS() << "Attempt to seek past end of file" << LL_ENDL; mPosition = size; - return FALSE; + return false; } else if (new_pos < 0) { LL_WARNS() << "Attempt to seek past beginning of file" << LL_ENDL; mPosition = 0; - return FALSE; + return false; } mPosition = new_pos; - return TRUE; + return true; } S32 LLFileSystem::tell() const @@ -403,7 +403,7 @@ S32 LLFileSystem::getMaxSize() return INT_MAX; } -BOOL LLFileSystem::rename(const LLUUID& new_id, const LLAssetType::EType new_type) +bool LLFileSystem::rename(const LLUUID& new_id, const LLAssetType::EType new_type) { LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance LLFileSystem::renameFile(mFileID, mFileType, new_id, new_type); @@ -411,13 +411,13 @@ BOOL LLFileSystem::rename(const LLUUID& new_id, const LLAssetType::EType new_typ mFileID = new_id; mFileType = new_type; - return TRUE; + return true; } -BOOL LLFileSystem::remove() +bool LLFileSystem::remove() { LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance LLFileSystem::removeFile(mFileID, mFileType); - return TRUE; + return true; } diff --git a/indra/llfilesystem/llfilesystem.h b/indra/llfilesystem/llfilesystem.h index d934a408c2..ea1b9cf3a1 100644 --- a/indra/llfilesystem/llfilesystem.h +++ b/indra/llfilesystem/llfilesystem.h @@ -40,18 +40,18 @@ class LLFileSystem LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_type, S32 mode = LLFileSystem::READ); ~LLFileSystem(); - BOOL read(U8* buffer, S32 bytes); + bool read(U8* buffer, S32 bytes); S32 getLastBytesRead(); - BOOL eof(); + bool eof(); - BOOL write(const U8* buffer, S32 bytes); - BOOL seek(S32 offset, S32 origin = -1); + bool write(const U8* buffer, S32 bytes); + bool seek(S32 offset, S32 origin = -1); S32 tell() const; S32 getSize(); S32 getMaxSize(); - BOOL rename(const LLUUID& new_id, const LLAssetType::EType new_type); - BOOL remove(); + bool rename(const LLUUID& new_id, const LLAssetType::EType new_type); + bool remove(); static bool getExists(const LLUUID& file_id, const LLAssetType::EType file_type); static bool removeFile(const LLUUID& file_id, const LLAssetType::EType file_type, int suppress_error = 0); diff --git a/indra/llfilesystem/lllfsthread.h b/indra/llfilesystem/lllfsthread.h index f2693a1172..3038e1be12 100644 --- a/indra/llfilesystem/lllfsthread.h +++ b/indra/llfilesystem/lllfsthread.h @@ -114,8 +114,8 @@ public: //------------------------------------------------------------------------ public: - LLLFSThread(bool threaded = TRUE); - ~LLLFSThread(); + LLLFSThread(bool threaded = true); + ~LLLFSThread(); // Return a Request handle handle_t read(const std::string& filename, /* Flawfinder: ignore */ @@ -126,7 +126,7 @@ public: Responder* responder); // static initializers - static void initClass(bool local_is_threaded = TRUE); // Setup sLocal + static void initClass(bool local_is_threaded = true); // Setup sLocal static S32 updateClass(U32 ms_elapsed); static void cleanupClass(); // Delete sLocal diff --git a/indra/llimage/llimagedimensionsinfo.cpp b/indra/llimage/llimagedimensionsinfo.cpp index c8fb9666d9..a9e8a55802 100644 --- a/indra/llimage/llimagedimensionsinfo.cpp +++ b/indra/llimage/llimagedimensionsinfo.cpp @@ -199,7 +199,7 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg() jpeg_create_decompress (&cinfo); jpeg_stdio_src (&cinfo, fp); - jpeg_read_header (&cinfo, TRUE); + jpeg_read_header (&cinfo, true); cinfo.out_color_space = JCS_RGB; jpeg_start_decompress (&cinfo); diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index a204a1abad..1169b0e987 100644 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp @@ -35,7 +35,7 @@ class ImageRequest { public: ImageRequest(const LLPointer& image, - S32 discard, BOOL needs_aux, + S32 discard, bool needs_aux, const LLPointer& responder); virtual ~ImageRequest(); @@ -48,12 +48,12 @@ private: // input LLPointer mFormattedImage; S32 mDiscardLevel; - BOOL mNeedsAux; + bool mNeedsAux; // output LLPointer mDecodedImageRaw; LLPointer mDecodedImageAux; - BOOL mDecodedRaw; - BOOL mDecodedAux; + bool mDecodedRaw; + bool mDecodedAux; LLPointer mResponder; }; @@ -87,7 +87,7 @@ size_t LLImageDecodeThread::getPending() LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage( const LLPointer& image, S32 discard, - BOOL needs_aux, + bool needs_aux, const LLPointer& responder) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; @@ -124,13 +124,13 @@ LLImageDecodeThread::Responder::~Responder() //---------------------------------------------------------------------------- ImageRequest::ImageRequest(const LLPointer& image, - S32 discard, BOOL needs_aux, + S32 discard, bool needs_aux, const LLPointer& responder) : mFormattedImage(image), mDiscardLevel(discard), mNeedsAux(needs_aux), - mDecodedRaw(FALSE), - mDecodedAux(FALSE), + mDecodedRaw(false), + mDecodedAux(false), mResponder(responder) { } diff --git a/indra/llimage/llimageworker.h b/indra/llimage/llimageworker.h index ca4c0d93d0..c24fd31f0f 100644 --- a/indra/llimage/llimageworker.h +++ b/indra/llimage/llimageworker.h @@ -49,7 +49,7 @@ public: // meant to resemble LLQueuedThread::handle_t typedef U32 handle_t; handle_t decodeImage(const LLPointer& image, - S32 discard, BOOL needs_aux, + S32 discard, bool needs_aux, const LLPointer& responder); size_t getPending(); size_t update(F32 max_time_ms); diff --git a/indra/llimage/llpngwrapper.cpp b/indra/llimage/llpngwrapper.cpp index 27e23b577b..baf1330011 100644 --- a/indra/llimage/llpngwrapper.cpp +++ b/indra/llimage/llpngwrapper.cpp @@ -70,7 +70,7 @@ LLPngWrapper::~LLPngWrapper() } // Checks the src for a valid PNG header -BOOL LLPngWrapper::isValidPng(U8* src) +bool LLPngWrapper::isValidPng(U8* src) { const int PNG_BYTES_TO_CHECK = 8; @@ -78,10 +78,10 @@ BOOL LLPngWrapper::isValidPng(U8* src) if (sig != 0) { mErrorMessage = "Invalid or corrupt PNG file"; - return FALSE; + return false; } - return TRUE; + return true; } // Called by the libpng library when a fatal encoding or decoding error @@ -134,7 +134,7 @@ void LLPngWrapper::writeFlush(png_structp png_ptr) // The scanline also begins at the bottom of // the image (per SecondLife conventions) instead of at the top, so we // must assign row-pointers in "reverse" order. -BOOL LLPngWrapper::readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop) +bool LLPngWrapper::readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop) { try { @@ -210,18 +210,18 @@ BOOL LLPngWrapper::readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInf { mErrorMessage = msg.what(); releaseResources(); - return (FALSE); + return (false); } catch (std::bad_alloc&) { mErrorMessage = "LLPngWrapper"; releaseResources(); - return (FALSE); + return (false); } // Clean up and return releaseResources(); - return (TRUE); + return (true); } // Do transformations to normalize the input to 8-bpp RGBA @@ -283,7 +283,7 @@ void LLPngWrapper::updateMetaData() // Method to write raw image into PNG at dest. The raw scanline begins // at the bottom of the image per SecondLife conventions. -BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest, size_t destSize) +bool LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest, size_t destSize) { try { @@ -364,11 +364,11 @@ BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest, size_t destSiz { mErrorMessage = msg.what(); releaseResources(); - return (FALSE); + return (false); } releaseResources(); - return TRUE; + return true; } // Cleanup various internal structures diff --git a/indra/llimage/llpngwrapper.h b/indra/llimage/llpngwrapper.h index 8d42317b0f..b17e8d1f40 100644 --- a/indra/llimage/llpngwrapper.h +++ b/indra/llimage/llpngwrapper.h @@ -43,9 +43,9 @@ public: S8 mComponents; }; - BOOL isValidPng(U8* src); - BOOL readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop = NULL); - BOOL writePng(const LLImageRaw* rawImage, U8* dst, size_t destSize); + bool isValidPng(U8* src); + bool readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop = NULL); + bool writePng(const LLImageRaw* rawImage, U8* dst, size_t destSize); U32 getFinalSize(); const std::string& getErrorMessage(); diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 8b39d52b6a..7acc654601 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -132,7 +132,7 @@ LLAssetType::EType LLInventoryObject::getActualType() const return mType; } -BOOL LLInventoryObject::getIsLinkType() const +bool LLInventoryObject::getIsLinkType() const { return LLAssetType::lookupIsLinkType(mType); } @@ -181,7 +181,7 @@ void LLInventoryObject::setType(LLAssetType::EType type) // virtual -BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream) +bool LLInventoryObject::importLegacyStream(std::istream& input_stream) { // *NOTE: Changing the buffer size will require changing the scanf // calls below. @@ -252,10 +252,10 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream) << "' in LLInventoryObject::importLegacyStream() for object " << mUUID << LL_ENDL; } } - return TRUE; + return true; } -BOOL LLInventoryObject::exportLegacyStream(std::ostream& output_stream, BOOL) const +bool LLInventoryObject::exportLegacyStream(std::ostream& output_stream, bool) const { std::string uuid_str; output_stream << "\tinv_object\t0\n\t{\n"; @@ -266,16 +266,16 @@ BOOL LLInventoryObject::exportLegacyStream(std::ostream& output_stream, BOOL) co output_stream << "\t\ttype\t" << LLAssetType::lookup(mType) << "\n"; output_stream << "\t\tname\t" << mName.c_str() << "|\n"; output_stream << "\t}\n"; - return TRUE; + return true; } -void LLInventoryObject::updateParentOnServer(BOOL) const +void LLInventoryObject::updateParentOnServer(bool) const { // don't do nothin' LL_WARNS() << "LLInventoryObject::updateParentOnServer() called. Doesn't do anything." << LL_ENDL; } -void LLInventoryObject::updateServer(BOOL) const +void LLInventoryObject::updateServer(bool) const { // don't do nothin' LL_WARNS() << "LLInventoryObject::updateServer() called. Doesn't do anything." << LL_ENDL; @@ -562,7 +562,7 @@ void LLInventoryItem::packMessage(LLMessageSystem* msg) const } // virtual -BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num) +bool LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num) { msg->getUUIDFast(block, _PREHASH_ItemID, mUUID, block_num); msg->getUUIDFast(block, _PREHASH_FolderID, mParentUUID, block_num); @@ -598,13 +598,13 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 if(local_crc == remote_crc) { LL_DEBUGS() << "crc matches" << LL_ENDL; - return TRUE; + return true; } else { LL_WARNS() << "inventory crc mismatch: local=" << std::hex << local_crc << " remote=" << remote_crc << std::dec << LL_ENDL; - return FALSE; + return false; } #else return (local_crc == remote_crc); @@ -690,7 +690,7 @@ int splitCacheLine( char *aBuffer, char *&aKeyword, char *&aValue ) // // virtual -BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream) +bool LLInventoryItem::importLegacyStream(std::istream& input_stream) { // *NOTE: Changing the buffer size will require changing the scanf // calls below. @@ -698,7 +698,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream) char keyword[MAX_STRING]; /* Flawfinder: ignore */ char valuestr[MAX_STRING]; /* Flawfinder: ignore */ char junk[MAX_STRING]; /* Flawfinder: ignore */ - BOOL success = TRUE; + bool success = true; keyword[0] = '\0'; valuestr[0] = '\0'; @@ -738,7 +738,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream) // the permissions. Thus, we read that out, and fix legacy // objects. It's possible this op would fail, but it // should pick up the vast majority of the tasks. - BOOL has_perm_mask = FALSE; + bool has_perm_mask = false; U32 perm_mask = 0; success = mSaleInfo.importLegacyStream(input_stream, has_perm_mask, perm_mask); if(has_perm_mask) @@ -868,7 +868,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream) return success; } -BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key) const +bool LLInventoryItem::exportLegacyStream(std::ostream& output_stream, bool include_asset_key) const { std::string uuid_str; output_stream << "\tinv_item\t0\n\t{\n"; @@ -922,7 +922,7 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu output_stream << "\t\tdesc\t" << mDescription.c_str() << "|\n"; output_stream << "\t\tcreation_date\t" << mCreationDate << "\n"; output_stream << "\t}\n"; - return TRUE; + return true; } LLSD LLInventoryItem::asLLSD() const @@ -1042,7 +1042,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) // the permissions. Thus, we read that out, and fix legacy // objects. It's possible this op would fail, but it // should pick up the vast majority of the tasks. - BOOL has_perm_mask = FALSE; + bool has_perm_mask = false; U32 perm_mask = 0; if (!mSaleInfo.fromLLSD(i->second, has_perm_mask, perm_mask)) { @@ -1326,7 +1326,7 @@ void LLInventoryCategory::unpackMessage(LLMessageSystem* msg, } // virtual -BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream) +bool LLInventoryCategory::importLegacyStream(std::istream& input_stream) { // *NOTE: Changing the buffer size will require changing the scanf // calls below. @@ -1405,10 +1405,10 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream) << "' in inventory import category " << mUUID << LL_ENDL; } } - return TRUE; + return true; } -BOOL LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, BOOL) const +bool LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, bool) const { std::string uuid_str; output_stream << "\tinv_category\t0\n\t{\n"; @@ -1426,7 +1426,7 @@ BOOL LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, BOOL) output_stream << "\t\tmetadata\t" << metadata << "|\n"; } output_stream << "\t}\n"; - return TRUE; + return true; } LLSD LLInventoryCategory::exportLLSD() const diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index 6d4535af27..695b04097f 100644 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -74,7 +74,7 @@ public: virtual const std::string& getName() const; virtual LLAssetType::EType getType() const; LLAssetType::EType getActualType() const; // bypasses indirection for linked items - BOOL getIsLinkType() const; + bool getIsLinkType() const; virtual time_t getCreationDate() const; //-------------------------------------------------------------------- @@ -98,11 +98,11 @@ public: // between simulator and viewer. //-------------------------------------------------------------------- - virtual BOOL importLegacyStream(std::istream& input_stream); - virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const; + virtual bool importLegacyStream(std::istream& input_stream); + virtual bool exportLegacyStream(std::ostream& output_stream, bool include_asset_key = true) const; - virtual void updateParentOnServer(BOOL) const; - virtual void updateServer(BOOL) const; + virtual void updateParentOnServer(bool) const; + virtual void updateServer(bool) const; //-------------------------------------------------------------------- // Member Variables @@ -193,14 +193,14 @@ public: // Returns TRUE if the inventory item came through the network correctly. // Uses a simple crc check which is defeatable, but we want to detect // network mangling somehow. - virtual BOOL unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0); + virtual bool unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0); //-------------------------------------------------------------------- // File Support //-------------------------------------------------------------------- public: - virtual BOOL importLegacyStream(std::istream& input_stream); - virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const; + virtual bool importLegacyStream(std::istream& input_stream); + virtual bool exportLegacyStream(std::ostream& output_stream, bool include_asset_key = true) const; //-------------------------------------------------------------------- // Helper Functions @@ -267,8 +267,8 @@ public: // File Support //-------------------------------------------------------------------- public: - virtual BOOL importLegacyStream(std::istream& input_stream); - virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const; + virtual bool importLegacyStream(std::istream& input_stream); + virtual bool exportLegacyStream(std::ostream& output_stream, bool include_asset_key = TRUE) const; LLSD exportLLSD() const; bool importLLSD(const LLSD& cat_data); diff --git a/indra/llinventory/llnotecard.cpp b/indra/llinventory/llnotecard.cpp index 908c647498..4ac5657e10 100644 --- a/indra/llinventory/llnotecard.cpp +++ b/indra/llinventory/llnotecard.cpp @@ -162,25 +162,25 @@ bool LLNotecard::importStream(std::istream& str) if(str.fail()) { LL_WARNS() << "Invalid Linden text file header " << LL_ENDL; - return FALSE; + return false; } if( 1 != mVersion && 2 != mVersion) { LL_WARNS() << "Invalid Linden text file version: " << mVersion << LL_ENDL; - return FALSE; + return false; } str >> std::ws >> "{\n"; if(str.fail()) { LL_WARNS() << "Invalid Linden text file format" << LL_ENDL; - return FALSE; + return false; } if(!importEmbeddedItemsStream(str)) { - return FALSE; + return false; } char line_buf[STD_STRING_BUF_SIZE]; /* Flawfinder: ignore */ @@ -188,7 +188,7 @@ bool LLNotecard::importStream(std::istream& str) if(str.fail()) { LL_WARNS() << "Invalid Linden text length field" << LL_ENDL; - return FALSE; + return false; } line_buf[STD_STRING_STR_LEN] = '\0'; @@ -196,23 +196,23 @@ bool LLNotecard::importStream(std::istream& str) if( 1 != sscanf(line_buf, "Text length %d", &text_len) ) { LL_WARNS() << "Invalid Linden text length field" << LL_ENDL; - return FALSE; + return false; } if(text_len > mMaxText || text_len < 0) { LL_WARNS() << "Invalid Linden text length: " << text_len << LL_ENDL; - return FALSE; + return false; } - BOOL success = TRUE; + bool success = true; char* text = new char[text_len + 1]; fullread(str, text, text_len); if(str.fail()) { LL_WARNS() << "Invalid Linden text: text shorter than text length: " << text_len << LL_ENDL; - success = FALSE; + success = false; } text[text_len] = '\0'; @@ -247,7 +247,7 @@ bool LLNotecard::exportEmbeddedItemsStream( std::ostream& out_stream ) out_stream << llformat("ext char index %d\n", idx ); if( !item->exportLegacyStream( out_stream ) ) { - return FALSE; + return false; } out_stream << "}\n"; } @@ -256,7 +256,7 @@ bool LLNotecard::exportEmbeddedItemsStream( std::ostream& out_stream ) out_stream << "}\n"; - return TRUE; + return true; } bool LLNotecard::exportStream( std::ostream& out_stream ) @@ -266,14 +266,14 @@ bool LLNotecard::exportStream( std::ostream& out_stream ) if( !exportEmbeddedItemsStream( out_stream ) ) { - return FALSE; + return false; } out_stream << llformat("Text length %d\n", mText.length() ); out_stream << mText; out_stream << "}\n"; - return TRUE; + return true; } //////////////////////////////////////////////////////////////////////////// diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 7ab0d4f94c..50e08b9c56 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* list, const LLUUID& agent_id); // Various missing prototypes @@ -952,7 +952,7 @@ BOOL LLParcel::isSaleTimerExpired(const U64& time) { if (mSaleTimerExpires.getStarted() == FALSE) { - return FALSE; + return false; } BOOL expired = mSaleTimerExpires.checkExpirationAndReset(0.0f); if (expired) @@ -966,7 +966,7 @@ BOOL LLParcel::isMediaResetTimerExpired(const U64& time) { if (mMediaResetTimer.getStarted() == FALSE) { - return FALSE; + return false; } BOOL expired = mMediaResetTimer.checkExpirationAndReset(0.0f); if (expired) @@ -1079,7 +1079,7 @@ BOOL LLParcel::isBuyerAuthorized(const LLUUID& buyer_id) const { if(mAuthBuyerID.isNull()) { - return TRUE; + return true; } return (mAuthBuyerID == buyer_id); } diff --git a/indra/llinventory/llsaleinfo.cpp b/indra/llinventory/llsaleinfo.cpp index b7231ee239..4ab22d4002 100644 --- a/indra/llinventory/llsaleinfo.cpp +++ b/indra/llinventory/llsaleinfo.cpp @@ -66,7 +66,7 @@ LLSaleInfo::LLSaleInfo(EForSale sale_type, S32 sale_price) : mSalePrice = llclamp(mSalePrice, 0, S32_MAX); } -BOOL LLSaleInfo::isForSale() const +bool LLSaleInfo::isForSale() const { return (FS_NOT != mSaleType); } @@ -78,13 +78,13 @@ U32 LLSaleInfo::getCRC32() const return rv; } -BOOL LLSaleInfo::exportLegacyStream(std::ostream& output_stream) const +bool LLSaleInfo::exportLegacyStream(std::ostream& output_stream) const { output_stream << "\tsale_info\t0\n\t{\n"; output_stream << "\t\tsale_type\t" << lookup(mSaleType) << "\n"; output_stream << "\t\tsale_price\t" << mSalePrice << "\n"; output_stream <<"\t}\n"; - return TRUE; + return true; } LLSD LLSaleInfo::asLLSD() const @@ -95,7 +95,7 @@ LLSD LLSaleInfo::asLLSD() const return sd; } -bool LLSaleInfo::fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask) +bool LLSaleInfo::fromLLSD(const LLSD& sd, bool& has_perm_mask, U32& perm_mask) { const char *w; @@ -113,22 +113,22 @@ bool LLSaleInfo::fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask) w = "perm_mask"; if (sd.has(w)) { - has_perm_mask = TRUE; + has_perm_mask = true; perm_mask = ll_U32_from_sd(sd[w]); } return true; } -BOOL LLSaleInfo::importLegacyStream(std::istream& input_stream, BOOL& has_perm_mask, U32& perm_mask) +bool LLSaleInfo::importLegacyStream(std::istream& input_stream, bool& has_perm_mask, U32& perm_mask) { - has_perm_mask = FALSE; + has_perm_mask = false; // *NOTE: Changing the buffer size will require changing the scanf // calls below. char buffer[MAX_STRING]; /* Flawfinder: ignore */ char keyword[MAX_STRING]; /* Flawfinder: ignore */ char valuestr[MAX_STRING]; /* Flawfinder: ignore */ - BOOL success = TRUE; + bool success = true; keyword[0] = '\0'; valuestr[0] = '\0'; diff --git a/indra/llinventory/llsaleinfo.h b/indra/llinventory/llsaleinfo.h index 3c8952838b..b32eb6db62 100644 --- a/indra/llinventory/llsaleinfo.h +++ b/indra/llinventory/llsaleinfo.h @@ -74,7 +74,7 @@ public: LLSaleInfo(EForSale sale_type, S32 sale_price); // accessors - BOOL isForSale() const; + bool isForSale() const; EForSale getSaleType() const { return mSaleType; } S32 getSalePrice() const { return mSalePrice; } U32 getCRC32() const; @@ -84,11 +84,11 @@ public: void setSalePrice(S32 price); //void setNextOwnerPermMask(U32 mask) { mNextOwnerPermMask = mask; } - BOOL exportLegacyStream(std::ostream& output_stream) const; + bool exportLegacyStream(std::ostream& output_stream) const; LLSD asLLSD() const; operator LLSD() const { return asLLSD(); } - bool fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask); - BOOL importLegacyStream(std::istream& input_stream, BOOL& has_perm_mask, U32& perm_mask); + bool fromLLSD(const LLSD& sd, bool& has_perm_mask, U32& perm_mask); + bool importLegacyStream(std::istream& input_stream, bool& has_perm_mask, U32& perm_mask); LLSD packMessage() const; void unpackMessage(LLSD sales); diff --git a/indra/llmath/llbbox.cpp b/indra/llmath/llbbox.cpp index 3e2c05a6e6..395992e68f 100644 --- a/indra/llmath/llbbox.cpp +++ b/indra/llmath/llbbox.cpp @@ -38,7 +38,7 @@ void LLBBox::addPointLocal(const LLVector3& p) { mMinLocal = p; mMaxLocal = p; - mEmpty = FALSE; + mEmpty = false; } else { @@ -140,7 +140,7 @@ LLVector3 LLBBox::agentToLocalBasis(const LLVector3& v) const return v * m; } -BOOL LLBBox::containsPointLocal(const LLVector3& p) const +bool LLBBox::containsPointLocal(const LLVector3& p) const { if ( (p.mV[VX] < mMinLocal.mV[VX]) ||(p.mV[VX] > mMaxLocal.mV[VX]) @@ -149,12 +149,12 @@ BOOL LLBBox::containsPointLocal(const LLVector3& p) const ||(p.mV[VZ] < mMinLocal.mV[VZ]) ||(p.mV[VZ] > mMaxLocal.mV[VZ])) { - return FALSE; + return false; } - return TRUE; + return true; } -BOOL LLBBox::containsPointAgent(const LLVector3& p) const +bool LLBBox::containsPointAgent(const LLVector3& p) const { LLVector3 point_local = agentToLocal(p); return containsPointLocal(point_local); diff --git a/indra/llmath/llbbox.h b/indra/llmath/llbbox.h index 28e69b75e1..f15d4c2061 100644 --- a/indra/llmath/llbbox.h +++ b/indra/llmath/llbbox.h @@ -64,8 +64,8 @@ public: LLVector3 getExtentLocal() const { return mMaxLocal - mMinLocal; } - BOOL containsPointLocal(const LLVector3& p) const; - BOOL containsPointAgent(const LLVector3& p) const; + bool containsPointLocal(const LLVector3& p) const; + bool containsPointAgent(const LLVector3& p) const; void addPointAgent(LLVector3 p); void addBBoxAgent(const LLBBox& b); @@ -92,7 +92,7 @@ private: LLVector3 mMaxLocal; LLVector3 mPosAgent; // Position relative to Agent's Region LLQuaternion mRotation; - BOOL mEmpty; // Nothing has been added to this bbox yet + bool mEmpty; // Nothing has been added to this bbox yet }; //LLBBox operator*(const LLBBox &a, const LLMatrix4 &b); 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/llsphere.cpp b/indra/llmath/llsphere.cpp index a8d6200488..7292e3c0de 100644 --- a/indra/llmath/llsphere.cpp +++ b/indra/llmath/llsphere.cpp @@ -69,18 +69,18 @@ F32 LLSphere::getRadius() const return mRadius; } -// returns 'TRUE' if this sphere completely contains other_sphere -BOOL LLSphere::contains(const LLSphere& other_sphere) const +// returns 'true' if this sphere completely contains other_sphere +bool LLSphere::contains(const LLSphere& other_sphere) const { F32 separation = (mCenter - other_sphere.mCenter).length(); - return (mRadius >= separation + other_sphere.mRadius) ? TRUE : FALSE; + return (mRadius >= separation + other_sphere.mRadius) ? true : false; } -// returns 'TRUE' if this sphere completely contains other_sphere -BOOL LLSphere::overlaps(const LLSphere& other_sphere) const +// returns 'true' if this sphere completely contains other_sphere +bool LLSphere::overlaps(const LLSphere& other_sphere) const { F32 separation = (mCenter - other_sphere.mCenter).length(); - return (separation <= mRadius + other_sphere.mRadius) ? TRUE : FALSE; + return (separation <= mRadius + other_sphere.mRadius) ? true : false; } // returns overlap diff --git a/indra/llmath/llsphere.h b/indra/llmath/llsphere.h index 7c60a11406..ba8e437ecf 100644 --- a/indra/llmath/llsphere.h +++ b/indra/llmath/llsphere.h @@ -47,11 +47,11 @@ public: const LLVector3& getCenter() const; F32 getRadius() const; - // returns TRUE if this sphere completely contains other_sphere - BOOL contains(const LLSphere& other_sphere) const; + // returns true if this sphere completely contains other_sphere + bool contains(const LLSphere& other_sphere) const; - // returns TRUE if this sphere overlaps other_sphere - BOOL overlaps(const LLSphere& other_sphere) const; + // returns true if this sphere overlaps other_sphere + bool overlaps(const LLSphere& other_sphere) const; // returns overlap distance // negative overlap is closest approach diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index bfeb055599..020f1c6891 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -4838,10 +4838,10 @@ LLVolumeFace::LLVolumeFace() : mJustWeights(NULL), mJointIndices(NULL), #endif - mWeightsScrubbed(FALSE), + mWeightsScrubbed(false), mOctree(NULL), mOctreeTriangles(NULL), - mOptimized(FALSE) + mOptimized(false) { mExtents = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*3); mExtents[0].splat(-0.5f); diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index e39397613b..7bed7bff17 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -690,9 +690,9 @@ class LLProfile public: LLProfile() - : mOpen(FALSE), - mConcave(FALSE), - mDirty(TRUE), + : mOpen(false), + mConcave(false), + mDirty(true), mTotalOut(0), mTotal(2) { @@ -782,9 +782,9 @@ public: public: LLPath() - : mOpen(FALSE), + : mOpen(false), mTotal(0), - mDirty(TRUE), + mDirty(true), mStep(1) { } diff --git a/indra/llmath/llvolumemgr.cpp b/indra/llmath/llvolumemgr.cpp index 9399504529..d1e145cff1 100644 --- a/indra/llmath/llvolumemgr.cpp +++ b/indra/llmath/llvolumemgr.cpp @@ -59,9 +59,9 @@ LLVolumeMgr::~LLVolumeMgr() mDataMutex = NULL; } -BOOL LLVolumeMgr::cleanup() +bool LLVolumeMgr::cleanup() { - BOOL no_refs = TRUE; + bool no_refs = true; if (mDataMutex) { mDataMutex->lock(); @@ -73,7 +73,7 @@ BOOL LLVolumeMgr::cleanup() LLVolumeLODGroup *volgroupp = iter->second; if (volgroupp->cleanupRefs() == false) { - no_refs = FALSE; + no_refs = false; } delete volgroupp; } @@ -301,7 +301,7 @@ LLVolume* LLVolumeLODGroup::refLOD(const S32 lod) return mVolumeLODs[lod]; } -BOOL LLVolumeLODGroup::derefLOD(LLVolume *volumep) +bool LLVolumeLODGroup::derefLOD(LLVolume *volumep) { llassert_always(mRefs > 0); mRefs--; @@ -317,11 +317,11 @@ BOOL LLVolumeLODGroup::derefLOD(LLVolume *volumep) mVolumeLODs[i] = NULL; } #endif - return TRUE; + return true; } } LL_ERRS() << "Deref of non-matching LOD in volume LOD group" << LL_ENDL; - return FALSE; + return false; } S32 LLVolumeLODGroup::getDetailFromTan(const F32 tan_angle) diff --git a/indra/llmath/llvolumemgr.h b/indra/llmath/llvolumemgr.h index c75906f675..b0baf7054d 100644 --- a/indra/llmath/llvolumemgr.h +++ b/indra/llmath/llvolumemgr.h @@ -56,7 +56,7 @@ public: static S32 getVolumeDetailFromScale(F32 scale); LLVolume* refLOD(const S32 detail); - BOOL derefLOD(LLVolume *volumep); + bool derefLOD(LLVolume *volumep); S32 getNumRefs() const { return mRefs; } const LLVolumeParams* getVolumeParams() const { return &mVolumeParams; }; @@ -80,7 +80,7 @@ class LLVolumeMgr public: LLVolumeMgr(); virtual ~LLVolumeMgr(); - BOOL cleanup(); // Cleanup all volumes being managed, returns TRUE if no dangling references + bool cleanup(); // Cleanup all volumes being managed, returns true if no dangling references virtual LLVolumeLODGroup* getGroup( const LLVolumeParams& volume_params ) const; diff --git a/indra/llmath/raytrace.cpp b/indra/llmath/raytrace.cpp index f38fe49bcb..314255374a 100644 --- a/indra/llmath/raytrace.cpp +++ b/indra/llmath/raytrace.cpp @@ -34,8 +34,8 @@ #include "raytrace.h" -BOOL line_plane(const LLVector3 &line_point, const LLVector3 &line_direction, - const LLVector3 &plane_point, const LLVector3 plane_normal, +bool line_plane(const LLVector3 &line_point, const LLVector3 &line_direction, + const LLVector3 &plane_point, const LLVector3 plane_normal, LLVector3 &intersection) { F32 N = line_direction * plane_normal; @@ -43,19 +43,19 @@ BOOL line_plane(const LLVector3 &line_point, const LLVector3 &line_direction, { // line is perpendicular to plane normal // so it is either entirely on plane, or not on plane at all - return FALSE; + return false; } // Ax + By, + Cz + D = 0 // D = - (plane_point * plane_normal) // N = line_direction * plane_normal // intersection = line_point - ((D + plane_normal * line_point) / N) * line_direction intersection = line_point - ((plane_normal * line_point - plane_point * plane_normal) / N) * line_direction; - return TRUE; + return true; } -BOOL ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction, - const LLVector3 &plane_point, const LLVector3 plane_normal, +bool ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction, + const LLVector3 &plane_point, const LLVector3 plane_normal, LLVector3 &intersection) { F32 N = ray_direction * plane_normal; @@ -63,7 +63,7 @@ BOOL ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction, { // ray is perpendicular to plane normal // so it is either entirely on plane, or not on plane at all - return FALSE; + return false; } // Ax + By, + Cz + D = 0 // D = - (plane_point * plane_normal) @@ -73,14 +73,14 @@ BOOL ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction, if (alpha < 0.0f) { // ray points away from plane - return FALSE; + return false; } intersection = ray_point + alpha * ray_direction; - return TRUE; + return true; } -BOOL ray_circle(const LLVector3 &ray_point, const LLVector3 &ray_direction, +bool ray_circle(const LLVector3 &ray_point, const LLVector3 &ray_direction, const LLVector3 &circle_center, const LLVector3 plane_normal, F32 circle_radius, LLVector3 &intersection) { @@ -88,15 +88,15 @@ BOOL ray_circle(const LLVector3 &ray_point, const LLVector3 &ray_direction, { if (circle_radius >= (intersection - circle_center).magVec()) { - return TRUE; + return true; } } - return FALSE; + return false; } -BOOL ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction, - const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2, +bool ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction, + const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2, LLVector3 &intersection, LLVector3 &intersection_normal) { LLVector3 side_01 = point_1 - point_0; @@ -112,15 +112,15 @@ BOOL ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction, intersection_normal * (side_12 % (intersection - point_1)) >= 0.0f && intersection_normal * (side_20 % (intersection - point_2)) >= 0.0f) { - return TRUE; + return true; } } - return FALSE; + return false; } // assumes a parallelogram -BOOL ray_quadrangle(const LLVector3 &ray_point, const LLVector3 &ray_direction, +bool ray_quadrangle(const LLVector3 &ray_point, const LLVector3 &ray_direction, const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2, LLVector3 &intersection, LLVector3 &intersection_normal) { @@ -140,14 +140,14 @@ BOOL ray_quadrangle(const LLVector3 &ray_point, const LLVector3 &ray_direction, intersection_normal * (side_23 % (intersection - point_2)) >= 0.0f && intersection_normal * (side_30 % (intersection - point_3)) >= 0.0f) { - return TRUE; + return true; } } - return FALSE; + return false; } -BOOL ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction, +bool ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction, const LLVector3 &sphere_center, F32 sphere_radius, LLVector3 &intersection, LLVector3 &intersection_normal) { @@ -160,7 +160,7 @@ BOOL ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction, F32 radius_squared = sphere_radius * sphere_radius; if (shortest_distance > radius_squared) { - return FALSE; + return false; } F32 half_chord = (F32) sqrt(radius_squared - shortest_distance); @@ -170,7 +170,7 @@ BOOL ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction, if (dot < 0.0f) { // ray shoots away from sphere and is not inside it - return FALSE; + return false; } shortest_distance = ray_direction * ((closest_approach - half_chord * ray_direction) - ray_point); @@ -195,11 +195,11 @@ BOOL ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction, intersection_normal.setVec(0.0f, 0.0f, 0.0f); } - return TRUE; + return true; } -BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction, +bool ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction, const LLVector3 &cyl_center, const LLVector3 &cyl_scale, const LLQuaternion &cyl_rotation, LLVector3 &intersection, LLVector3 &intersection_normal) { @@ -270,15 +270,15 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction, if (dot < 0.0f) { // ray points away from cylinder bottom - return FALSE; + return false; } // ray hit top from outside intersection = ray_point - (shortest_distance + cyl_length) * cyl_axis; intersection_normal = -cyl_axis; } - return TRUE; + return true; } - return FALSE; + return false; } // check for intersection with infinite cylinder @@ -299,7 +299,7 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction, if (out < 0.0f) { // cylinder is behind the ray, so we return FALSE - return FALSE; + return false; } in = dist_to_closest_point - half_chord_length; // dist to entering point @@ -341,14 +341,14 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction, if (shortest_distance > out) { // ray missed the finite cylinder - return FALSE; + return false; } if (shortest_distance > in) { // ray intersects cylinder at top plane intersection = temp_vector; intersection_normal = -cyl_axis; - return TRUE; + return true; } } else @@ -357,7 +357,7 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction, if (shortest_distance < in) { // missed the finite cylinder - return FALSE; + return false; } } @@ -370,14 +370,14 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction, if (shortest_distance > out) { // ray missed the finite cylinder - return FALSE; + return false; } if (shortest_distance > in) { // ray intersects cylinder at bottom plane intersection = temp_vector; intersection_normal = cyl_axis; - return TRUE; + return true; } } else @@ -386,7 +386,7 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction, if (shortest_distance < in) { // ray missed the finite cylinder - return FALSE; + return false; } } @@ -399,14 +399,14 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction, if (shortest_distance < 0.0f || shortest_distance > cyl_length) { // ray missed finite cylinder - return FALSE; + return false; } } - return TRUE; + return true; } - return FALSE; + return false; } @@ -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/raytrace.h b/indra/llmath/raytrace.h index 2d32af0c86..92bca45566 100644 --- a/indra/llmath/raytrace.h +++ b/indra/llmath/raytrace.h @@ -61,26 +61,26 @@ class LLQuaternion; // frame. -// returns TRUE iff line is not parallel to plane. -BOOL line_plane(const LLVector3 &line_point, const LLVector3 &line_direction, - const LLVector3 &plane_point, const LLVector3 plane_normal, +// returns true if line is not parallel to plane. +bool line_plane(const LLVector3 &line_point, const LLVector3 &line_direction, + const LLVector3 &plane_point, const LLVector3 plane_normal, LLVector3 &intersection); -// returns TRUE iff line is not parallel to plane. -BOOL ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction, - const LLVector3 &plane_point, const LLVector3 plane_normal, +// returns true if line is not parallel to plane. +bool ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction, + const LLVector3 &plane_point, const LLVector3 plane_normal, LLVector3 &intersection); -BOOL ray_circle(const LLVector3 &ray_point, const LLVector3 &ray_direction, +bool ray_circle(const LLVector3 &ray_point, const LLVector3 &ray_direction, const LLVector3 &circle_center, const LLVector3 plane_normal, F32 circle_radius, LLVector3 &intersection); // point_0 through point_2 define the plane_normal via the right-hand rule: // circle from point_0 to point_2 with fingers ==> thumb points in direction of normal -BOOL ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction, - const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2, +bool ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction, + const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2, LLVector3 &intersection, LLVector3 &intersection_normal); @@ -88,19 +88,19 @@ BOOL ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction, // right-hand-rule... curl fingers from lower-left toward lower-right then toward upper-right // ==> thumb points in direction of normal // assumes a parallelogram, so point_3 is determined by the other points -BOOL ray_quadrangle(const LLVector3 &ray_point, const LLVector3 &ray_direction, - const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2, +bool ray_quadrangle(const LLVector3 &ray_point, const LLVector3 &ray_direction, + const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2, LLVector3 &intersection, LLVector3 &intersection_normal); -BOOL ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction, +bool ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction, const LLVector3 &sphere_center, F32 sphere_radius, LLVector3 &intersection, LLVector3 &intersection_normal); // finite right cylinder is defined by end centers: "cyl_top", "cyl_bottom", // and by the cylinder radius "cyl_radius" -BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction, +bool ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction, const LLVector3 &cyl_center, const LLVector3 &cyl_scale, const LLQuaternion &cyl_rotation, LLVector3 &intersection, LLVector3 &intersection_normal); 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/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index a887bbc39a..41bad56c1e 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -35,7 +35,7 @@ extern LLControlGroup gSavedSettings; #if LL_DARWIN -extern BOOL gHiDPISupport; +extern bool gHiDPISupport; #endif static int LOW_PRIORITY_TEXTURE_SIZE_DEFAULT = 256; diff --git a/indra/llplugin/llpluginsharedmemory.cpp b/indra/llplugin/llpluginsharedmemory.cpp index 63ff5085c6..3fc9cbd973 100644 --- a/indra/llplugin/llpluginsharedmemory.cpp +++ b/indra/llplugin/llpluginsharedmemory.cpp @@ -478,7 +478,7 @@ bool LLPluginSharedMemory::attach(const std::string &name, size_t size) mImpl->mMapFile = OpenFileMappingA( FILE_MAP_ALL_ACCESS, // read/write access - FALSE, // do not inherit the name + false, // do not inherit the name mName.c_str()); // name of mapping object if(mImpl->mMapFile == NULL) diff --git a/indra/llrender/llcubemaparray.cpp b/indra/llrender/llcubemaparray.cpp index 1debd33953..ed0ad07dc0 100644 --- a/indra/llrender/llcubemaparray.cpp +++ b/indra/llrender/llcubemaparray.cpp @@ -107,7 +107,7 @@ LLCubeMapArray::~LLCubeMapArray() { } -void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, BOOL use_mips) +void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, bool use_mips) { U32 texname = 0; mWidth = resolution; diff --git a/indra/llrender/llcubemaparray.h b/indra/llrender/llcubemaparray.h index 6c3f7dc890..1b0fa626c4 100644 --- a/indra/llrender/llcubemaparray.h +++ b/indra/llrender/llcubemaparray.h @@ -52,7 +52,7 @@ public: // components - number of components per pixel // count - number of cube maps in the array // use_mips - if TRUE, mipmaps will be allocated for this cube map array and anisotropic filtering will be used - void allocate(U32 res, U32 components, U32 count, BOOL use_mips = TRUE); + void allocate(U32 res, U32 components, U32 count, bool use_mips = true); void bind(S32 stage); void unbind(); diff --git a/indra/llrender/llfontbitmapcache.cpp b/indra/llrender/llfontbitmapcache.cpp index c71e24c83a..004888f8bc 100644 --- a/indra/llrender/llfontbitmapcache.cpp +++ b/indra/llrender/llfontbitmapcache.cpp @@ -73,7 +73,7 @@ LLImageGL *LLFontBitmapCache::getImageGL(U32 bitmap_num) const } -BOOL LLFontBitmapCache::nextOpenPos(S32 width, S32 &pos_x, S32 &pos_y, S32& bitmap_num) +bool LLFontBitmapCache::nextOpenPos(S32 width, S32 &pos_x, S32 &pos_y, S32& bitmap_num) { if ((mBitmapNum<0) || (mCurrentOffsetX + width + 1) > mBitmapWidth) { @@ -138,7 +138,7 @@ BOOL LLFontBitmapCache::nextOpenPos(S32 width, S32 &pos_x, S32 &pos_y, S32& bitm mCurrentOffsetX += width + 1; - return TRUE; + return true; } void LLFontBitmapCache::destroyGL() diff --git a/indra/llrender/llfontbitmapcache.h b/indra/llrender/llfontbitmapcache.h index 7de3a6b56f..4bbd464cea 100644 --- a/indra/llrender/llfontbitmapcache.h +++ b/indra/llrender/llfontbitmapcache.h @@ -45,7 +45,7 @@ public: void reset(); - BOOL nextOpenPos(S32 width, S32 &posX, S32 &posY, S32 &bitmapNum); + bool nextOpenPos(S32 width, S32 &posX, S32 &posY, S32 &bitmapNum); void destroyGL(); diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index 6e928bf0a0..a4391ba8dd 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -494,7 +494,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) // Snarf all fonts we can into fontlist. First will get pulled // off the list and become the "head" font, set to non-fallback. // Rest will consitute the fallback list. - BOOL is_first_found = TRUE; + bool is_first_found = true; std::string local_path = LLFontGL::getFontPathLocal(); std::string sys_path = LLFontGL::getFontPathSystem(); @@ -522,7 +522,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) bool is_ft_collection = (std::find(ft_collection_list.begin(), ft_collection_list.end(), *file_name_it) != ft_collection_list.end()); // *HACK: Fallback fonts don't render, so we can use that to suppress // creation of OpenGL textures for test apps. JC - BOOL is_fallback = !is_first_found || !mCreateGLTextures; + bool is_fallback = !is_first_found || !mCreateGLTextures; F32 extra_scale = (is_fallback)?fallback_scale:1.0; F32 point_size_scale = extra_scale * point_size; bool is_font_loaded = false; diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 8749976921..dc299b6cbd 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -81,7 +81,7 @@ const std::string gShaderConstsVal[LLGLSLShader::NUM_SHADER_CONSTS] = }; -BOOL shouldChange(const LLVector4& v1, const LLVector4& v2) +bool shouldChange(const LLVector4& v1, const LLVector4& v2) { return v1 != v2; } @@ -381,7 +381,7 @@ void LLGLSLShader::unloadInternal() stop_glerror(); } -BOOL LLGLSLShader::createShader(std::vector* attributes, +bool LLGLSLShader::createShader(std::vector* attributes, std::vector* uniforms, U32 varying_count, const char** varyings) @@ -415,10 +415,10 @@ BOOL LLGLSLShader::createShader(std::vector* attributes, // Shouldn't happen if shader related extensions, like ARB_vertex_shader, exist. LL_SHADER_LOADING_WARNS() << "Failed to create handle for shader: " << mName << LL_ENDL; unloadInternal(); - return FALSE; + return false; } - BOOL success = TRUE; + bool success = true; mUsingBinaryProgram = LLShaderMgr::instance()->loadCachedProgramBinary(this); @@ -440,7 +440,7 @@ BOOL LLGLSLShader::createShader(std::vector* attributes, } else { - success = FALSE; + success = false; } } } @@ -449,7 +449,7 @@ BOOL LLGLSLShader::createShader(std::vector* attributes, if (!LLShaderMgr::instance()->attachShaderFeatures(this)) { unloadInternal(); - return FALSE; + return false; } // Map attributes and uniforms if (success) @@ -529,7 +529,7 @@ void dumpAttachObject(const char* func_name, GLuint program_object, const std::s } #endif // DEBUG_SHADER_INCLUDES -BOOL LLGLSLShader::attachVertexObject(std::string object_path) +bool LLGLSLShader::attachVertexObject(std::string object_path) { if (LLShaderMgr::instance()->mVertexShaderObjects.count(object_path) > 0) { @@ -539,19 +539,19 @@ BOOL LLGLSLShader::attachVertexObject(std::string object_path) dumpAttachObject("attachVertexObject", mProgramObject, object_path); #endif // DEBUG_SHADER_INCLUDES stop_glerror(); - return TRUE; + return true; } else { LL_SHADER_LOADING_WARNS() << "Attempting to attach shader object: '" << object_path << "' that hasn't been compiled." << LL_ENDL; - return FALSE; + return false; } } -BOOL LLGLSLShader::attachFragmentObject(std::string object_path) +bool LLGLSLShader::attachFragmentObject(std::string object_path) { if(mUsingBinaryProgram) - return TRUE; + return true; if (LLShaderMgr::instance()->mFragmentShaderObjects.count(object_path) > 0) { @@ -561,12 +561,12 @@ BOOL LLGLSLShader::attachFragmentObject(std::string object_path) dumpAttachObject("attachFragmentObject", mProgramObject, object_path); #endif // DEBUG_SHADER_INCLUDES stop_glerror(); - return TRUE; + return true; } else { LL_SHADER_LOADING_WARNS() << "Attempting to attach shader object: '" << object_path << "' that hasn't been compiled." << LL_ENDL; - return FALSE; + return false; } } diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index 43d095f73a..af9472e2ea 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -174,12 +174,12 @@ public: // If force_read is true, will force an immediate readback (severe performance penalty) bool readProfileQuery(bool for_runtime = false, bool force_read = false); - BOOL createShader(std::vector* attributes, + bool createShader(std::vector* attributes, std::vector* uniforms, U32 varying_count = 0, const char** varyings = NULL); - BOOL attachFragmentObject(std::string object); - BOOL attachVertexObject(std::string object); + bool attachFragmentObject(std::string object); + bool attachVertexObject(std::string object); void attachObject(GLuint object); void attachObjects(GLuint* objects = NULL, S32 count = 0); BOOL mapAttributes(const std::vector* attributes); diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index 81691afacb..178419c9c8 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -51,11 +51,11 @@ const LLColor4 UI_VERTEX_COLOR(1.f, 1.f, 1.f, 1.f); // Functions // -BOOL ui_point_in_rect(S32 x, S32 y, S32 left, S32 top, S32 right, S32 bottom) +bool ui_point_in_rect(S32 x, S32 y, S32 left, S32 top, S32 right, S32 bottom) { - if (x < left || right < x) return FALSE; - if (y < bottom || top < y) return FALSE; - return TRUE; + if (x < left || right < x) return false; + if (y < bottom || top < y) return false; + return true; } diff --git a/indra/llrender/llrender2dutils.h b/indra/llrender/llrender2dutils.h index 135738c3ba..298b357a38 100644 --- a/indra/llrender/llrender2dutils.h +++ b/indra/llrender/llrender2dutils.h @@ -43,7 +43,7 @@ class LLUUID; extern const LLColor4 UI_VERTEX_COLOR; -BOOL ui_point_in_rect(S32 x, S32 y, S32 left, S32 top, S32 right, S32 bottom); +bool ui_point_in_rect(S32 x, S32 y, S32 left, S32 top, S32 right, S32 bottom); void gl_state_for_2d(S32 width, S32 height); void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2); diff --git a/indra/llui/llflashtimer.cpp b/indra/llui/llflashtimer.cpp index 04367bdf94..033d929ecd 100644 --- a/indra/llui/llflashtimer.cpp +++ b/indra/llui/llflashtimer.cpp @@ -75,7 +75,7 @@ void LLFlashTimer::unset() mCallback = NULL; } -BOOL LLFlashTimer::tick() +bool LLFlashTimer::tick() { mIsCurrentlyHighlighted = !mIsCurrentlyHighlighted; diff --git a/indra/llui/llflashtimer.h b/indra/llui/llflashtimer.h index 422f6e0002..52a686f376 100644 --- a/indra/llui/llflashtimer.h +++ b/indra/llui/llflashtimer.h @@ -46,7 +46,7 @@ public: LLFlashTimer(callback_t cb = NULL, S32 count = 0, F32 period = 0.0); ~LLFlashTimer() {}; - /*virtual*/ BOOL tick(); + /*virtual*/ bool tick(); void startFlashing(); void stopFlashing(); diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index 6080eea330..5cef532fcf 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -166,7 +166,7 @@ public: virtual BOOL isItemWearable() const { return FALSE; } virtual BOOL isItemRenameable() const = 0; - virtual BOOL renameItem(const std::string& new_name) = 0; + virtual bool renameItem(const std::string& new_name) = 0; virtual BOOL isItemMovable( void ) const = 0; // Can be moved to another folder virtual void move( LLFolderViewModelItem* parent_listener ) = 0; diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index fe6f5bd945..1d62f736c3 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -190,7 +190,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; } @@ -610,7 +610,7 @@ LLControlVariable* LLControlGroup::declareF32(const std::string& name, const F32 return declareControl(name, TYPE_F32, initial_val, comment, SANITY_TYPE_NONE, LLSD(), std::string(""), persist); } -LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, const BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist) +LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, const bool initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return declareControl(name, TYPE_BOOLEAN, initial_val, comment, SANITY_TYPE_NONE, LLSD(), std::string(""), persist); } diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index f12c3ce94d..861a3f2e32 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -258,7 +258,7 @@ public: LLControlVariable* declareU32(const std::string& name, U32 initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT); LLControlVariable* declareS32(const std::string& name, S32 initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT); LLControlVariable* declareF32(const std::string& name, F32 initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT); - LLControlVariable* declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT); + LLControlVariable* declareBOOL(const std::string& name, bool initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT); LLControlVariable* declareString(const std::string& name, const std::string &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT); LLControlVariable* declareVec3(const std::string& name, const LLVector3 &initial_val,const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT); LLControlVariable* declareVec3d(const std::string& name, const LLVector3d &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT); diff --git a/indra/newview/NACLfloaterexploresounds.cpp b/indra/newview/NACLfloaterexploresounds.cpp index 0bee4bd126..a445d1fe06 100644 --- a/indra/newview/NACLfloaterexploresounds.cpp +++ b/indra/newview/NACLfloaterexploresounds.cpp @@ -152,7 +152,7 @@ public: } }; -BOOL NACLFloaterExploreSounds::tick() +bool NACLFloaterExploreSounds::tick() { static const std::string str_playing = getString("Playing"); static const std::string str_not_playing = getString("NotPlaying"); @@ -340,7 +340,7 @@ BOOL NACLFloaterExploreSounds::tick() childSetEnabled("stop_locally_btn", mLocalPlayingAudioSourceIDs.size() > 0); - return FALSE; + return false; } void NACLFloaterExploreSounds::handlePlayLocally() diff --git a/indra/newview/NACLfloaterexploresounds.h b/indra/newview/NACLfloaterexploresounds.h index 0f2df60c99..cd156bb338 100644 --- a/indra/newview/NACLfloaterexploresounds.h +++ b/indra/newview/NACLfloaterexploresounds.h @@ -18,9 +18,9 @@ class NACLFloaterExploreSounds { public: NACLFloaterExploreSounds(const LLSD& key); - BOOL postBuild(); + BOOL postBuild() override; - BOOL tick(); + bool tick() override; LLSoundHistoryItem getItem(const LLUUID& itemID); diff --git a/indra/newview/alfloaterregiontracker.cpp b/indra/newview/alfloaterregiontracker.cpp index 972abb9454..3270445207 100644 --- a/indra/newview/alfloaterregiontracker.cpp +++ b/indra/newview/alfloaterregiontracker.cpp @@ -192,10 +192,10 @@ void ALFloaterRegionTracker::refresh() mRegionScrollList->setScrollPos(saved_scroll_pos); } -BOOL ALFloaterRegionTracker::tick() +bool ALFloaterRegionTracker::tick() { refresh(); - return FALSE; + return false; } void ALFloaterRegionTracker::requestRegionData() diff --git a/indra/newview/alfloaterregiontracker.h b/indra/newview/alfloaterregiontracker.h index b701a10431..ab7b50a242 100644 --- a/indra/newview/alfloaterregiontracker.h +++ b/indra/newview/alfloaterregiontracker.h @@ -39,11 +39,11 @@ private: ALFloaterRegionTracker(const LLSD& key); virtual ~ALFloaterRegionTracker(); public: - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void onClose(bool app_quitting); - /*virtual*/ void refresh(); - /*virtual*/ BOOL tick(); + BOOL postBuild() override; + void onOpen(const LLSD& key) override; + void onClose(bool app_quitting) override; + void refresh() override; + bool tick() override; private: void updateHeader(); diff --git a/indra/newview/ao.cpp b/indra/newview/ao.cpp index e9029c8037..b3f0073e09 100644 --- a/indra/newview/ao.cpp +++ b/indra/newview/ao.cpp @@ -71,12 +71,12 @@ void FloaterAO::reloading(bool reload) enableStateControls(!reload); } -BOOL FloaterAO::tick() +bool FloaterAO::tick() { // reloading took too long, probably missed the signal, so we hide the reload cover LL_WARNS("AOEngine") << "AO reloading timeout." << LL_ENDL; updateList(); - return FALSE; + return false; } void FloaterAO::updateSetParameters() diff --git a/indra/newview/ao.h b/indra/newview/ao.h index 45482bab45..3e8f831ea2 100644 --- a/indra/newview/ao.h +++ b/indra/newview/ao.h @@ -103,7 +103,7 @@ class FloaterAO bool newSetCallback(const LLSD& notification, const LLSD& response); bool removeSetCallback(const LLSD& notification, const LLSD& response); - virtual BOOL tick(); + virtual bool tick(); std::vector mSetList; AOSet* mSelectedSet; diff --git a/indra/newview/aoengine.cpp b/indra/newview/aoengine.cpp index 7eaff320c5..3064d45798 100644 --- a/indra/newview/aoengine.cpp +++ b/indra/newview/aoengine.cpp @@ -2376,7 +2376,7 @@ void AOSitCancelTimer::stop() mEventTimer.stop(); } -BOOL AOSitCancelTimer::tick() +bool AOSitCancelTimer::tick() { mTickCount++; AOEngine::instance().checkSitCancel(); @@ -2384,7 +2384,7 @@ BOOL AOSitCancelTimer::tick() { mEventTimer.stop(); } - return FALSE; + return false; } // ---------------------------------------------------- @@ -2403,7 +2403,7 @@ AOTimerCollection::~AOTimerCollection() { } -BOOL AOTimerCollection::tick() +bool AOTimerCollection::tick() { if (mInventoryTimer) { @@ -2427,7 +2427,7 @@ BOOL AOTimerCollection::tick() } // always return FALSE or the LLEventTimer will be deleted -> crash - return FALSE; + return false; } void AOTimerCollection::enableInventoryTimer(bool enable) diff --git a/indra/newview/aoengine.h b/indra/newview/aoengine.h index baa01381d3..3998410c6e 100644 --- a/indra/newview/aoengine.h +++ b/indra/newview/aoengine.h @@ -41,7 +41,7 @@ class AOTimerCollection AOTimerCollection(); ~AOTimerCollection(); - virtual BOOL tick(); + virtual bool tick(); void enableInventoryTimer(bool enable); void enableSettingsTimer(bool enable); @@ -69,7 +69,7 @@ class AOSitCancelTimer void oneShot(); void stop(); - virtual BOOL tick(); + virtual bool tick(); protected: S32 mTickCount; diff --git a/indra/newview/aoset.cpp b/indra/newview/aoset.cpp index 52ab2a07de..2f7d350a8c 100644 --- a/indra/newview/aoset.cpp +++ b/indra/newview/aoset.cpp @@ -233,10 +233,10 @@ void AOSet::stopTimer() mEventTimer.stop(); } -BOOL AOSet::tick() +bool AOSet::tick() { AOEngine::instance().cycleTimeout(this); - return FALSE; + return false; } const LLUUID& AOSet::getInventoryUUID() const diff --git a/indra/newview/aoset.h b/indra/newview/aoset.h index 878b36cedd..55706ac75d 100644 --- a/indra/newview/aoset.h +++ b/indra/newview/aoset.h @@ -124,7 +124,7 @@ class AOSet void startTimer(F32 timeout); void stopTimer(); - virtual BOOL tick(); + bool tick() override; std::vector mStateNames; diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index d3780f0161..1c9ffa39e9 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -86,11 +86,11 @@ void doZdCleanup(); class JCZdrop : public LLEventTimer { public: - BOOL mRunning; + bool mRunning; JCZdrop(std::stack stack, LLUUID dest, std::string_view sFolder, std::string_view sUUID, bool package = false) : LLEventTimer(1.f), - mRunning(FALSE), + mRunning(false), mPackage(package), mStack(stack), mDestination(dest), @@ -123,7 +123,7 @@ public: } } - BOOL tick() + bool tick() { LLViewerInventoryItem* subj = mStack.top(); mStack.pop(); @@ -144,7 +144,7 @@ public: else { mErrorCode = 1; - return TRUE; + return true; } } @@ -167,10 +167,10 @@ public: ~ZdCleanup() {} - BOOL tick() + bool tick() { gZDrop = nullptr; - return TRUE; + return true; } }; @@ -192,12 +192,12 @@ void doZtCleanup(); class JCZtake : public LLEventTimer { public: - BOOL mRunning; + bool mRunning; JCZtake(const LLUUID& target, bool package = false, const LLUUID& destination = LLUUID::null, std::string_view dtarget = "", EDeRezDestination dest = DRD_TAKE_INTO_AGENT_INVENTORY, bool use_selection = true, std::vector to_take = std::vector()) : LLEventTimer(0.66f), mTarget(target), - mRunning(FALSE), + mRunning(false), mCountdown(5), mPackage(package), mPackageDest(destination), @@ -234,7 +234,7 @@ public: } } - BOOL tick() + bool tick() { switch (mState) { @@ -403,12 +403,12 @@ public: ~LOZtCleanup() {} - BOOL tick() + bool tick() { - gZTake->mRunning = TRUE; + gZTake->mRunning = true; delete gZTake; gZTake = nullptr; - return TRUE; + return true; } }; @@ -420,9 +420,12 @@ void doZtCleanup() class TMZtake : public LLEventTimer { public: - BOOL mRunning; + bool mRunning; - TMZtake(const LLUUID& target) : LLEventTimer(0.33f), mTarget(target), mRunning(FALSE), mCountdown(5) + TMZtake(const LLUUID& target) : LLEventTimer(0.33f), + mTarget(target), + mRunning(false), + mCountdown(5) { report_to_nearby_chat("Mtake activated. Taking selected in-world objects into inventory in: "); } @@ -432,7 +435,7 @@ public: report_to_nearby_chat("Mtake deactivated."); } - BOOL tick() + bool tick() { LLMessageSystem* msg = gMessageSystem; for (LLObjectSelection::iterator itr = LLSelectMgr::getInstance()->getSelection()->begin(); @@ -522,14 +525,14 @@ private: }; TMZtake* gMTake; -void invrepair() +static void invrepair() { LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; gInventory.collectDescendents(gInventory.getRootFolderID(), cats, items, FALSE); } -void key_to_name_callback(const LLUUID& id, const LLAvatarName& av_name) +static void key_to_name_callback(const LLUUID& id, const LLAvatarName& av_name) { std::string name = av_name.getCompleteName(); if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, id)) @@ -1128,7 +1131,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest } else { - gZDrop->mRunning = TRUE; + gZDrop->mRunning = true; delete gZDrop; gZDrop = nullptr; } @@ -1195,7 +1198,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest } else { - gZTake->mRunning = TRUE; + gZTake->mRunning = true; delete gZTake; gZTake = nullptr; } @@ -1518,7 +1521,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest } else { - gMTake->mRunning = TRUE; + gMTake->mRunning = true; delete gMTake; gMTake = nullptr; } diff --git a/indra/newview/fsareasearch.cpp b/indra/newview/fsareasearch.cpp index b3ecf75951..4c18caa6bf 100644 --- a/indra/newview/fsareasearch.cpp +++ b/indra/newview/fsareasearch.cpp @@ -127,7 +127,7 @@ public: { } - /*virtual*/ BOOL tick() + bool tick() override { LLViewerObject* objectp = gObjectList.findObject(mObjectID); if (objectp) @@ -135,7 +135,7 @@ public: FSPanelAreaSearchList::touchObject(objectp); } - return TRUE; + return true; } private: diff --git a/indra/newview/fsfloaterassetblacklist.cpp b/indra/newview/fsfloaterassetblacklist.cpp index 81d34a2644..297a430dba 100644 --- a/indra/newview/fsfloaterassetblacklist.cpp +++ b/indra/newview/fsfloaterassetblacklist.cpp @@ -297,11 +297,11 @@ BOOL FSFloaterAssetBlacklist::handleKeyHere(KEY key, MASK mask) return LLFloater::handleKeyHere(key, mask); } -BOOL FSFloaterAssetBlacklist::tick() +bool FSFloaterAssetBlacklist::tick() { if (mAudioSourceID.isNull()) { - return FALSE; + return false; } if (LLAudioSource* audio_source = gAudiop->findAudioSource(mAudioSourceID); !audio_source || audio_source->isDone()) @@ -313,7 +313,7 @@ BOOL FSFloaterAssetBlacklist::tick() onSelectionChanged(); } - return FALSE; + return false; } void FSFloaterAssetBlacklist::closeFloater(bool /* app_quitting */) diff --git a/indra/newview/fsfloaterassetblacklist.h b/indra/newview/fsfloaterassetblacklist.h index a767db72c9..5847947886 100644 --- a/indra/newview/fsfloaterassetblacklist.h +++ b/indra/newview/fsfloaterassetblacklist.h @@ -43,12 +43,12 @@ public: FSFloaterAssetBlacklist(const LLSD& key); virtual ~FSFloaterAssetBlacklist(); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); - /*virtual*/ bool hasAccelerators() const { return true; } - /*virtual*/ BOOL tick(); - /*virtual*/ void closeFloater(bool app_quitting = false); + void onOpen(const LLSD& key) override; + BOOL postBuild() override; + BOOL handleKeyHere(KEY key, MASK mask) override; + bool hasAccelerators() const override { return true; } + bool tick() override; + void closeFloater(bool app_quitting = false) override; void addElementToList(const LLUUID& id, const LLSD& data); void removeElements(); diff --git a/indra/newview/fsfloatercontacts.cpp b/indra/newview/fsfloatercontacts.cpp index e9fc95e531..f9b0391a14 100644 --- a/indra/newview/fsfloatercontacts.cpp +++ b/indra/newview/fsfloatercontacts.cpp @@ -191,10 +191,10 @@ void FSFloaterContacts::draw() LLFloater::draw(); } -BOOL FSFloaterContacts::tick() +bool FSFloaterContacts::tick() { onDisplayNameChanged(); - return FALSE; + return false; } BOOL FSFloaterContacts::handleKeyHere(KEY key, MASK mask) diff --git a/indra/newview/fsfloatercontacts.h b/indra/newview/fsfloatercontacts.h index 36246d7c4f..88b9fa3b6b 100644 --- a/indra/newview/fsfloatercontacts.h +++ b/indra/newview/fsfloatercontacts.h @@ -51,7 +51,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void draw(); - /*virtual*/ BOOL tick(); + /*virtual*/ bool tick(); /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); /*virtual*/ bool hasAccelerators() const { return true; } diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp index b96d8461d2..688fa19957 100644 --- a/indra/newview/fsfloaterim.cpp +++ b/indra/newview/fsfloaterim.cpp @@ -91,14 +91,14 @@ FSFloaterIMTimer::FSFloaterIMTimer(FSFloaterIMTimer::callback_t callback) : mCallback(callback) { } -BOOL FSFloaterIMTimer::tick() +bool FSFloaterIMTimer::tick() { if (!mCallback.empty()) { mCallback(); } - return FALSE; + return false; } @@ -1907,7 +1907,7 @@ bool FSFloaterIM::dropPerson(LLUUID* person_id, bool drop) } //virtual -BOOL FSFloaterIM::tick() +bool FSFloaterIM::tick() { // add people who were added via dropPerson() if (!mPendingParticipants.empty()) @@ -1918,7 +1918,7 @@ BOOL FSFloaterIM::tick() mEventTimer.stop(); - return FALSE; + return false; } // virtual diff --git a/indra/newview/fsfloaterim.h b/indra/newview/fsfloaterim.h index 8c5f88ee2e..d5241fb5d0 100644 --- a/indra/newview/fsfloaterim.h +++ b/indra/newview/fsfloaterim.h @@ -76,7 +76,7 @@ public: /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); /*virtual*/ void onSnooze(); - /*virtual*/ BOOL tick(); + /*virtual*/ bool tick(); // Make IM conversion visible and update the message history static FSFloaterIM* show(const LLUUID& session_id); @@ -291,7 +291,7 @@ public: typedef boost::function callback_t; FSFloaterIMTimer(callback_t callback); - /*virtual*/ BOOL tick(); + /*virtual*/ bool tick(); private: callback_t mCallback; diff --git a/indra/newview/fsfloaterimport.cpp b/indra/newview/fsfloaterimport.cpp index 2248d8796e..222c28cc4e 100644 --- a/indra/newview/fsfloaterimport.cpp +++ b/indra/newview/fsfloaterimport.cpp @@ -945,7 +945,7 @@ bool FSFloaterImport::processPrimCreated(LLViewerObject* object) if (prim.has("sale_info")) { LLSaleInfo sale_info; - BOOL has_perm_mask; + bool has_perm_mask; U32 perm_mask; sale_info.fromLLSD(prim["sale_info"], has_perm_mask, perm_mask); if (sale_info.isForSale()) diff --git a/indra/newview/fsfloaterstreamtitle.cpp b/indra/newview/fsfloaterstreamtitle.cpp index 84513c09bb..494c9d2103 100644 --- a/indra/newview/fsfloaterstreamtitle.cpp +++ b/indra/newview/fsfloaterstreamtitle.cpp @@ -270,7 +270,7 @@ void FSFloaterStreamTitle::checkTitleWidth() noexcept } } -BOOL FSFloaterStreamTitle::tick() +bool FSFloaterStreamTitle::tick() { if (mResetTitle) { @@ -298,5 +298,5 @@ BOOL FSFloaterStreamTitle::tick() mResetTitle = true; } - return FALSE; + return false; } diff --git a/indra/newview/fsfloaterstreamtitle.h b/indra/newview/fsfloaterstreamtitle.h index 0319710113..8c544754f1 100644 --- a/indra/newview/fsfloaterstreamtitle.h +++ b/indra/newview/fsfloaterstreamtitle.h @@ -105,7 +105,7 @@ public: void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE) override; private: - BOOL tick() override; + bool tick() override; void updateStreamTitle(std::string_view streamtitle) noexcept; void toggleHistory() noexcept; diff --git a/indra/newview/fslslbridge.cpp b/indra/newview/fslslbridge.cpp index 38ccd47d5c..180f7a1e9f 100644 --- a/indra/newview/fslslbridge.cpp +++ b/indra/newview/fslslbridge.cpp @@ -1718,21 +1718,21 @@ void FSLSLBridge::detachOtherBridges() } } -BOOL FSLSLBridgeCleanupTimer::tick() +bool FSLSLBridgeCleanupTimer::tick() { FSLSLBridge::instance().setTimerResult(FSLSLBridge::CLEANUP_FINISHED); - return TRUE; + return true; } -BOOL FSLSLBridgeReAttachTimer::tick() +bool FSLSLBridgeReAttachTimer::tick() { LL_INFOS("FSLSLBridge") << "Re-attaching bridge after creation..." << LL_ENDL; FSLSLBridge::instance().setTimerResult(FSLSLBridge::REATTACH_FINISHED); - return TRUE; + return true; } -BOOL FSLSLBridgeStartCreationTimer::tick() +bool FSLSLBridgeStartCreationTimer::tick() { FSLSLBridge::instance().setTimerResult(FSLSLBridge::START_CREATION_FINISHED); - return TRUE; + return true; } diff --git a/indra/newview/fslslbridge.h b/indra/newview/fslslbridge.h index 630c98a4be..5b7dae8854 100644 --- a/indra/newview/fslslbridge.h +++ b/indra/newview/fslslbridge.h @@ -191,20 +191,20 @@ class FSLSLBridgeCleanupTimer : public LLEventTimer { public: FSLSLBridgeCleanupTimer() : LLEventTimer(12.f) {} - BOOL tick(); + bool tick(); }; class FSLSLBridgeReAttachTimer : public LLEventTimer { public: FSLSLBridgeReAttachTimer() : LLEventTimer(5.f) {} - BOOL tick(); + bool tick(); }; class FSLSLBridgeStartCreationTimer : public LLEventTimer { public: FSLSLBridgeStartCreationTimer() : LLEventTimer(5.f) {} - BOOL tick(); + bool tick(); }; #endif // FS_LSLBRIDGE_H diff --git a/indra/newview/fsradar.cpp b/indra/newview/fsradar.cpp index 9a620ba0af..adad667210 100644 --- a/indra/newview/fsradar.cpp +++ b/indra/newview/fsradar.cpp @@ -80,10 +80,10 @@ public: mEventTimer.start(); } - /*virtual*/ BOOL tick() + /*virtual*/ bool tick() { update(); - return FALSE; + return false; } }; diff --git a/indra/newview/growlmanager.cpp b/indra/newview/growlmanager.cpp index b117a22e9f..02940fd27d 100644 --- a/indra/newview/growlmanager.cpp +++ b/indra/newview/growlmanager.cpp @@ -258,10 +258,10 @@ void GrowlManager::performNotification(const std::string& title, const std::stri } } -BOOL GrowlManager::tick() +bool GrowlManager::tick() { mTitleTimers.clear(); - return FALSE; + return false; } bool GrowlManager::onLLNotification(const LLSD& notice) diff --git a/indra/newview/growlmanager.h b/indra/newview/growlmanager.h index 6365b9a19d..2be9de1fb2 100644 --- a/indra/newview/growlmanager.h +++ b/indra/newview/growlmanager.h @@ -47,11 +47,11 @@ struct GrowlNotification bool useDefaultTextForBody; }; -const U64 GROWL_THROTTLE_TIME = 1000000u; // Maximum spam rate (in microseconds). -const F32 GROWL_THROTTLE_CLEANUP_PERIOD = 300.f; // How often we clean up the list (in seconds). -const int GROWL_MAX_BODY_LENGTH = 255; // Arbitrary. -const std::string GROWL_IM_MESSAGE_TYPE = "Instant Message received"; -const std::string GROWL_KEYWORD_ALERT_TYPE = "Keyword Alert"; +constexpr U64 GROWL_THROTTLE_TIME = 1000000u; // Maximum spam rate (in microseconds). +constexpr F32 GROWL_THROTTLE_CLEANUP_PERIOD = 300.f; // How often we clean up the list (in seconds). +constexpr int GROWL_MAX_BODY_LENGTH = 255; // Arbitrary. +constexpr char GROWL_IM_MESSAGE_TYPE[] = "Instant Message received"; +constexpr char GROWL_KEYWORD_ALERT_TYPE[] = "Keyword Alert"; class GrowlManager : public LLEventTimer { @@ -60,7 +60,7 @@ class GrowlManager : public LLEventTimer public: GrowlManager(); ~GrowlManager(); - BOOL tick(); + bool tick() override; static void initiateManager(); static void destroyManager(); diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 9269da8ae1..86da7320a5 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -122,7 +122,7 @@ using namespace LLAvatarAppearanceDefines; extern LLMenuBarGL* gMenuBarView; -const BOOL ANIMATE = TRUE; +const bool ANIMATE = true; const U8 AGENT_STATE_TYPING = 0x04; const U8 AGENT_STATE_EDITING = 0x10; @@ -409,7 +409,7 @@ bool LLAgent::isMicrophoneOn(const LLSD& sdname) //----------------------------------------------------------------------------- LLAgent::LLAgent() : mGroupPowers(0), - mHideGroupTitle(FALSE), + mHideGroupTitle(false), mGroupID(), mInitialized(false), @@ -456,10 +456,10 @@ LLAgent::LLAgent() : mRenderState(0), mTypingTimer(), - mViewsPushed(FALSE), + mViewsPushed(false), - mCustomAnim(FALSE), - mShowAvatar(TRUE), + mCustomAnim(false), + mShowAvatar(true), mFrameAgent(), mIsDoNotDisturb(false), @@ -476,15 +476,15 @@ LLAgent::LLAgent() : // mControlFlags(0x00000000), - mbFlagsDirty(FALSE), - mbFlagsNeedReset(FALSE), + mbFlagsDirty(false), + mbFlagsNeedReset(false), - mAutoPilot(FALSE), - mAutoPilotFlyOnStop(FALSE), - mAutoPilotAllowFlying(TRUE), + mAutoPilot(false), + mAutoPilotFlyOnStop(false), + mAutoPilotAllowFlying(true), mAutoPilotTargetGlobal(), mAutoPilotStopDistance(1.f), - mAutoPilotUseRotation(FALSE), + mAutoPilotUseRotation(false), mAutoPilotTargetFacing(LLVector3::zero), mAutoPilotTargetDist(0.f), mAutoPilotNoProgressFrameCount(0), @@ -492,18 +492,18 @@ LLAgent::LLAgent() : mAutoPilotFinishedCallback(NULL), mAutoPilotCallbackData(NULL), - mMovementKeysLocked(FALSE), + mMovementKeysLocked(false), mEffectColor(new LLUIColor(LLColor4(0.f, 1.f, 1.f, 1.f))), - mHaveHomePosition(FALSE), + mHaveHomePosition(false), mHomeRegionHandle( 0 ), mNearChatRadius(CHAT_NORMAL_RADIUS / 2.f), mNextFidgetTime(0.f), mCurrentFidget(0), mFirstLogin(false), - mOutfitChosen(FALSE), + mOutfitChosen(false), mVoiceConnected(false), @@ -558,7 +558,7 @@ void LLAgent::init() { mMoveTimer.start(); - gSavedSettings.declareBOOL("SlowMotionAnimation", FALSE, "Declared in code", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("SlowMotionAnimation", false, "Declared in code", LLControlVariable::PERSIST_NO); gSavedSettings.getControl("SlowMotionAnimation")->getSignal()->connect(boost::bind(&handleSlowMotionAnimation, _2)); // *Note: this is where LLViewerCamera::getInstance() used to be constructed. @@ -966,32 +966,32 @@ void LLAgent::movePitch(F32 mag) // Does this parcel allow you to fly? -BOOL LLAgent::canFly() +bool LLAgent::canFly() { // [RLVa:KB] - Checked: RLVa-1.0 if (!RlvActions::canFly()) { - return FALSE; + return false; } // [/RLVa:KB] - if (isGodlike()) return TRUE; + if (isGodlike()) return true; // Always fly if (mAlwaysFly) { - return TRUE; + return true; } // LLViewerRegion* regionp = getRegion(); - if (regionp && regionp->getBlockFly()) return FALSE; + if (regionp && regionp->getBlockFly()) return false; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - if (!parcel) return FALSE; + if (!parcel) return false; // Allow owners to fly on their own land. if (LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_ALLOW_FLY)) { - return TRUE; + return true; } return parcel->getAllowFly(); @@ -1101,7 +1101,7 @@ void LLAgent::toggleFlying() bool LLAgent::enableFlying() { // Fix "Agent.enableFlying" function for menu entry and toolbar button - // BOOL sitting = FALSE; + // bool sitting = false; // if (isAgentAvatarValid()) // { // sitting = gAgentAvatarp->isSitting(); @@ -1118,7 +1118,7 @@ bool LLAgent::enableFlying() // static bool LLAgent::isSitting() { - BOOL sitting = FALSE; + bool sitting = false; if (isAgentAvatarValid()) { sitting = gAgentAvatarp->isSitting(); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 120506d3b5..bdeeac2448 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -46,7 +46,7 @@ #include #include -extern const BOOL ANIMATE; +extern const bool ANIMATE; extern const U8 AGENT_STATE_TYPING; // Typing indication extern const U8 AGENT_STATE_EDITING; // Set when agent has objects selected @@ -378,7 +378,7 @@ public: void setFlying(BOOL fly, BOOL fail_sound = FALSE); static void toggleFlying(); static bool enableFlying(); - BOOL canFly(); // Does this parcel allow you to fly? + bool canFly(); // Does this parcel allow you to fly? static bool isSitting(); //-------------------------------------------------------------------- diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index f96e0dc9a6..73b6e9b30b 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -94,7 +94,7 @@ void set_default_permissions(LLViewerInventoryItem* item) item->setPermissions(perm); - item->updateServer(FALSE); + item->updateServer(false); } } @@ -350,7 +350,7 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const LLWearableType::ETy item->setAssetUUID(wearable->getAssetID()); item->setTransactionID(wearable->getTransactionID()); gInventory.addChangedMask(LLInventoryObserver::INTERNAL, item_id); - item->updateServer(FALSE); + item->updateServer(false); } gInventory.notifyObservers(); } diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index d5027b17ea..84d61121c5 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -1746,7 +1746,7 @@ void AISUpdate::doUpdate() LLPointer new_item = lost_it->second; new_item->setParent(lost_uuid); - new_item->updateParentOnServer(FALSE); + new_item->updateParentOnServer(false); } } } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index fe8f680440..bd32cf6cfc 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -134,13 +134,13 @@ public: } /*virtual*/ - BOOL tick() + bool tick() { if(mEventTimer.hasExpired()) { LLAppearanceMgr::instance().setOutfitLocked(false); } - return FALSE; + return false; } void stop() { mEventTimer.stop(); } void start() { mEventTimer.start(); } @@ -342,7 +342,7 @@ public: // virtual // Will be deleted after returning true - only safe to do this if all callbacks have fired. - BOOL tick() + bool tick() { // mPendingRequests will be zero if all requests have been // responded to. mWaitTimes.empty() will be true if we have @@ -1381,7 +1381,7 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable) wearable_item->setAssetUUID(new_wearable->getAssetID()); wearable_item->setTransactionID(new_wearable->getTransactionID()); gInventory.updateItem(wearable_item, LLInventoryObserver::INTERNAL); - wearable_item->updateServer(FALSE); + wearable_item->updateServer(false); use_count++; } @@ -4795,12 +4795,12 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b // FIXME switch to use AISv3 where supported. //items need to be updated on a dataserver - item->setComplete(TRUE); - item->updateServer(FALSE); + item->setComplete(true); + item->updateServer(false); gInventory.updateItem(item); - swap_item->setComplete(TRUE); - swap_item->updateServer(FALSE); + swap_item->setComplete(true); + swap_item->updateServer(false); gInventory.updateItem(swap_item); //to cause appearance of the agent to be updated diff --git a/indra/newview/llbreastmotion.h b/indra/newview/llbreastmotion.h index aa0fdf9f8b..433fece29f 100644 --- a/indra/newview/llbreastmotion.h +++ b/indra/newview/llbreastmotion.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/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/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index d95f1179e5..a3c24bffe3 100644 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -97,12 +97,12 @@ BOOL LLConversationLogList::handleRightMouseDown(S32 x, S32 y, MASK mask) BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask); LLToggleableMenu* context_menu = mContextMenu.get(); - { - context_menu->buildDrawLabels(); - if (context_menu && size()) - context_menu->updateParent(LLMenuGL::sMenuContainer); - LLMenuGL::showPopup(this, context_menu, x, y); - } + if (context_menu && size()) + { + context_menu->buildDrawLabels(); + context_menu->updateParent(LLMenuGL::sMenuContainer); + LLMenuGL::showPopup(this, context_menu, x, y); + } return handled; } diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 4d93f6b7ef..43f20fa6a6 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -83,7 +83,7 @@ public: virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } virtual BOOL isItemRenameable() const { return TRUE; } - virtual BOOL renameItem(const std::string& new_name) { mName = new_name; mNeedsRefresh = true; return TRUE; } + virtual bool renameItem(const std::string& new_name) { mName = new_name; mNeedsRefresh = true; return true; } virtual BOOL isItemMovable( void ) const { return FALSE; } virtual BOOL isItemRemovable( void ) const { return FALSE; } virtual BOOL isItemInTrash( void) const { return FALSE; } diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp index 256f5a6053..a43f6a4c51 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.cpp +++ b/indra/newview/lldonotdisturbnotificationstorage.cpp @@ -55,7 +55,7 @@ LLDoNotDisturbNotificationStorageTimer::~LLDoNotDisturbNotificationStorageTimer( } -BOOL LLDoNotDisturbNotificationStorageTimer::tick() +bool LLDoNotDisturbNotificationStorageTimer::tick() { LLDoNotDisturbNotificationStorage * doNotDisturbNotificationStorage = LLDoNotDisturbNotificationStorage::getInstance(); @@ -64,7 +64,7 @@ BOOL LLDoNotDisturbNotificationStorageTimer::tick() { doNotDisturbNotificationStorage->saveNotifications(); } - return FALSE; + return false; } LLDoNotDisturbNotificationStorage::LLDoNotDisturbNotificationStorage() diff --git a/indra/newview/lldonotdisturbnotificationstorage.h b/indra/newview/lldonotdisturbnotificationstorage.h index 237d58b4de..6e1bf6076c 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.h +++ b/indra/newview/lldonotdisturbnotificationstorage.h @@ -42,7 +42,7 @@ public: ~LLDoNotDisturbNotificationStorageTimer(); public: - BOOL tick(); + bool tick(); }; class LLDoNotDisturbNotificationStorage : public LLParamSingleton, public LLNotificationStorage diff --git a/indra/newview/llemote.h b/indra/newview/llemote.h index 4c516998dc..9ea6be6b1e 100644 --- a/indra/newview/llemote.h +++ b/indra/newview/llemote.h @@ -69,7 +69,7 @@ public: //------------------------------------------------------------------------- // motions must specify whether or not they loop - virtual BOOL getLoop() { return FALSE; } + virtual bool getLoop() { return false; } // motions must report their total duration virtual F32 getDuration() { return EMOTE_MORPH_FADEIN_TIME + EMOTE_MORPH_IN_TIME + EMOTE_MORPH_FADEOUT_TIME; } @@ -106,7 +106,7 @@ public: // called when a motion is deactivated virtual void onDeactivate(); - virtual BOOL canDeprecate() { return FALSE; } + virtual bool canDeprecate() { return false; } protected: diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index d9a492dc89..e7a6fb8d49 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -151,7 +151,7 @@ public: return mIsFailed; } - /*virtual */ BOOL tick() + /*virtual */ bool tick() { mRetries++; if (mRetries <= MAX_LANDMARK_REQUEST_RETRIES) @@ -164,7 +164,7 @@ public: mEventTimer.stop(); } - return FALSE; + return false; } // @@ -482,8 +482,8 @@ public: { LLFavoritesOrderStorage::instance().setSortIndex(item, mSortField); - item->setComplete(TRUE); - item->updateServer(FALSE); + item->setComplete(true); + item->updateServer(false); gInventory.updateItem(item); gInventory.notifyObservers(); @@ -809,8 +809,8 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con { LLFavoritesOrderStorage::instance().setSortIndex(currItem, ++sortField); - currItem->setComplete(TRUE); - currItem->updateServer(FALSE); + currItem->setComplete(true); + currItem->updateServer(false); gInventory.updateItem(currItem); } @@ -1648,7 +1648,7 @@ bool LLFavoritesBarCtrl::onRenameCommit(const LLSD& notification, const LLSD& re { LLPointer new_item = new LLViewerInventoryItem(item); new_item->rename(landmark_name); - new_item->updateServer(FALSE); + new_item->updateServer(false); gInventory.updateItem(new_item); } } @@ -2232,8 +2232,8 @@ void LLFavoritesOrderStorage::saveItemsOrder( const LLInventoryModel::item_array setSortIndex(item, ++sortField); - item->setComplete(TRUE); - item->updateServer(FALSE); + item->setComplete(true); + item->updateServer(false); gInventory.updateItem(item); diff --git a/indra/newview/llfloatercreatelandmark.cpp b/indra/newview/llfloatercreatelandmark.cpp index 6a21486f7f..fd2b6a2787 100644 --- a/indra/newview/llfloatercreatelandmark.cpp +++ b/indra/newview/llfloatercreatelandmark.cpp @@ -353,7 +353,7 @@ void LLFloaterCreateLandmark::onSaveClicked() gInventory.accountForUpdate(update); new_item->setParent(folder_id); - new_item->updateParentOnServer(FALSE); + new_item->updateParentOnServer(false); } removeObserver(); diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 0377912208..b13b413e6e 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -85,7 +85,7 @@ public: perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Gestures")); perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Gestures")); item->setPermissions(perm); - item->updateServer(FALSE); + item->updateServer(false); } } }; @@ -719,7 +719,7 @@ void LLFloaterGesture::onDeleteSelected() new_item->setParent(trash_id); // no need to restamp it though it's a move into trash because // it's a brand new item already. - new_item->updateParentOnServer(FALSE); + new_item->updateParentOnServer(false); gInventory.updateItem(new_item); } } diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp index c0243ece37..d35dd72207 100644 --- a/indra/newview/llfloaterlinkreplace.cpp +++ b/indra/newview/llfloaterlinkreplace.cpp @@ -356,7 +356,7 @@ void LLFloaterLinkReplace::decreaseOpenItemCount() } } -BOOL LLFloaterLinkReplace::tick() +bool LLFloaterLinkReplace::tick() { LL_DEBUGS() << "Calling tick - remaining items = " << mRemainingInventoryItems.size() << LL_ENDL; @@ -375,7 +375,7 @@ BOOL LLFloaterLinkReplace::tick() } processBatch(current_batch); - return FALSE; + return false; } void LLFloaterLinkReplace::processBatch(LLInventoryModel::item_array_t items) diff --git a/indra/newview/llfloaterlinkreplace.h b/indra/newview/llfloaterlinkreplace.h index 6a5bbd0b8c..007a7ab648 100644 --- a/indra/newview/llfloaterlinkreplace.h +++ b/indra/newview/llfloaterlinkreplace.h @@ -90,7 +90,7 @@ public: BOOL postBuild(); virtual void onOpen(const LLSD& key); - virtual BOOL tick(); + virtual bool tick(); private: void checkEnableStart(); diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp index 21d106c8b1..ba1ca868bc 100644 --- a/indra/newview/llfloatermyenvironment.cpp +++ b/indra/newview/llfloatermyenvironment.cpp @@ -247,7 +247,7 @@ void LLFloaterMyEnvironment::onDeleteSelected() LLPointer new_item = new LLViewerInventoryItem(inv_item); new_item->setParent(trash_id); - new_item->updateParentOnServer(FALSE); + new_item->updateParentOnServer(false); gInventory.updateItem(new_item); } } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 28b680e15a..dad85424c0 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1847,7 +1847,7 @@ public: FSResetVoiceTimer() : LLEventTimer(5.f) { } ~FSResetVoiceTimer() { } - BOOL tick() + bool tick() { gSavedSettings.setBOOL("EnableVoiceChat", TRUE); LLFloaterPreference* floater = LLFloaterReg::findTypedInstance("preferences"); @@ -1856,7 +1856,7 @@ public: floater->childSetEnabled("enable_voice_check", true); floater->childSetEnabled("enable_voice_check_volume", true); } - return TRUE; + return true; } }; @@ -3269,12 +3269,12 @@ void LLFloaterPreference::updateAnimatedScriptDialogs() //protected: -// BOOL tick() +// bool tick() // { // mCallback(mNewValue); // mEventTimer.stop(); -// return FALSE; +// return false; // } //private: diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp index 7c3cf904d3..1631b260bf 100644 --- a/indra/newview/llfloaterregionrestarting.cpp +++ b/indra/newview/llfloaterregionrestarting.cpp @@ -93,11 +93,11 @@ void LLFloaterRegionRestarting::regionChange() close(); } -BOOL LLFloaterRegionRestarting::tick() +bool LLFloaterRegionRestarting::tick() { refresh(); - return FALSE; + return false; } void LLFloaterRegionRestarting::refresh() diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h index 4f05744a66..0a16cdc4c2 100644 --- a/indra/newview/llfloaterregionrestarting.h +++ b/indra/newview/llfloaterregionrestarting.h @@ -43,7 +43,7 @@ private: LLFloaterRegionRestarting(const LLSD& key); virtual ~LLFloaterRegionRestarting(); virtual BOOL postBuild(); - virtual BOOL tick(); + virtual bool tick(); virtual void refresh(); virtual void draw(); virtual void regionChange(); diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 6fe4bd4d3c..85439e146f 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -246,7 +246,7 @@ public: virtual ~LLGUIPreviewLiveFile(); LLFloaterUIPreview* mParent; LLFadeEventTimer* mFadeTimer; // timer for fade-to-yellow-and-back effect to warn that file has been reloaded - BOOL mFirstFade; // setting this avoids showing the fade reload warning on first load + bool mFirstFade; // setting this avoids showing the fade reload warning on first load std::string mFileName; protected: bool loadFile(); @@ -257,10 +257,10 @@ class LLFadeEventTimer : public LLEventTimer { public: LLFadeEventTimer(F32 refresh, LLGUIPreviewLiveFile* parent); - BOOL tick(); + bool tick(); LLGUIPreviewLiveFile* mParent; private: - BOOL mFadingOut; // fades in then out; this is toggled in between + bool mFadingOut; // fades in then out; this is toggled in between LLColor4 mOriginalColor; // original color; color is reset to this after fade is coimplete }; @@ -320,7 +320,7 @@ LLLocalizationResetForcer::~LLLocalizationResetForcer() LLGUIPreviewLiveFile::LLGUIPreviewLiveFile(std::string path, std::string name, LLFloaterUIPreview* parent) : mFileName(name), mParent(parent), - mFirstFade(TRUE), + mFirstFade(true), mFadeTimer(NULL), LLLiveFile(path, 1.0) {} @@ -341,7 +341,7 @@ bool LLGUIPreviewLiveFile::loadFile() mParent->displayFloater(FALSE,1); // redisplay the floater if(mFirstFade) // only fade if it wasn't just clicked on; can't use "clicked" BOOL below because of an oddity with setting LLLiveFile initial state { - mFirstFade = FALSE; + mFirstFade = false; } else { @@ -357,24 +357,24 @@ bool LLGUIPreviewLiveFile::loadFile() // Initialize fade event timer LLFadeEventTimer::LLFadeEventTimer(F32 refresh, LLGUIPreviewLiveFile* parent) : mParent(parent), - mFadingOut(TRUE), + mFadingOut(true), LLEventTimer(refresh) { mOriginalColor = mParent->mParent->mDisplayedFloater->getBackgroundColor(); } // Single tick of fade event timer: increment the color -BOOL LLFadeEventTimer::tick() +bool LLFadeEventTimer::tick() { float diff = 0.04f; - if(TRUE == mFadingOut) // set fade for in/out color direction + if(true == mFadingOut) // set fade for in/out color direction { diff = -diff; } if(NULL == mParent) // no more need to tick, so suicide { - return TRUE; + return true; } // Set up colors @@ -394,10 +394,10 @@ BOOL LLFadeEventTimer::tick() if(bg_color[2] <= 0.0f) // end of fade out, start fading in { - mFadingOut = FALSE; + mFadingOut = false; } - return FALSE; + return false; } // Constructor diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d90bf4f71c..9ebf0b5a42 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -120,16 +120,16 @@ const LLUUID LLOutgoingCallDialog::OCD_KEY = LLUUID("7CF78E11-0CFE-498D-ADB9-141 LLIMMgr* gIMMgr = NULL; -BOOL LLSessionTimeoutTimer::tick() +bool LLSessionTimeoutTimer::tick() { - if (mSessionId.isNull()) return TRUE; + if (mSessionId.isNull()) return true; LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId); if (session && !session->mSessionInitialized) { gIMMgr->showSessionStartError("session_initialization_timed_out_error", mSessionId); } - return TRUE; + return true; } diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 3c9ec41f16..8678bff56c 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -51,7 +51,7 @@ class LLSessionTimeoutTimer : public LLEventTimer public: LLSessionTimeoutTimer(const LLUUID& session_id, F32 period) : LLEventTimer(period), mSessionId(session_id) {} virtual ~LLSessionTimeoutTimer() {}; - /* virtual */ BOOL tick(); + /* virtual */ bool tick(); private: LLUUID mSessionId; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 5e301d50c5..6b1d13187f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2324,14 +2324,14 @@ BOOL LLItemBridge::isItemRenameable() const return FALSE; } -BOOL LLItemBridge::renameItem(const std::string& new_name) +bool LLItemBridge::renameItem(const std::string& new_name) { if(!isItemRenameable()) - return FALSE; + return false; LLPreview::dirty(mUUID); LLInventoryModel* model = getInventoryModel(); if(!model) - return FALSE; + return false; LLViewerInventoryItem* item = getItem(); if(item && (item->getName() != new_name)) { @@ -2339,9 +2339,9 @@ BOOL LLItemBridge::renameItem(const std::string& new_name) updates["name"] = new_name; update_inventory_item(item->getUUID(),updates, NULL); } - // return FALSE because we either notified observers (& therefore + // return false because we either notified observers (& therefore // rebuilt) or we didn't update. - return FALSE; + return false; } BOOL LLItemBridge::removeItem() @@ -4146,7 +4146,7 @@ LLUIImagePtr LLFolderBridge::getIconOverlay() const return NULL; } -BOOL LLFolderBridge::renameItem(const std::string& new_name) +bool LLFolderBridge::renameItem(const std::string& new_name) { LLScrollOnRenameObserver *observer = new LLScrollOnRenameObserver(mUUID, mRoot); @@ -4154,9 +4154,9 @@ BOOL LLFolderBridge::renameItem(const std::string& new_name) rename_category(getInventoryModel(), mUUID, new_name); - // return FALSE because we either notified observers (& therefore + // return false because we either notified observers (& therefore // rebuilt) or we didn't update. - return FALSE; + return false; } BOOL LLFolderBridge::removeItem() @@ -7710,20 +7710,20 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } -BOOL LLObjectBridge::renameItem(const std::string& new_name) +bool LLObjectBridge::renameItem(const std::string& new_name) { if(!isItemRenameable()) - return FALSE; + return false; LLPreview::dirty(mUUID); LLInventoryModel* model = getInventoryModel(); if(!model) - return FALSE; + return false; LLViewerInventoryItem* item = getItem(); if(item && (item->getName() != new_name)) { LLPointer new_item = new LLViewerInventoryItem(item); new_item->rename(new_name); - new_item->updateServer(FALSE); + new_item->updateServer(false); model->updateItem(new_item); model->notifyObservers(); buildDisplayName(); @@ -7742,7 +7742,7 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name) } // return FALSE because we either notified observers (& therefore // rebuilt) or we didn't update. - return FALSE; + return false; } // +=================================================+ @@ -7776,7 +7776,7 @@ LLWearableBridge::LLWearableBridge(LLInventoryPanel* inventory, mInvType = inv_type; } -BOOL LLWearableBridge::renameItem(const std::string& new_name) +bool LLWearableBridge::renameItem(const std::string& new_name) { if (get_is_item_worn(mUUID)) { @@ -8263,7 +8263,7 @@ void LLSettingsBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } -BOOL LLSettingsBridge::renameItem(const std::string& new_name) +bool LLSettingsBridge::renameItem(const std::string& new_name) { /*TODO: change internal settings name? */ return LLItemBridge::renameItem(new_name); diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index fac9906cb3..ccc41dac91 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -114,7 +114,7 @@ public: virtual void showProperties(); virtual BOOL isItemRenameable() const { return TRUE; } virtual BOOL isMultiPreviewAllowed() { return TRUE; } - //virtual BOOL renameItem(const std::string& new_name) {} + //virtual bool renameItem(const std::string& new_name) {} virtual BOOL isItemRemovable() const; virtual BOOL isItemMovable() const; virtual BOOL isItemInTrash() const; @@ -262,7 +262,7 @@ public: virtual PermissionMask getPermissionMask() const; virtual time_t getCreationDate() const; virtual BOOL isItemRenameable() const; - virtual BOOL renameItem(const std::string& new_name); + virtual bool renameItem(const std::string& new_name); virtual BOOL removeItem(); virtual bool isItemCopyable(bool can_copy_as_link = true) const; // [SL:KB] - Patch: Inventory-Links | Checked: 2013-09-19 (Catznip-3.6) @@ -323,7 +323,7 @@ public: void setShowDescendantsCount(bool show_count) {mShowDescendantsCount = show_count;} - virtual BOOL renameItem(const std::string& new_name); + virtual bool renameItem(const std::string& new_name); virtual BOOL removeItem(); BOOL removeSystemFolder(); @@ -549,7 +549,7 @@ public: virtual BOOL isItemWearable() const { return TRUE; } virtual std::string getLabelSuffix() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual BOOL renameItem(const std::string& new_name); + virtual bool renameItem(const std::string& new_name); LLInventoryObject* getObject() const; protected: static LLUUID sContextMenuItemID; // Only valid while the context menu is open. @@ -582,7 +582,7 @@ public: virtual BOOL isItemWearable() const { return TRUE; } virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual std::string getLabelSuffix() const; - virtual BOOL renameItem(const std::string& new_name); + virtual bool renameItem(const std::string& new_name); virtual LLWearableType::EType getWearableType() const { return mWearableType; } static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu @@ -659,7 +659,7 @@ public: virtual void openItem(); virtual BOOL isMultiPreviewAllowed() { return FALSE; } virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual BOOL renameItem(const std::string& new_name); + virtual bool renameItem(const std::string& new_name); virtual BOOL isItemRenameable() const; virtual LLSettingsType::type_e getSettingsType() const { return mSettingsType; } diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 8bd64a6406..7372fdc5ff 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2197,7 +2197,7 @@ void change_item_parent(const LLUUID& item_id, const LLUUID& new_parent_id) LLPointer new_item = new LLViewerInventoryItem(inv_item); new_item->setParent(new_parent_id); - new_item->updateParentOnServer(FALSE); + new_item->updateParentOnServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index b6d29d0a74..e26c1c1cea 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1620,7 +1620,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) { // Parent id at server is null, so update server even if item already is in the same folder old_item->setParent(new_parent_id); - new_item->updateParentOnServer(FALSE); + new_item->updateParentOnServer(false); } mask |= LLInventoryObserver::INTERNAL; } @@ -1641,7 +1641,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) gInventory.accountForUpdate(update); // *FIX: bit of a hack to call update server from here... - new_item->updateParentOnServer(FALSE); + new_item->updateParentOnServer(false); item_array->push_back(new_item); } else @@ -1686,7 +1686,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) gInventory.accountForUpdate(update); // *FIX: bit of a hack to call update server from // here... - new_item->updateParentOnServer(FALSE); + new_item->updateParentOnServer(false); item_array->push_back(new_item); } else @@ -3281,10 +3281,10 @@ void LLInventoryModel::buildParentChildMap() // FIXME note that updateServer() fails with protected // types, so this will not work as intended in that case. // UpdateServer uses AIS, AIS cat move is not implemented yet - // cat->updateServer(TRUE); + // cat->updateServer(true); // MoveInventoryFolder message, intentionally per item - cat->updateParentOnServer(FALSE); + cat->updateParentOnServer(false); catsp = getUnlockedCatArray(cat->getParentUUID()); if(catsp) { diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 382fdfc41d..264bab74b4 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -1506,7 +1506,7 @@ void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * res gInventory.accountForUpdate(update); titem->setParent(lost_uuid); - titem->updateParentOnServer(FALSE); + titem->updateParentOnServer(false); gInventory.updateItem(titem); // FIRE-21376: Inventory not loading properly on OpenSim if (!LLGridManager::getInstance()->isInSecondLife()) diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index d1938d62f6..816615adca 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -1018,10 +1018,10 @@ bool LLLocalBitmapTimer::isRunning() return mEventTimer.getStarted(); } -BOOL LLLocalBitmapTimer::tick() +bool LLLocalBitmapTimer::tick() { LLLocalBitmapMgr::getInstance()->doUpdates(); - return FALSE; + return false; } /*=======================================*/ diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h index 1fdf9dccbf..da854d672d 100644 --- a/indra/newview/lllocalbitmaps.h +++ b/indra/newview/lllocalbitmaps.h @@ -121,7 +121,7 @@ class LLLocalBitmapTimer : public LLEventTimer void startTimer(); void stopTimer(); bool isRunning(); - BOOL tick(); + bool tick(); }; diff --git a/indra/newview/lllocalgltfmaterials.cpp b/indra/newview/lllocalgltfmaterials.cpp index 61e0163798..cf0742299c 100644 --- a/indra/newview/lllocalgltfmaterials.cpp +++ b/indra/newview/lllocalgltfmaterials.cpp @@ -301,11 +301,11 @@ bool LLLocalGLTFMaterialTimer::isRunning() return mEventTimer.getStarted(); } -BOOL LLLocalGLTFMaterialTimer::tick() +bool LLLocalGLTFMaterialTimer::tick() { // todo: do on idle? No point in timer LLLocalGLTFMaterialMgr::getInstance()->doUpdates(); - return FALSE; + return false; } /*=======================================*/ diff --git a/indra/newview/lllocalgltfmaterials.h b/indra/newview/lllocalgltfmaterials.h index 13b7577e96..46776430ff 100644 --- a/indra/newview/lllocalgltfmaterials.h +++ b/indra/newview/lllocalgltfmaterials.h @@ -90,7 +90,7 @@ public: void startTimer(); void stopTimer(); bool isRunning(); - BOOL tick(); + bool tick(); }; class LLLocalGLTFMaterialMgr : public LLSingleton diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index b09039636f..ce90acc4c6 100644 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -418,9 +418,9 @@ LLMediaDataClient::QueueTimer::QueueTimer(F32 time, LLMediaDataClient *mdc) } // virtual -BOOL LLMediaDataClient::QueueTimer::tick() +bool LLMediaDataClient::QueueTimer::tick() { - BOOL result = TRUE; + BOOL result = true; if (!mMDC.isNull()) { @@ -451,7 +451,7 @@ LLMediaDataClient::RetryTimer::RetryTimer(F32 time, Request::ptr_t request) } // virtual -BOOL LLMediaDataClient::RetryTimer::tick() +bool LLMediaDataClient::RetryTimer::tick() { mRequest->stopTracking(); @@ -469,7 +469,7 @@ BOOL LLMediaDataClient::RetryTimer::tick() mRequest.reset(); // Don't fire again - return TRUE; + return true; } diff --git a/indra/newview/llmediadataclient.h b/indra/newview/llmediadataclient.h index 58f8bad3e4..cd45825c77 100644 --- a/indra/newview/llmediadataclient.h +++ b/indra/newview/llmediadataclient.h @@ -219,7 +219,7 @@ protected: { public: RetryTimer(F32 time, Request::ptr_t); - virtual BOOL tick(); + virtual bool tick(); private: // back-pointer Request::ptr_t mRequest; @@ -286,7 +286,7 @@ private: { public: QueueTimer(F32 time, LLMediaDataClient *mdc); - virtual BOOL tick(); + virtual bool tick(); private: // back-pointer LLPointer mMDC; diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index cc3c51dd83..cea078bc23 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -545,7 +545,7 @@ void LLPanelLandmarkInfo::collectLandmarkFolders(LLInventoryModel::cat_array_t& gInventory.accountForUpdate(update); mItem->setParent(mNewParentId); - mItem->updateParentOnServer(FALSE); + mItem->updateParentOnServer(false); gInventory.updateItem(mItem); gInventory.notifyObservers(); diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 952de95a35..6efd3e84af 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -29,7 +29,9 @@ #include "llpanelnearbymedia.h" // #include "llaudioengine.h" // ## Zi: Media/Stream separation +#include "llbase64.h" #include "llcheckboxctrl.h" +#include "llclipboard.h" #include "llcombobox.h" #include "llresizebar.h" #include "llresizehandle.h" @@ -53,7 +55,9 @@ #include "llvovolume.h" #include "llstatusbar.h" #include "llsdutil.h" +#include "lltoggleablemenu.h" #include "llvieweraudio.h" +#include "llviewermenu.h" #include "llfloaterreg.h" #include "llfloaterpreference.h" // for the gear icon @@ -74,10 +78,10 @@ static const LLUUID PARCEL_MEDIA_LIST_ITEM_UUID = LLUUID("CAB5920F-E484-4233-862 LLPanelNearByMedia::LLPanelNearByMedia() : mMediaList(NULL), mEnableAllCtrl(NULL), - mAllMediaDisabled(false), mDebugInfoVisible(false), - mParcelMediaItem(NULL) -// mParcelAudioItem(NULL) // ## Zi: Media/Stream separation + mParcelMediaItem(NULL), + //mParcelAudioItem(NULL), // Media/Stream separation + mMoreLessBtn(NULL) { // This is just an initial value, mParcelAudioAutoStart does not affect ParcelMediaAutoPlayEnable /* ## Zi: Media/Stream separation @@ -100,7 +104,19 @@ LLPanelNearByMedia::LLPanelNearByMedia() mCommitCallbackRegistrar.add("SelectedMediaCtrl.Volume", boost::bind(&LLPanelNearByMedia::onCommitSelectedMediaVolume, this)); mCommitCallbackRegistrar.add("SelectedMediaCtrl.Zoom", boost::bind(&LLPanelNearByMedia::onClickSelectedMediaZoom, this)); mCommitCallbackRegistrar.add("SelectedMediaCtrl.Unzoom", boost::bind(&LLPanelNearByMedia::onClickSelectedMediaUnzoom, this)); - + + // Context menu handler. + mCommitCallbackRegistrar.add("SelectedMediaCtrl.Action", + [this](LLUICtrl* ctrl, const LLSD& data) + { + onMenuAction(data); + }); + mEnableCallbackRegistrar.add("SelectedMediaCtrl.Visible", + [this](LLUICtrl* ctrl, const LLSD& data) + { + return onMenuVisible(data); + }); + buildFromFile( "panel_nearby_media.xml"); } @@ -151,7 +167,8 @@ BOOL LLPanelNearByMedia::postBuild() mUnzoomCtrl = getChild("unzoom"); mVolumeSlider = getChild("volume_slider"); mMuteBtn = getChild("mute_btn"); - + mMoreLessBtn = getChild("more_btn"); + mEmptyNameString = getString("empty_item_text"); mParcelMediaName = getString("parcel_media_name"); // mParcelAudioName = getString("parcel_audio_name"); // ## Zi: Media/Stream separation @@ -170,8 +187,13 @@ BOOL LLPanelNearByMedia::postBuild() mLessRect = getRect(); mLessRect.mBottom = minimized_controls->getRect().mBottom; - getChild("more_btn")->setVisible(false); + mMoreLessBtn->setVisible(false); onMoreLess(); + + mContextMenu = LLUICtrlFactory::getInstance()->createFromFile( + "menu_nearby_media.xml", + gMenuHolder, + LLViewerMenuHolderGL::child_registry_t::instance()); return TRUE; } @@ -200,8 +222,7 @@ void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent) { LLPanelPulldown::reshape(width, height, called_from_parent); - LLButton* more_btn = findChild("more_btn"); - if (more_btn && more_btn->getValue().asBoolean()) + if (mMoreLessBtn && mMoreLessBtn->getValue().asBoolean()) { mMoreRect = getRect(); } @@ -241,6 +262,36 @@ BOOL LLPanelNearByMedia::handleHover(S32 x, S32 y, MASK mask) return true; } +BOOL LLPanelNearByMedia::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + S32 x_list, y_list; + localPointToOtherView(x, y, &x_list, &y_list, mMediaList); + if (mMoreLessBtn->getToggleState() + && mMediaList->pointInView(x_list, y_list) + && mMediaList->selectItemAt(x_list, y_list, mask)) + { + if (mContextMenu) + { + mContextMenu->buildDrawLabels(); + mContextMenu->updateParent(LLMenuGL::sMenuContainer); + LLMenuGL::showPopup(this, mContextMenu, x, y); + return TRUE; + } + } + + return LLPanelPulldown::handleRightMouseDown(x, y, mask); +} + + +void LLPanelNearByMedia::onVisibilityChange(BOOL new_visibility) +{ + if (!new_visibility && mContextMenu->getVisible()) + { + gMenuHolder->hideMenus(); + } + LLPanelPulldown::onVisibilityChange(new_visibility); +} + /* Media/Stream separation bool LLPanelNearByMedia::getParcelAudioAutoStart() { @@ -980,7 +1031,7 @@ void LLPanelNearByMedia::onAdvancedButtonClick() void LLPanelNearByMedia::onMoreLess() { - bool is_more = getChild("more_btn")->getToggleState(); + bool is_more = mMoreLessBtn->getToggleState(); mNearbyMediaPanel->setVisible(is_more); // enable resizing when expanded @@ -991,7 +1042,7 @@ void LLPanelNearByMedia::onMoreLess() setShape(new_rect); - getChild("more_btn")->setVisible(true); + mMoreLessBtn->setVisible(true); } void LLPanelNearByMedia::updateControls() @@ -1254,6 +1305,53 @@ void LLPanelNearByMedia::onClickSelectedMediaUnzoom() LLViewerMediaFocus::getInstance()->unZoom(); } +void LLPanelNearByMedia::onMenuAction(const LLSD& userdata) +{ + const std::string command_name = userdata.asString(); + if ("copy_url" == command_name) + { + LLClipboard::instance().reset(); + std::string url = getSelectedUrl(); + + if (!url.empty()) + { + LLClipboard::instance().copyToClipboard(utf8str_to_wstring(url), 0, url.size()); + } + } + else if ("copy_data" == command_name) + { + LLClipboard::instance().reset(); + std::string url = getSelectedUrl(); + static const std::string encoding_specifier = "base64,"; + size_t pos = url.find(encoding_specifier); + if (pos != std::string::npos) + { + pos += encoding_specifier.size(); + std::string res = LLBase64::decodeAsString(url.substr(pos)); + LLClipboard::instance().copyToClipboard(utf8str_to_wstring(res), 0, res.size()); + } + else + { + url = LLURI::unescape(url); + LLClipboard::instance().copyToClipboard(utf8str_to_wstring(url), 0, url.size()); + } + } +} + +bool LLPanelNearByMedia::onMenuVisible(const LLSD& userdata) +{ + const std::string command_name = userdata.asString(); + if ("copy_data" == command_name) + { + std::string url = getSelectedUrl(); + if (url.rfind("data:", 0) == 0) + { + // might be a a good idea to permit text/html only + return true; + } + } + return false; +} // static void LLPanelNearByMedia::getNameAndUrlHelper(LLViewerMediaImpl* impl, std::string& name, std::string & url, const std::string &defaultName) @@ -1280,3 +1378,28 @@ void LLPanelNearByMedia::getNameAndUrlHelper(LLViewerMediaImpl* impl, std::strin } } +std::string LLPanelNearByMedia::getSelectedUrl() +{ + std::string url; + LLUUID selected_media_id = mMediaList->getValue().asUUID(); + // Media / Stream separation + /*if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID) + { + url = LLViewerMedia::getInstance()->getParcelAudioURL(); + } + else*/ if (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) + { + url = LLViewerParcelMedia::getInstance()->getURL(); + } + else + { + LLViewerMediaImpl* impl = LLViewerMedia::getInstance()->getMediaImplFromTextureID(selected_media_id); + if (NULL != impl) + { + std::string name; + getNameAndUrlHelper(impl, name, url, mEmptyNameString); + } + } + return url; +} + diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h index 2478e3548e..cff7d90dcd 100644 --- a/indra/newview/llpanelnearbymedia.h +++ b/indra/newview/llpanelnearbymedia.h @@ -36,6 +36,7 @@ class LLSlider; class LLSliderCtrl; class LLCheckBoxCtrl; class LLTextBox; +class LLToggleableMenu; class LLComboBox; class LLViewerMediaImpl; @@ -43,10 +44,12 @@ class LLPanelNearByMedia : public LLPanelPulldown { public: - /*virtual*/ BOOL postBuild(); - /*virtual*/ void draw(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); - /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); + BOOL postBuild() override; + void draw() override; + void reshape(S32 width, S32 height, BOOL called_from_parent) override; + BOOL handleHover(S32 x, S32 y, MASK mask) override; + BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override; + void onVisibilityChange(BOOL new_visibility) override; // this is part of the nearby media *dialog* so we can track whether // the user *implicitly* wants audio on or off via their *explicit* @@ -104,8 +107,6 @@ private: void onClickDisableAll(); void onClickEnableParcelMedia(); void onClickDisableParcelMedia(); - void onClickMuteParcelMedia(); - void onParcelMediaVolumeSlider(); void onClickParcelMediaPlay(); void onClickParcelMediaStop(); void onClickParcelMediaPause(); @@ -115,7 +116,6 @@ private: void onClickParcelAudioPause(); Media/Stream separation */ - void onCheckAutoPlay(); // void onAdvancedButtonClick(); // Handled centrally now void onMoreLess(); @@ -127,6 +127,7 @@ private: bool setDisabled(const LLUUID &id, bool disabled); static void getNameAndUrlHelper(LLViewerMediaImpl* impl, std::string& name, std::string & url, const std::string &defaultName); + std::string getSelectedUrl(); void updateColumns(); @@ -144,6 +145,8 @@ private: void onCommitSelectedMediaVolume(); void onClickSelectedMediaZoom(); void onClickSelectedMediaUnzoom(); + void onMenuAction(const LLSD& userdata); + bool onMenuVisible(const LLSD& userdata); LLUICtrl* mNearbyMediaPanel; LLScrollListCtrl* mMediaList; @@ -161,8 +164,8 @@ private: LLUICtrl* mUnzoomCtrl; LLSlider* mVolumeSlider; LLButton* mMuteBtn; + LLButton* mMoreLessBtn; - bool mAllMediaDisabled; bool mDebugInfoVisible; // bool mParcelAudioAutoStart; // Media/Stream separation std::string mEmptyNameString; @@ -174,6 +177,7 @@ private: LLRect mLessRect; LLScrollListItem* mParcelMediaItem; // LLScrollListItem* mParcelAudioItem; // Media/Stream separation + LLToggleableMenu* mContextMenu; }; diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 2d3b555069..b4a088bf78 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -135,7 +135,7 @@ public: virtual void selectItem() {} virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {} virtual BOOL isItemRenameable() const; - virtual BOOL renameItem(const std::string& new_name); + virtual bool renameItem(const std::string& new_name); virtual BOOL isItemMovable() const; virtual BOOL isItemRemovable() const; virtual BOOL removeItem(); @@ -320,7 +320,7 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const return FALSE; } -BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) +bool LLTaskInvFVBridge::renameItem(const std::string& new_name) { // [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); @@ -346,7 +346,7 @@ BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) false); } } - return TRUE; + return true; } BOOL LLTaskInvFVBridge::isItemMovable() const @@ -365,17 +365,17 @@ BOOL LLTaskInvFVBridge::isItemMovable() const { if (gRlvAttachmentLocks.isLockedAttachment(pObj->getRootEdit())) { - return FALSE; + return false; } else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) ) { if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == pObj->getRootEdit()) ) - return FALSE; + return false; } } } // [/RLVa:KB] - return TRUE; + return true; } BOOL LLTaskInvFVBridge::isItemRemovable() const @@ -679,7 +679,7 @@ public: virtual const std::string& getDisplayName() const; virtual BOOL isItemRenameable() const; // virtual BOOL isItemCopyable() const { return FALSE; } - virtual BOOL renameItem(const std::string& new_name); + virtual bool renameItem(const std::string& new_name); virtual BOOL isItemRemovable() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool hasChildren() const; @@ -775,9 +775,9 @@ BOOL LLTaskCategoryBridge::isItemRenameable() const return FALSE; } -BOOL LLTaskCategoryBridge::renameItem(const std::string& new_name) +bool LLTaskCategoryBridge::renameItem(const std::string& new_name) { - return FALSE; + return false; } BOOL LLTaskCategoryBridge::isItemRemovable() const @@ -1055,7 +1055,7 @@ public: LLTaskInvFVBridge(panel, uuid, name) {} virtual BOOL isItemRenameable() const; - virtual BOOL renameItem(const std::string& new_name); + virtual bool renameItem(const std::string& new_name); }; BOOL LLTaskCallingCardBridge::isItemRenameable() const @@ -1063,9 +1063,9 @@ BOOL LLTaskCallingCardBridge::isItemRenameable() const return FALSE; } -BOOL LLTaskCallingCardBridge::renameItem(const std::string& new_name) +bool LLTaskCallingCardBridge::renameItem(const std::string& new_name) { - return FALSE; + return false; } diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index a427845ed6..a5bfb14598 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -333,9 +333,9 @@ public: mEventTimer.stop(); } - virtual BOOL tick() // from LLEventTimer + virtual bool tick() // from LLEventTimer { - return FALSE; + return false; } }; @@ -389,9 +389,9 @@ public: } - /*virtual*/ BOOL tick() + /*virtual*/ bool tick() { - if (!mIsActive) return FALSE; + if (!mIsActive) return false; if (mMask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE)) { @@ -402,7 +402,7 @@ public: mEventTimer.stop(); mMask = 0; - return FALSE; + return false; } // virtual @@ -531,10 +531,10 @@ public: } } - /*virtual*/ BOOL tick() + /*virtual*/ bool tick() { update(); - return FALSE; + return false; } private: }; @@ -1116,25 +1116,6 @@ void LLPanelPeople::getCurrentItemIDs(uuid_vec_t& selected_uuids) const } -void LLPanelPeople::showGroupMenu(LLMenuGL* menu) -{ - // Shows the menu at the top of the button bar. - - // Calculate its coordinates. - // (assumes that groups panel is the current tab) - LLPanel* bottom_panel = mTabContainer->getCurrentPanel()->getChild("bottom_panel"); - LLPanel* parent_panel = mTabContainer->getCurrentPanel(); - menu->arrangeAndClear(); - S32 menu_height = menu->getRect().getHeight(); - S32 menu_x = -2; // *HACK: compensates HPAD in showPopup() - S32 menu_y = bottom_panel->getRect().mTop + menu_height; - - // Actually show the menu. - menu->buildDrawLabels(); - menu->updateParent(LLMenuGL::sMenuContainer); - LLMenuGL::showPopup(parent_panel, menu, menu_x, menu_y); -} - void LLPanelPeople::setSortOrder(LLAvatarList* list, ESortOrder order, bool save) { switch (order) diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 4c9ea89c21..7ba91647f2 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -108,7 +108,6 @@ private: std::string getActiveTabName() const; LLUUID getCurrentItemID() const; void getCurrentItemIDs(uuid_vec_t& selected_uuids) const; - void showGroupMenu(LLMenuGL* menu); void setSortOrder(LLAvatarList* list, ESortOrder order, bool save = true); // UI callbacks diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index b634a5485b..6d42c238e7 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -1394,7 +1394,7 @@ void LLPanelPermissions::onCommitName(LLUICtrl*, void* data) { LLPointer new_item = new LLViewerInventoryItem(item); new_item->rename(tb->getText()); - new_item->updateServer(FALSE); + new_item->updateServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); } @@ -1421,7 +1421,7 @@ void LLPanelPermissions::onCommitDesc(LLUICtrl*, void* data) { LLPointer new_item = new LLViewerInventoryItem(item); new_item->setDescription(le->getText()); - new_item->updateServer(FALSE); + new_item->updateServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); } diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 4969e4a504..c85d06dc48 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -884,7 +884,7 @@ void LLPanelPlaces::onSaveButtonClicked() gInventory.accountForUpdate(update); new_item->setParent(folder_id); - new_item->updateParentOnServer(FALSE); + new_item->updateParentOnServer(false); } gInventory.updateItem(new_item); diff --git a/indra/newview/llphysicsmotion.h b/indra/newview/llphysicsmotion.h index b246fa99bb..a3b8e293f1 100644 --- a/indra/newview/llphysicsmotion.h +++ b/indra/newview/llphysicsmotion.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/newview/llpreview.cpp b/indra/newview/llpreview.cpp index 9136634540..785a123dcc 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -200,7 +200,7 @@ void LLPreview::onCommit() } else if(item->getPermissions().getOwner() == gAgent.getID()) { - new_item->updateServer(FALSE); + new_item->updateServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); @@ -514,7 +514,7 @@ void LLPreview::onDiscardBtn(void* data) new_item->setParent(trash_id); // no need to restamp it though it's a move into trash because // it's a brand new item already. - new_item->updateParentOnServer(FALSE); + new_item->updateParentOnServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); } diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index b74f90d8a5..9c138aa681 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -1206,7 +1206,7 @@ void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, new_item->setDescription(info->mDesc); new_item->setTransactionID(info->mTransactionID); new_item->setAssetUUID(asset_uuid); - new_item->updateServer(FALSE); + new_item->updateServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); } diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index d4a1717834..9ca67dfb62 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -740,7 +740,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data LLPointer new_item = new LLViewerInventoryItem(item); new_item->setAssetUUID(asset_uuid); new_item->setTransactionID(info->mTransactionID); - new_item->updateServer(FALSE); + new_item->updateServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); } diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index d2c82b05e0..448871644e 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -144,7 +144,7 @@ public: typedef boost::function bool_func_t; public: LLCallbackTimer(F32 nPeriod, bool_func_t cb) : LLEventTimer(nPeriod), m_Callback(cb) {} - /*virtual*/ BOOL tick() { return m_Callback(); } + /*virtual*/ bool tick() { return m_Callback(); } protected: bool_func_t m_Callback; }; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 8932b80932..3018b2f46e 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4313,14 +4313,14 @@ void LLSelectMgr::selectGetAggregateSaleInfo(U32 &num_for_sale, return; LLSelectNode *node = *(getSelection()->root_begin()); - const BOOL first_node_for_sale = node->mSaleInfo.isForSale(); + const bool first_node_for_sale = node->mSaleInfo.isForSale(); const S32 first_node_sale_price = node->mSaleInfo.getSalePrice(); for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++) { LLSelectNode* node = *iter; - const BOOL node_for_sale = node->mSaleInfo.isForSale(); + const bool node_for_sale = node->mSaleInfo.isForSale(); const S32 node_sale_price = node->mSaleInfo.getSalePrice(); // Set mixed if the fields don't match the first node's fields. diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index 74844a80e8..c5a8380eff 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -53,11 +53,11 @@ public: virtual ~Updater(){} protected: - BOOL tick() + bool tick() { mCallback(mMask); // Deletes itseft after execution - return TRUE; + return true; } private: diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index 7009fb98ab..4df80cb2b9 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -181,7 +181,7 @@ void LLSettingsVOBase::onInventoryItemCreated(const LLUUID &inventoryId, LLSetti { perm.setMaskEveryone(PERM_COPY); pitem->setPermissions(perm); - pitem->updateServer(FALSE); + pitem->updateServer(false); } } if (!settings) @@ -240,7 +240,7 @@ void LLSettingsVOBase::updateInventoryItem(const LLSettingsBase::ptr_t &settings } if (need_update) { - new_item->updateServer(FALSE); + new_item->updateServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); } diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 6570232bd5..492a16f3a6 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -723,7 +723,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) /////////////// const LLSaleInfo& sale_info = item->getSaleInfo(); - BOOL is_for_sale = sale_info.isForSale(); + bool is_for_sale = sale_info.isForSale(); LLComboBox* combo_sale_type = getChild("ComboBoxSaleType"); LLUICtrl* edit_cost = getChild("Edit Cost"); @@ -1221,7 +1221,7 @@ void LLSidepanelItemInfo::onCommitChanges(LLPointer item) mUpdatePendingId++; LLPointer callback = new PropertiesChangedCallback(getHandle(), mItemID, mUpdatePendingId); update_inventory_item(item.get(), callback); - //item->updateServer(FALSE); + //item->updateServer(false); gInventory.updateItem(item); gInventory.notifyObservers(); } diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 935afbf86b..831ff8bd1d 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -187,13 +187,13 @@ LLSpeakerActionTimer::LLSpeakerActionTimer(action_callback_t action_cb, F32 acti { } -BOOL LLSpeakerActionTimer::tick() +bool LLSpeakerActionTimer::tick() { if (mActionCallback) { return (BOOL)mActionCallback(mSpeakerId); } - return TRUE; + return true; } void LLSpeakerActionTimer::unset() diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 5731898344..aa7a817706 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -159,7 +159,7 @@ public: * * If action callback is not specified returns true. Instance will be deleted by LLEventTimer::updateClass(). */ - virtual BOOL tick(); + virtual bool tick(); /** * Clears the callback. diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index e93261f406..02f3d6353c 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -133,10 +133,10 @@ public: { bakeTimeout=NULL; } - BOOL tick() + bool tick() { mbar->setRebakeStuck(true); - return TRUE; + return true; } private: LLStatusBar *mbar; diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 61dc405d2d..2489e7b6d9 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -44,13 +44,13 @@ LLToastLifeTimer::LLToastLifeTimer(LLToast* toast, F32 period) } /*virtual*/ -BOOL LLToastLifeTimer::tick() +bool LLToastLifeTimer::tick() { if (mEventTimer.hasExpired()) { mToast->expire(); } - return FALSE; + return false; } void LLToastLifeTimer::stop() diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index ab559f1e6f..412656937b 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -53,7 +53,7 @@ public: LLToastLifeTimer(LLToast* toast, F32 period); /*virtual*/ - BOOL tick(); + bool tick(); void stop(); void start(); void restart(); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index e71f828cbe..07c5d6c922 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -155,7 +155,7 @@ public: } protected: - BOOL tick() + bool tick() { gViewerThrottle.setMaxBandwidth(mNewValue); mEventTimer.stop(); @@ -167,7 +167,7 @@ protected: gWarningSettings.setBOOL("FSBandwidthTooHigh", TRUE); } - return FALSE; + return false; } private: diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index c4d0779668..f04d7110e8 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -413,7 +413,7 @@ void LLViewerInventoryItem::cloneViewerItem(LLPointer& ne } } -void LLViewerInventoryItem::updateServer(BOOL is_new) const +void LLViewerInventoryItem::updateServer(bool is_new) const { if(!mIsComplete) { @@ -538,24 +538,24 @@ void LLViewerInventoryItem::fetchFromServer(void) const } // virtual -BOOL LLViewerInventoryItem::unpackMessage(const LLSD& item) +bool LLViewerInventoryItem::unpackMessage(const LLSD& item) { BOOL rv = LLInventoryItem::fromLLSD(item); LLLocalizedInventoryItemsDictionary::getInstance()->localizeInventoryObjectName(mName); - mIsComplete = TRUE; + mIsComplete = true; return rv; } // virtual -BOOL LLViewerInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num) +bool LLViewerInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num) { BOOL rv = LLInventoryItem::unpackMessage(msg, block, block_num); LLLocalizedInventoryItemsDictionary::getInstance()->localizeInventoryObjectName(mName); - mIsComplete = TRUE; + mIsComplete = true; return rv; } @@ -584,14 +584,14 @@ void LLViewerInventoryItem::packMessage(LLMessageSystem* msg) const } // virtual -BOOL LLViewerInventoryItem::importLegacyStream(std::istream& input_stream) +bool LLViewerInventoryItem::importLegacyStream(std::istream& input_stream) { - BOOL rv = LLInventoryItem::importLegacyStream(input_stream); - mIsComplete = TRUE; + bool rv = LLInventoryItem::importLegacyStream(input_stream); + mIsComplete = true; return rv; } -void LLViewerInventoryItem::updateParentOnServer(BOOL restamp) const +void LLViewerInventoryItem::updateParentOnServer(bool restamp) const { LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_MoveInventoryItem); @@ -672,7 +672,7 @@ void LLViewerInventoryCategory::packMessage(LLMessageSystem* msg) const msg->addStringFast(_PREHASH_Name, mName); } -void LLViewerInventoryCategory::updateParentOnServer(BOOL restamp) const +void LLViewerInventoryCategory::updateParentOnServer(bool restamp) const { LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_MoveInventoryFolder); @@ -687,7 +687,7 @@ void LLViewerInventoryCategory::updateParentOnServer(BOOL restamp) const gAgent.sendReliableMessage(); } -void LLViewerInventoryCategory::updateServer(BOOL is_new) const +void LLViewerInventoryCategory::updateServer(bool is_new) const { // communicate that change with the server. @@ -988,9 +988,9 @@ void LLViewerInventoryCategory::localizeName() } // virtual -BOOL LLViewerInventoryCategory::unpackMessage(const LLSD& category) +bool LLViewerInventoryCategory::unpackMessage(const LLSD& category) { - BOOL rv = LLInventoryCategory::fromLLSD(category); + bool rv = LLInventoryCategory::fromLLSD(category); localizeName(); return rv; } @@ -1115,7 +1115,7 @@ void set_default_permissions(LLViewerInventoryItem* item, std::string perm_type) item->setPermissions(perm); - item->updateServer(FALSE); + item->updateServer(false); } } @@ -2579,7 +2579,7 @@ U32 LLViewerInventoryItem::getCRC32() const // *TODO: mantipov: should be removed with LMSortPrefix patch in llinventorymodel.cpp, EXT-3985 static char getSeparator() { return '@'; } -BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName) +bool LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName) { using std::string; using std::stringstream; @@ -2587,7 +2587,7 @@ BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& na const char separator = getSeparator(); const string::size_type separatorPos = name.find(separator, 0); - BOOL result = FALSE; + BOOL result = false; if (separatorPos < string::npos) { @@ -2608,7 +2608,7 @@ BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& na *displayName = name.substr(separatorPos + 1, string::npos); } - result = TRUE; + result = true; } return result; @@ -2757,9 +2757,9 @@ BOOL LLViewerInventoryItem::regenerateLink() { LLViewerInventoryItem *item = (*item_iter); item->setAssetUUID(target_item_id); - item->updateServer(FALSE); + item->updateServer(false); gInventory.addChangedMask(LLInventoryObserver::REBUILD, item->getUUID()); } gInventory.notifyObservers(); - return TRUE; + return true; } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 10540c8c22..2254170405 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -56,7 +56,7 @@ public: protected: ~LLViewerInventoryItem( void ); // ref counted - BOOL extractSortFieldAndDisplayName(S32* sortField, std::string* displayName) const { return extractSortFieldAndDisplayName(mName, sortField, displayName); } + bool extractSortFieldAndDisplayName(S32* sortField, std::string* displayName) const { return extractSortFieldAndDisplayName(mName, sortField, displayName); } mutable std::string mDisplayName; public: @@ -83,7 +83,7 @@ public: virtual time_t getCreationDate() const; virtual U32 getCRC32() const; // really more of a checksum. - static BOOL extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName); + static bool extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName); // construct a complete viewer inventory item LLViewerInventoryItem(const LLUUID& uuid, const LLUUID& parent_uuid, @@ -125,14 +125,14 @@ public: void cloneViewerItem(LLPointer& newitem) const; // virtual methods - virtual void updateParentOnServer(BOOL restamp) const; - virtual void updateServer(BOOL is_new) const; + virtual void updateParentOnServer(bool restamp) const; + virtual void updateServer(bool is_new) const; void fetchFromServer(void) const; virtual void packMessage(LLMessageSystem* msg) const; - virtual BOOL unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0); - virtual BOOL unpackMessage(const LLSD& item); - virtual BOOL importLegacyStream(std::istream& input_stream); + virtual bool unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0); + virtual bool unpackMessage(const LLSD& item); + virtual bool importLegacyStream(std::istream& input_stream); // new methods bool isFinished() const { return mIsComplete; } @@ -197,8 +197,8 @@ public: LLViewerInventoryCategory(const LLViewerInventoryCategory* other); void copyViewerCategory(const LLViewerInventoryCategory* other); - virtual void updateParentOnServer(BOOL restamp_children) const; - virtual void updateServer(BOOL is_new) const; + virtual void updateParentOnServer(bool restamp_children) const; + virtual void updateServer(bool is_new) const; virtual void packMessage(LLMessageSystem* msg) const; @@ -236,7 +236,7 @@ public: void determineFolderType(); void changeType(LLFolderType::EType new_folder_type); virtual void unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0); - virtual BOOL unpackMessage(const LLSD& category); + virtual bool unpackMessage(const LLSD& category); // returns true if the category object will accept the incoming item bool acceptItem(LLInventoryItem* inv_item); diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index 5c9065e209..3a472c94c8 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -463,7 +463,7 @@ void LLViewerJointAttachment::calcLOD() //----------------------------------------------------------------------------- // updateLOD() //----------------------------------------------------------------------------- -BOOL LLViewerJointAttachment::updateLOD(F32 pixel_area, BOOL activate) +bool LLViewerJointAttachment::updateLOD(F32 pixel_area, bool activate) { BOOL res = FALSE; if (!mValid) diff --git a/indra/newview/llviewerjointattachment.h b/indra/newview/llviewerjointattachment.h index fa5b62879c..f1303b7670 100644 --- a/indra/newview/llviewerjointattachment.h +++ b/indra/newview/llviewerjointattachment.h @@ -60,7 +60,7 @@ public: // Called by render(). /*virtual*/ U32 drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy ); - /*virtual*/ BOOL updateLOD(F32 pixel_area, BOOL activate); + /*virtual*/ bool updateLOD(F32 pixel_area, bool activate); // // accessors diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 57c5ebc9bb..53d356b4db 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -439,9 +439,9 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_w //----------------------------------------------------------------------------- // updateLOD() //----------------------------------------------------------------------------- -BOOL LLViewerJointMesh::updateLOD(F32 pixel_area, BOOL activate) +bool LLViewerJointMesh::updateLOD(F32 pixel_area, bool activate) { - BOOL valid = mValid; + bool valid = mValid; setValid(activate, TRUE); return (valid != activate); } diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h index 0db2836e15..1fe58c60ad 100644 --- a/indra/newview/llviewerjointmesh.h +++ b/indra/newview/llviewerjointmesh.h @@ -62,7 +62,7 @@ public: /*virtual*/ void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area); /*virtual*/ void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE, bool terse_update = false); - /*virtual*/ BOOL updateLOD(F32 pixel_area, BOOL activate); + /*virtual*/ bool updateLOD(F32 pixel_area, bool activate); /*virtual*/ void updateJointGeometry(); /*virtual*/ void dump(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c54aa33393..bf7ed3e0d8 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -10694,7 +10694,7 @@ void handle_grab_baked_texture(void* data) LLInventoryItemFlags::II_FLAGS_NONE, creation_date_now); - item->updateServer(TRUE); + item->updateServer(true); gInventory.updateItem(item); gInventory.notifyObservers(); @@ -10725,7 +10725,7 @@ BOOL enable_grab_baked_texture(void* data) { return gAgentAvatarp->canGrabBakedTexture(index); } - return FALSE; + return false; } // Returns a pointer to the avatar give the UUID of the avatar OR of an attachment the avatar is wearing. diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 949d759b5e..d89c7b4fac 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -201,7 +201,7 @@ public: mEventTimer.stop(); } - BOOL tick() + bool tick() { if (gSavedSettings.getBOOL("FSExperimentalLostAttachmentsFixReport")) { @@ -209,7 +209,7 @@ public: } mEventTimer.stop(); LLAttachmentsMgr::instance().refreshAttachments(); - return FALSE; + return false; } void triggerRefresh() @@ -3653,7 +3653,7 @@ public: virtual ~LLPostTeleportNotifiers(); //function to be called at the supplied frequency - virtual BOOL tick(); + virtual bool tick(); }; LLPostTeleportNotifiers::LLPostTeleportNotifiers() : LLEventTimer( 2.0 ) @@ -3664,9 +3664,9 @@ LLPostTeleportNotifiers::~LLPostTeleportNotifiers() { } -BOOL LLPostTeleportNotifiers::tick() +bool LLPostTeleportNotifiers::tick() { - BOOL all_done = FALSE; + bool all_done = false; if ( gAgent.getTeleportState() == LLAgent::TELEPORT_NONE ) { // get callingcards and landmarks available to the user arriving. @@ -3690,7 +3690,7 @@ BOOL LLPostTeleportNotifiers::tick() gInventory.addObserver(fetcher); } } - all_done = TRUE; + all_done = true; } return all_done; @@ -7652,7 +7652,7 @@ void container_inventory_arrived(LLViewerObject* object, LLSaleInfo::DEFAULT, item->getFlags(), creation_date_utc); - new_item->updateServer(TRUE); + new_item->updateServer(true); gInventory.updateItem(new_item); } } @@ -7693,7 +7693,7 @@ void container_inventory_arrived(LLViewerObject* object, LLSaleInfo::DEFAULT, item->getFlags(), creation_date_utc); - new_item->updateServer(TRUE); + new_item->updateServer(true); gInventory.updateItem(new_item); gInventory.notifyObservers(); if(active_panel) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 53dec68da3..1319e51ee4 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3807,14 +3807,14 @@ void LLViewerObject::setPixelAreaAndAngle(LLAgent &agent) } } -BOOL LLViewerObject::updateLOD() +bool LLViewerObject::updateLOD() { - return FALSE; + return false; } BOOL LLViewerObject::updateGeometry(LLDrawable *drawable) { - return TRUE; + return false; } void LLViewerObject::updateGL() diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 15cb3b97ea..81dda25c06 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -224,7 +224,7 @@ public: virtual BOOL updateGeometry(LLDrawable *drawable); virtual void updateGL(); virtual void updateFaceSize(S32 idx); - virtual BOOL updateLOD(); + virtual bool updateLOD(); virtual BOOL setDrawableParent(LLDrawable* parentp); F32 getRotTime() { return mRotTime; } private: diff --git a/indra/newview/llviewerparcelmediaautoplay.cpp b/indra/newview/llviewerparcelmediaautoplay.cpp index bc3828fcea..1d9865511b 100644 --- a/indra/newview/llviewerparcelmediaautoplay.cpp +++ b/indra/newview/llviewerparcelmediaautoplay.cpp @@ -60,7 +60,7 @@ void LLViewerParcelMediaAutoPlay::playStarted() LLSingleton::getInstance()->mPlayed = TRUE; } -BOOL LLViewerParcelMediaAutoPlay::tick() +bool LLViewerParcelMediaAutoPlay::tick() { LLParcel *this_parcel = NULL; LLViewerRegion *this_region = NULL; @@ -94,7 +94,7 @@ BOOL LLViewerParcelMediaAutoPlay::tick() this_region_id != mLastRegionID) { // we've entered a new parcel - mPlayed = FALSE; // we haven't autoplayed yet + mPlayed = false; // we haven't autoplayed yet mTimeInParcel = 0; // reset our timer mLastParcelID = this_parcel_id; mLastRegionID = this_region_id; @@ -163,7 +163,7 @@ BOOL LLViewerParcelMediaAutoPlay::tick() } - return FALSE; // continue ticking forever please. + return false; // continue ticking forever please. } //static diff --git a/indra/newview/llviewerparcelmediaautoplay.h b/indra/newview/llviewerparcelmediaautoplay.h index d71fd4c075..952747a2af 100644 --- a/indra/newview/llviewerparcelmediaautoplay.h +++ b/indra/newview/llviewerparcelmediaautoplay.h @@ -35,7 +35,7 @@ class LLViewerParcelMediaAutoPlay : LLEventTimer, public LLSingleton 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; } //----------------------------------------------------------------------------- @@ -8780,9 +8780,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()) { @@ -8795,7 +8795,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 } @@ -8824,10 +8824,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 @@ -11500,7 +11500,7 @@ LLHost LLVOAvatar::getObjectHost() const } } -BOOL LLVOAvatar::updateLOD() +bool LLVOAvatar::updateLOD() { if (mDrawable.isNull()) { @@ -12628,17 +12628,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; } // getImage(te, index) can return 0 in some edge cases. Plus make this faster as it gets called frequently. diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 9531dcc398..e6da66429c 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -133,7 +133,7 @@ public: const EObjectUpdateType update_type, LLDataPacker *dp); virtual void idleUpdate(LLAgent &agent, const F64 &time); - /*virtual*/ BOOL updateLOD(); + /*virtual*/ bool updateLOD(); BOOL updateJointLODs(); void updateLODRiggedAttachments( void ); /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. @@ -479,7 +479,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(); @@ -730,7 +730,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; @@ -910,7 +910,7 @@ 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; } // [Legacy Bake] // True if this avatar should fetch its baked textures via the new @@ -921,7 +921,7 @@ public: // 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; } void setIsEditingAppearance(BOOL editing) { mIsEditingAppearance = editing; } // for Built-in Posestand // FIXME review isUsingLocalAppearance uses, some should be isEditing instead. @@ -930,7 +930,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 // [Legacy Bake] BOOL mUseServerBakes; // flag for if baked textures should be fetched from baking service (false if they're temporary uploads) @@ -964,7 +964,7 @@ public: void cleanupAttachedMesh( LLViewerObject* pVO ); // bool hasPendingAttachedMeshes(); // remove mesh rezzing delay 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 b4b6792251..136d6aa61e 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -353,9 +353,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 @@ -367,7 +367,7 @@ void LLVOAvatarSelf::markDead() { if (param->getWearableType() != LLWearableType::WT_INVALID) { - param->setIsDummy(TRUE); + param->setIsDummy(true); } } @@ -1014,7 +1014,7 @@ bool LLVOAvatarSelf::updateCharacter(LLAgent &agent) } // virtual -BOOL LLVOAvatarSelf::isValid() const +bool LLVOAvatarSelf::isValid() const { // Skip unregistering attachments during shutdown //return ((getRegion() != NULL) && !isDead()); @@ -2066,7 +2066,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 ac29890eca..752ddac029 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(); @@ -129,7 +129,7 @@ private: public: /*virtual*/ bool isSelf() const { return true; } - /*virtual*/ BOOL isValid() const; + /*virtual*/ bool isValid() const; //-------------------------------------------------------------------- // Updates @@ -210,7 +210,7 @@ public: // [Legacy Bake] BOOL isBakedTextureFinal(const LLAvatarAppearanceDefines::EBakedTextureIndex index) const; // If you want to check all textures of a given type, pass gAgentWearables.getWearableCount() for index - /*virtual*/ BOOL isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const; + /*virtual*/ bool 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; diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 3e9642ea57..cca8b047d8 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -343,11 +343,11 @@ void LLVOGrass::updateTextures() } } -BOOL LLVOGrass::updateLOD() +bool LLVOGrass::updateLOD() { if (mDrawable->getNumFaces() <= 0) { - return FALSE; + return false; } LLFace* face = mDrawable->getFace(0); @@ -360,7 +360,7 @@ BOOL LLVOGrass::updateLOD() face->setSize(0, 0); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } - return TRUE ; + return true ; } if(!mNumBlades) { @@ -397,10 +397,10 @@ BOOL LLVOGrass::updateLOD() face->setSize(mNumBlades*8, mNumBlades*12); } gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); - return TRUE; + return true; } - return FALSE; + return false; } LLDrawable* LLVOGrass::createDrawable(LLPipeline *pipeline) diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h index fa44dcae04..282ca78e3a 100644 --- a/indra/newview/llvograss.h +++ b/indra/newview/llvograss.h @@ -67,7 +67,7 @@ public: void updateFaceSize(S32 idx) { } /*virtual*/ void updateTextures(); - /*virtual*/ BOOL updateLOD(); + /*virtual*/ bool updateLOD(); /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); // generate accurate apparent angle and area void plantBlades(); diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 42dbc304dd..475a5964e4 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -236,9 +236,9 @@ void LLVOSurfacePatch::updateFaceSize(S32 idx) } } -BOOL LLVOSurfacePatch::updateLOD() +bool LLVOSurfacePatch::updateLOD() { - return TRUE; + return true; } void LLVOSurfacePatch::getGeometry(LLStrider &verticesp, diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h index aed67162d1..c5f7f103f4 100644 --- a/indra/newview/llvosurfacepatch.h +++ b/indra/newview/llvosurfacepatch.h @@ -61,7 +61,7 @@ public: /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ void updateGL(); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); - /*virtual*/ BOOL updateLOD(); + /*virtual*/ bool updateLOD(); /*virtual*/ void updateFaceSize(S32 idx); void getGeometry(LLStrider &verticesp, LLStrider &normalsp, diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 1dc8376341..849053d52a 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1722,16 +1722,16 @@ void LLVOVolume::forceLOD(S32 lod) } // -BOOL LLVOVolume::updateLOD() +bool LLVOVolume::updateLOD() { if (mDrawable.isNull()) { - return FALSE; + return false; } LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; - BOOL lod_changed = FALSE; + bool lod_changed = false; if (!LLSculptIDSize::instance().isUnloaded(getVolume()->getParams().getSculptID())) { @@ -1739,13 +1739,13 @@ BOOL LLVOVolume::updateLOD() } else { - return FALSE; + return false; } if (lod_changed) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); - mLODChanged = TRUE; + mLODChanged = true; } else { diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 5a89522624..7b3b2102c2 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -243,7 +243,7 @@ public: void updateRelativeXform(bool force_identity = false); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable) override; /*virtual*/ void updateFaceSize(S32 idx) override; - /*virtual*/ BOOL updateLOD() override; + /*virtual*/ bool updateLOD() override; void updateRadius() override; /*virtual*/ void updateTextures() override; void updateTextureVirtualSize(bool forced = false); diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index d686aee5f1..c591a37328 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -1968,7 +1968,7 @@ void RlvBehaviourNotifyHandler::onStand(const LLUUID& idObj, bool fAllowed) // // Checked: 2010-03-13 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a -BOOL RlvGCTimer::tick() +bool RlvGCTimer::tick() { bool fContinue = gRlvHandler.onGC(); if (!fContinue) diff --git a/indra/newview/rlvhelper.h b/indra/newview/rlvhelper.h index d20ba1790b..a4812f333d 100644 --- a/indra/newview/rlvhelper.h +++ b/indra/newview/rlvhelper.h @@ -655,7 +655,7 @@ class RlvGCTimer : public LLEventTimer { public: RlvGCTimer() : LLEventTimer(30.0) {} - virtual BOOL tick(); + virtual bool tick(); }; // NOTE: Unused as of SL-3.7.2 @@ -665,10 +665,10 @@ public: typedef boost::function nullary_func_t; public: RlvCallbackTimerOnce(F32 nPeriod, nullary_func_t cb) : LLEventTimer(nPeriod), m_Callback(cb) {} - /*virtual*/ BOOL tick() + /*virtual*/ bool tick() { m_Callback(); - return TRUE; + return true; } protected: nullary_func_t m_Callback; diff --git a/indra/newview/rlvlocks.h b/indra/newview/rlvlocks.h index a8cca393f2..5248d6476d 100644 --- a/indra/newview/rlvlocks.h +++ b/indra/newview/rlvlocks.h @@ -211,7 +211,7 @@ protected: public: RlvAttachmentLockWatchdogTimer(RlvAttachmentLockWatchdog* pWatchdog) : LLEventTimer(10), m_pWatchdog(pWatchdog) {} virtual ~RlvAttachmentLockWatchdogTimer() { m_pWatchdog->m_pTimer = NULL; } - virtual BOOL tick() { return m_pWatchdog->onTimer(); } + virtual bool tick() { return m_pWatchdog->onTimer(); } RlvAttachmentLockWatchdog* m_pWatchdog; } *m_pTimer = nullptr; }; diff --git a/indra/newview/skins/default/xui/en/floater_adjust_environment.xml b/indra/newview/skins/default/xui/en/floater_adjust_environment.xml index b699bacadb..74bd42f4f3 100644 --- a/indra/newview/skins/default/xui/en/floater_adjust_environment.xml +++ b/indra/newview/skins/default/xui/en/floater_adjust_environment.xml @@ -12,7 +12,7 @@ can_resize="false"> HDR Scale: Brightness: - Intensity of lightning effects such as realistically bright skies and dynamic exposure. 1.0 is the default, 0 is off, values between 0 and 1 are mixing Ambient with HDR. + Intensity of lighting effects such as realistically bright skies and dynamic exposure. 1.0 is the default, 0 is off, values between 0 and 1 are mixing Ambient with HDR. + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml index fd0b3f88a8..69b08a7669 100644 --- a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml +++ b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml @@ -320,7 +320,7 @@ left="5" top_pad="12" width="105" - tooltip="Irradiance control. When not zero, enables HDR lighting model." + tool_tip="Irradiance control. When not zero, enables HDR lighting model." wrap="true"> Reflection Probe Ambiance (HDR): diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 6805831d35..76c2af7a65 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -226,7 +226,7 @@ F32 LLControlGroup::getF32(const std::string& name) { return 0.0f; } U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only) { return 1; } void LLControlGroup::setString(const std::string& name, const std::string& val) {} std::string LLControlGroup::getString(const std::string& name) { return "test_string"; } -LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; } +LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, bool initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; } LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; } #include "lluicolortable.h" diff --git a/indra/newview/utilitybar.cpp b/indra/newview/utilitybar.cpp index b4b52f2de6..129db6095c 100644 --- a/indra/newview/utilitybar.cpp +++ b/indra/newview/utilitybar.cpp @@ -108,7 +108,7 @@ void UtilityBar::onParcelMediaClicked() gStatusBar->toggleMedia(!any_media_playing); } -BOOL UtilityBar::tick() +bool UtilityBar::tick() { // Don't check media before being logged in properly so we won't try to // initialize parcel media classes too early diff --git a/indra/newview/utilitybar.h b/indra/newview/utilitybar.h index f1bab26fe8..6e8dbbdf14 100644 --- a/indra/newview/utilitybar.h +++ b/indra/newview/utilitybar.h @@ -39,7 +39,7 @@ class UtilityBar public: void init(); - virtual BOOL tick(); + bool tick(); void setAOInterfaceButtonExpanded(bool expanded); void setVolumeControlsButtonExpanded(bool expanded);