diff options
74 files changed, 614 insertions, 613 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 5f0c668b33..73569cfa07 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -95,7 +95,7 @@ const F32 SKEW_MAX = 0.95f; const F32 SCULPT_MIN_AREA = 0.002f; const S32 SCULPT_MIN_AREA_DETAIL = 1; -BOOL gDebugGL = FALSE; // See settings.xml "RenderDebugGL" +bool gDebugGL = FALSE; // See settings.xml "RenderDebugGL" bool check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm) { @@ -1081,7 +1081,7 @@ bool LLProfile::generate(const LLProfileParams& params, bool path_open,F32 detai -BOOL LLProfileParams::importFile(LLFILE *fp) +bool LLProfileParams::importFile(LLFILE *fp) { const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ @@ -1139,11 +1139,11 @@ BOOL LLProfileParams::importFile(LLFILE *fp) } } - return TRUE; + return true; } -BOOL LLProfileParams::exportFile(LLFILE *fp) const +bool LLProfileParams::exportFile(LLFILE *fp) const { fprintf(fp,"\t\tprofile 0\n"); fprintf(fp,"\t\t{\n"); @@ -1152,11 +1152,11 @@ BOOL LLProfileParams::exportFile(LLFILE *fp) const fprintf(fp,"\t\t\tend\t%g\n", getEnd()); fprintf(fp,"\t\t\thollow\t%g\n", getHollow()); fprintf(fp, "\t\t}\n"); - return TRUE; + return true; } -BOOL LLProfileParams::importLegacyStream(std::istream& input_stream) +bool LLProfileParams::importLegacyStream(std::istream& input_stream) { const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ @@ -1211,11 +1211,11 @@ BOOL LLProfileParams::importLegacyStream(std::istream& input_stream) } } - return TRUE; + return true; } -BOOL LLProfileParams::exportLegacyStream(std::ostream& output_stream) const +bool LLProfileParams::exportLegacyStream(std::ostream& output_stream) const { output_stream <<"\t\tprofile 0\n"; output_stream <<"\t\t{\n"; @@ -1224,7 +1224,7 @@ BOOL LLProfileParams::exportLegacyStream(std::ostream& output_stream) const output_stream <<"\t\t\tend\t" << getEnd() << "\n"; output_stream <<"\t\t\thollow\t" << getHollow() << "\n"; output_stream << "\t\t}\n"; - return TRUE; + return true; } LLSD LLProfileParams::asLLSD() const @@ -1680,7 +1680,7 @@ bool LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, } -BOOL LLPathParams::importFile(LLFILE *fp) +bool LLPathParams::importFile(LLFILE *fp) { const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ @@ -1795,11 +1795,11 @@ BOOL LLPathParams::importFile(LLFILE *fp) LL_WARNS() << "unknown keyword " << " in path import" << LL_ENDL; } } - return TRUE; + return true; } -BOOL LLPathParams::exportFile(LLFILE *fp) const +bool LLPathParams::exportFile(LLFILE *fp) const { fprintf(fp, "\t\tpath 0\n"); fprintf(fp, "\t\t{\n"); @@ -1820,11 +1820,11 @@ BOOL LLPathParams::exportFile(LLFILE *fp) const fprintf(fp,"\t\t\tskew\t%g\n", getSkew()); fprintf(fp, "\t\t}\n"); - return TRUE; + return true; } -BOOL LLPathParams::importLegacyStream(std::istream& input_stream) +bool LLPathParams::importLegacyStream(std::istream& input_stream) { const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ @@ -1935,11 +1935,11 @@ BOOL LLPathParams::importLegacyStream(std::istream& input_stream) LL_WARNS() << "unknown keyword " << " in path import" << LL_ENDL; } } - return TRUE; + return true; } -BOOL LLPathParams::exportLegacyStream(std::ostream& output_stream) const +bool LLPathParams::exportLegacyStream(std::ostream& output_stream) const { output_stream << "\t\tpath 0\n"; output_stream << "\t\t{\n"; @@ -1960,7 +1960,7 @@ BOOL LLPathParams::exportLegacyStream(std::ostream& output_stream) const output_stream <<"\t\t\tskew\t" << getSkew() << "\n"; output_stream << "\t\t}\n"; - return TRUE; + return true; } LLSD LLPathParams::asLLSD() const @@ -2099,7 +2099,7 @@ LLVolume::~LLVolume() mHullIndices = NULL; } -BOOL LLVolume::generate() +bool LLVolume::generate() { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME @@ -2143,8 +2143,8 @@ BOOL LLVolume::generate() } } - BOOL regenPath = mPathp->generate(mParams.getPathParams(), path_detail, split); - BOOL regenProf = mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(),profile_detail, split); + bool regenPath = mPathp->generate(mParams.getPathParams(), path_detail, split); + bool regenProf = mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(),profile_detail, split); if (regenPath || regenProf ) { @@ -2207,11 +2207,11 @@ BOOL LLVolume::generate() mFaceMask |= id; } LL_CHECK_MEMORY - return TRUE; + return true; } LL_CHECK_MEMORY - return FALSE; + return false; } void LLVolumeFace::VertexData::init() @@ -3334,12 +3334,12 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, -BOOL LLVolume::isCap(S32 face) +bool LLVolume::isCap(S32 face) { return mProfilep->mFaces[face].mCap; } -BOOL LLVolume::isFlat(S32 face) +bool LLVolume::isFlat(S32 face) { return mProfilep->mFaces[face].mFlat; } @@ -4324,7 +4324,7 @@ BOOL equalTriangle(const S32 *a, const S32 *b) return FALSE; } -BOOL LLVolumeParams::importFile(LLFILE *fp) +bool LLVolumeParams::importFile(LLFILE *fp) { //LL_INFOS() << "importing volume" << LL_ENDL; const S32 BUFSIZE = 16384; @@ -4364,21 +4364,21 @@ BOOL LLVolumeParams::importFile(LLFILE *fp) } } - return TRUE; + return true; } -BOOL LLVolumeParams::exportFile(LLFILE *fp) const +bool LLVolumeParams::exportFile(LLFILE *fp) const { fprintf(fp,"\tshape 0\n"); fprintf(fp,"\t{\n"); mPathParams.exportFile(fp); mProfileParams.exportFile(fp); fprintf(fp, "\t}\n"); - return TRUE; + return true; } -BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) +bool LLVolumeParams::importLegacyStream(std::istream& input_stream) { //LL_INFOS() << "importing volume" << LL_ENDL; const S32 BUFSIZE = 16384; @@ -4414,17 +4414,17 @@ BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) } } - return TRUE; + return true; } -BOOL LLVolumeParams::exportLegacyStream(std::ostream& output_stream) const +bool LLVolumeParams::exportLegacyStream(std::ostream& output_stream) const { output_stream <<"\tshape 0\n"; output_stream <<"\t{\n"; mPathParams.exportLegacyStream(output_stream); mProfileParams.exportLegacyStream(output_stream); output_stream << "\t}\n"; - return TRUE; + return true; } LLSD LLVolumeParams::sculptAsLLSD() const @@ -4498,12 +4498,12 @@ const F32 MIN_CONCAVE_PATH_WEDGE = 0.111111f; // 1/9 unity // returns TRUE if the shape can be approximated with a convex shape // for collison purposes -BOOL LLVolumeParams::isConvex() const +bool LLVolumeParams::isConvex() const { if (!getSculptID().isNull()) { // can't determine, be safe and say no: - return FALSE; + return false; } F32 path_length = mPathParams.getEnd() - mPathParams.getBegin(); @@ -4516,7 +4516,7 @@ BOOL LLVolumeParams::isConvex() const && LL_PCODE_PATH_LINE != path_type) ) ) { // twist along a "not too short" path is concave - return FALSE; + return false; } F32 profile_length = mProfileParams.getEnd() - mProfileParams.getBegin(); @@ -4540,36 +4540,36 @@ BOOL LLVolumeParams::isConvex() const if (!convex_profile) { // profile is concave - return FALSE; + return false; } if ( LL_PCODE_PATH_LINE == path_type ) { // straight paths with convex profile - return TRUE; + return true; } - BOOL concave_path = (path_length < 1.0f) && (path_length > 0.5f); + bool concave_path = (path_length < 1.0f) && (path_length > 0.5f); if (concave_path) { - return FALSE; + return false; } // we're left with spheres, toroids and tubes if ( LL_PCODE_PROFILE_CIRCLE_HALF == profile_type ) { // at this stage all spheres must be convex - return TRUE; + return true; } // it's a toroid or tube if ( path_length <= MIN_CONCAVE_PATH_WEDGE ) { // effectively convex - return TRUE; + return true; } - return FALSE; + return false; } // debug @@ -4647,7 +4647,7 @@ LLFaceID LLVolume::generateFaceMask() return new_mask; } -BOOL LLVolume::isFaceMaskValid(LLFaceID face_mask) +bool LLVolume::isFaceMaskValid(LLFaceID face_mask) { LLFaceID test_mask = 0; for(S32 i = 0; i < getNumFaces(); i++) @@ -4658,7 +4658,7 @@ BOOL LLVolume::isFaceMaskValid(LLFaceID face_mask) return test_mask == face_mask; } -BOOL LLVolume::isConvex() const +bool LLVolume::isConvex() const { // mParams.isConvex() may return FALSE even though the final // geometry is actually convex due to LOD approximations. @@ -4944,7 +4944,7 @@ void LLVolumeFace::freeData() destroyOctree(); } -BOOL LLVolumeFace::create(LLVolume* volume, BOOL partial_build) +bool LLVolumeFace::create(LLVolume* volume, BOOL partial_build) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME @@ -4952,7 +4952,7 @@ BOOL LLVolumeFace::create(LLVolume* volume, BOOL partial_build) destroyOctree(); LL_CHECK_MEMORY - BOOL ret = FALSE ; + bool ret = false ; if (mTypeMask & CAP_MASK) { ret = createCap(volume, partial_build); @@ -5768,7 +5768,7 @@ void LerpPlanarVertex(LLVolumeFace::VertexData& v0, vout.setNormal(v0.getNormal()); } -BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) +bool LLVolumeFace::createUnCutCubeCap(LLVolume* volume, bool partial_build) { LL_CHECK_MEMORY @@ -6000,11 +6000,11 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) } LL_CHECK_MEMORY - return TRUE; + return true; } -BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) +bool LLVolumeFace::createCap(LLVolume* volume, bool partial_build) { if (!(mTypeMask & HOLLOW_MASK) && !(mTypeMask & OPEN_MASK) && @@ -6210,36 +6210,36 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) (paV[0]*pbV[1] - pbV[0]*paV[1]) + (pbV[0]*p2V[1] - p2V[0]*pbV[1]); - BOOL use_tri1a2 = TRUE; - BOOL tri_1a2 = TRUE; - BOOL tri_21b = TRUE; + bool use_tri1a2 = true; + bool tri_1a2 = true; + bool tri_21b = true; if (area_1a2 < 0) { - tri_1a2 = FALSE; + tri_1a2 = false; } if (area_2ab < 0) { // Can't use, because it contains point b - tri_1a2 = FALSE; + tri_1a2 = false; } if (area_21b < 0) { - tri_21b = FALSE; + tri_21b = false; } if (area_1ba < 0) { // Can't use, because it contains point b - tri_21b = FALSE; + tri_21b = false; } if (!tri_1a2) { - use_tri1a2 = FALSE; + use_tri1a2 = false; } else if (!tri_21b) { - use_tri1a2 = TRUE; + use_tri1a2 = true; } else { @@ -6251,11 +6251,11 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) if (d1.dot3(d1) < d2.dot3(d2)) { - use_tri1a2 = TRUE; + use_tri1a2 = true; } else { - use_tri1a2 = FALSE; + use_tri1a2 = false; } } @@ -6316,36 +6316,36 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) (paV[0]*pbV[1] - pbV[0]*paV[1]) + (pbV[0]*p2V[1] - p2V[0]*pbV[1]); - BOOL use_tri1a2 = TRUE; - BOOL tri_1a2 = TRUE; - BOOL tri_21b = TRUE; + bool use_tri1a2 = true; + bool tri_1a2 = true; + bool tri_21b = true; if (area_1a2 < 0) { - tri_1a2 = FALSE; + tri_1a2 = false; } if (area_2ab < 0) { // Can't use, because it contains point b - tri_1a2 = FALSE; + tri_1a2 = false; } if (area_21b < 0) { - tri_21b = FALSE; + tri_21b = false; } if (area_1ba < 0) { // Can't use, because it contains point b - tri_21b = FALSE; + tri_21b = false; } if (!tri_1a2) { - use_tri1a2 = FALSE; + use_tri1a2 = false; } else if (!tri_21b) { - use_tri1a2 = TRUE; + use_tri1a2 = true; } else { @@ -6356,11 +6356,11 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) if (d1.dot3(d1) < d2.dot3(d2)) { - use_tri1a2 = TRUE; + use_tri1a2 = true; } else { - use_tri1a2 = FALSE; + use_tri1a2 = false; } } @@ -6439,7 +6439,7 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) norm[i].load4a(normal.getF32ptr()); } - return TRUE; + return true; } void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVector4a *normal, @@ -6657,18 +6657,18 @@ void LLVolumeFace::fillFromLegacyData(std::vector<LLVolumeFace::VertexData>& v, } } -BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) +bool LLVolumeFace::createSide(LLVolume* volume, bool partial_build) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME LL_CHECK_MEMORY - BOOL flat = mTypeMask & FLAT_MASK; + bool flat = mTypeMask & FLAT_MASK; U8 sculpt_type = volume->getParams().getSculptType(); U8 sculpt_stitching = sculpt_type & LL_SCULPT_TYPE_MASK; - BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT; - BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR; - BOOL sculpt_reverse_horizontal = (sculpt_invert ? !sculpt_mirror : sculpt_mirror); // XOR + bool sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT; + bool sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR; + bool sculpt_reverse_horizontal = (sculpt_invert ? !sculpt_mirror : sculpt_mirror); // XOR S32 num_vertices, num_indices; @@ -7039,10 +7039,10 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) LLVector4a top; top.setSub(pos[0], pos[mNumS*(mNumT-2)]); - BOOL s_bottom_converges = (top.dot3(top) < 0.000001f); + bool s_bottom_converges = (top.dot3(top) < 0.000001f); top.setSub(pos[mNumS-1], pos[mNumS*(mNumT-2)+mNumS-1]); - BOOL s_top_converges = (top.dot3(top) < 0.000001f); + bool s_top_converges = (top.dot3(top) < 0.000001f); if (sculpt_stitching == LL_SCULPT_TYPE_NONE) // logic for non-sculpt volumes { @@ -7090,20 +7090,20 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) } else // logic for sculpt volumes { - BOOL average_poles = FALSE; - BOOL wrap_s = FALSE; - BOOL wrap_t = FALSE; + bool average_poles = false; + bool wrap_s = false; + bool wrap_t = false; if (sculpt_stitching == LL_SCULPT_TYPE_SPHERE) - average_poles = TRUE; + average_poles = true; if ((sculpt_stitching == LL_SCULPT_TYPE_SPHERE) || (sculpt_stitching == LL_SCULPT_TYPE_TORUS) || (sculpt_stitching == LL_SCULPT_TYPE_CYLINDER)) - wrap_s = TRUE; + wrap_s = true; if (sculpt_stitching == LL_SCULPT_TYPE_TORUS) - wrap_t = TRUE; + wrap_t = true; if (average_poles) @@ -7168,7 +7168,7 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) LL_CHECK_MEMORY - return TRUE; + return true; } //adapted from Lengyel, Eric. "Computing Tangent Space Basis Vectors for an Arbitrary Mesh". Terathon Software 3D Graphics Library, 2001. http://www.terathon.com/code/tangent.html diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 0158ca9bcd..4ea0604f26 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -201,7 +201,7 @@ const U8 LL_SCULPT_FLAG_MASK = LL_SCULPT_FLAG_INVERT | LL_SCULPT_FLAG_MIRROR; const S32 LL_SCULPT_MESH_MAX_FACES = 8; -extern BOOL gDebugGL; +extern bool gDebugGL; class LLProfileParams { @@ -254,11 +254,11 @@ public: void copyParams(const LLProfileParams ¶ms); - BOOL importFile(LLFILE *fp); - BOOL exportFile(LLFILE *fp) const; + bool importFile(LLFILE *fp); + bool exportFile(LLFILE *fp) const; - BOOL importLegacyStream(std::istream& input_stream); - BOOL exportLegacyStream(std::ostream& output_stream) const; + bool importLegacyStream(std::istream& input_stream); + bool exportLegacyStream(std::ostream& output_stream) const; LLSD asLLSD() const; operator LLSD() const { return asLLSD(); } @@ -390,11 +390,11 @@ public: void copyParams(const LLPathParams ¶ms); - BOOL importFile(LLFILE *fp); - BOOL exportFile(LLFILE *fp) const; + bool importFile(LLFILE *fp); + bool exportFile(LLFILE *fp) const; - BOOL importLegacyStream(std::istream& input_stream); - BOOL exportLegacyStream(std::ostream& output_stream) const; + bool importLegacyStream(std::istream& input_stream); + bool exportLegacyStream(std::ostream& output_stream) const; LLSD asLLSD() const; operator LLSD() const { return asLLSD(); } @@ -582,11 +582,11 @@ public: const LLPathParams &getPathParams() const {return mPathParams;} LLPathParams &getPathParams() {return mPathParams;} - BOOL importFile(LLFILE *fp); - BOOL exportFile(LLFILE *fp) const; + bool importFile(LLFILE *fp); + bool exportFile(LLFILE *fp) const; - BOOL importLegacyStream(std::istream& input_stream); - BOOL exportLegacyStream(std::ostream& output_stream) const; + bool importLegacyStream(std::istream& input_stream); + bool exportLegacyStream(std::ostream& output_stream) const; LLSD sculptAsLLSD() const; bool sculptFromLLSD(LLSD& sd); @@ -652,7 +652,7 @@ public: const U8& getSculptType() const { return mSculptType; } bool isSculpt() const; bool isMeshSculpt() const; - BOOL isConvex() const; + bool isConvex() const; // 'begin' and 'end' should be in range [0, 1] (they will be clamped) // (begin, end) = (0, 1) will not change the volume @@ -870,7 +870,7 @@ private: void freeData(); public: - BOOL create(LLVolume* volume, BOOL partial_build = FALSE); + bool create(LLVolume* volume, BOOL partial_build = FALSE); void createTangents(); void resizeVertices(S32 num_verts); @@ -990,9 +990,9 @@ private: LLOctreeNode<LLVolumeTriangle, LLVolumeTriangle*>* mOctree; LLVolumeTriangle* mOctreeTriangles; - BOOL createUnCutCubeCap(LLVolume* volume, BOOL partial_build = FALSE); - BOOL createCap(LLVolume* volume, BOOL partial_build = FALSE); - BOOL createSide(LLVolume* volume, BOOL partial_build = FALSE); + bool createUnCutCubeCap(LLVolume* volume, bool partial_build = false); + bool createCap(LLVolume* volume, bool partial_build = false); + bool createSide(LLVolume* volume, bool partial_build = false); }; class LLVolume : public LLRefCount @@ -1036,10 +1036,10 @@ public: void regen(); void genTangents(S32 face); - BOOL isConvex() const; - BOOL isCap(S32 face); - BOOL isFlat(S32 face); - BOOL isUnique() const { return mUnique; } + bool isConvex() const; + bool isCap(S32 face); + bool isFlat(S32 face); + bool isUnique() const { return mUnique; } S32 getSculptLevel() const { return mSculptLevel; } void setSculptLevel(S32 level) { mSculptLevel = level; } @@ -1069,7 +1069,7 @@ public: LLFaceID generateFaceMask(); - BOOL isFaceMaskValid(LLFaceID face_mask); + bool isFaceMaskValid(LLFaceID face_mask); static S32 sNumMeshPoints; friend std::ostream& operator<<(std::ostream &s, const LLVolume &volume); @@ -1100,7 +1100,7 @@ private: void sculptGenerateSpherePlaceholder(); protected: - BOOL generate(); + bool generate(); void createVolumeFaces(); public: bool unpackVolumeFaces(std::istream& is, S32 size); @@ -1128,7 +1128,7 @@ public: LLAlignedArray<LLVector4a,64> mMesh; - BOOL mGenerateSingleFace; + bool mGenerateSingleFace; face_list_t mVolumeFaces; public: diff --git a/indra/llmath/xform.cpp b/indra/llmath/xform.cpp index 5d8b93d5e8..8999abda60 100644 --- a/indra/llmath/xform.cpp +++ b/indra/llmath/xform.cpp @@ -52,12 +52,12 @@ LLXform* LLXform::getRoot() const return (LLXform*)root; } -BOOL LLXform::isRoot() const +bool LLXform::isRoot() const { return (!mParent); } -BOOL LLXform::isRootEdit() const +bool LLXform::isRootEdit() const { return (!mParent); } diff --git a/indra/llmath/xform.h b/indra/llmath/xform.h index 54b0f6d9ec..96c4ab4d51 100644 --- a/indra/llmath/xform.h +++ b/indra/llmath/xform.h @@ -86,7 +86,7 @@ public: void getLocalMat4(LLMatrix4 &mat) const { mat.initAll(mScale, mRotation, mPosition); } - inline BOOL setParent(LLXform *parent); + inline bool setParent(LLXform *parent); inline void setPosition(const LLVector3& pos); inline void setPosition(const F32 x, const F32 y, const F32 z); @@ -119,8 +119,8 @@ public: LLXform* getParent() const { return mParent; } LLXform* getRoot() const; - virtual BOOL isRoot() const; - virtual BOOL isRootEdit() const; + virtual bool isRoot() const; + virtual bool isRootEdit() const; const LLVector3& getPosition() const { return mPosition; } const LLVector3& getScale() const { return mScale; } @@ -159,12 +159,12 @@ protected: }; -BOOL LLXform::setParent(LLXform* parent) +bool LLXform::setParent(LLXform* parent) { // Validate and make sure we're not creating a loop if (parent == mParent) { - return TRUE; + return true; } if (parent) { @@ -174,13 +174,13 @@ BOOL LLXform::setParent(LLXform* parent) if (cur_par == this) { //warn("LLXform::setParent Creating loop when setting parent!"); - return FALSE; + return false; } cur_par = cur_par->mParent; } } mParent = parent; - return TRUE; + return true; } void LLXform::setPosition(const LLVector3& pos) diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 60d95c3367..2f76e686ec 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -354,9 +354,9 @@ void LLAssetStorage::_init(LLMessageSystem *msg, LLAssetStorage::~LLAssetStorage() { - mShutDown = TRUE; + mShutDown = true; - _cleanupRequests(TRUE, LL_ERR_CIRCUIT_GONE); + _cleanupRequests(true, LL_ERR_CIRCUIT_GONE); if (gMessageSystem) { @@ -378,10 +378,10 @@ void LLAssetStorage::setUpstream(const LLHost &upstream_host) void LLAssetStorage::checkForTimeouts() { - _cleanupRequests(FALSE, LL_ERR_TCP_TIMEOUT); + _cleanupRequests(false, LL_ERR_TCP_TIMEOUT); } -void LLAssetStorage::_cleanupRequests(BOOL all, S32 error) +void LLAssetStorage::_cleanupRequests(bool all, S32 error) { F64Seconds mt_secs = LLMessageSystem::getMessageTimeSeconds(); @@ -436,7 +436,7 @@ void LLAssetStorage::_cleanupRequests(BOOL all, S32 error) } -BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType type) +bool LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType type) { return LLFileSystem::getExists(uuid, type); } @@ -450,7 +450,7 @@ bool LLAssetStorage::findInCacheAndInvokeCallback(const LLUUID& uuid, LLAssetTyp llassert(callback != NULL); } - BOOL exists = LLFileSystem::getExists(uuid, type); + bool exists = LLFileSystem::getExists(uuid, type); if (exists) { LLFileSystem file(uuid, type); @@ -482,7 +482,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LLAssetStorage::LLGetAssetCallback callback, void *user_data, - BOOL is_priority) + bool is_priority) { LL_DEBUGS("AssetStorage") << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << LL_ENDL; @@ -523,7 +523,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, return; } - BOOL exists = LLFileSystem::getExists(uuid, type); + bool exists = LLFileSystem::getExists(uuid, type); LLFileSystem file(uuid, type); U32 size = exists ? file.getSize() : 0; @@ -547,7 +547,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, file.remove(); } - BOOL duplicate = FALSE; + bool duplicate = false; // check to see if there's a pending download of this uuid already for (request_list_t::iterator iter = mPendingDownloads.begin(); @@ -566,7 +566,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, // this is a duplicate request // queue the request, but don't actually ask for it again - duplicate = TRUE; + duplicate = true; } } if (duplicate) @@ -700,7 +700,7 @@ void LLAssetStorage::getEstateAsset( EstateAssetType etype, LLGetAssetCallback callback, void *user_data, - BOOL is_priority) + bool is_priority) { LL_DEBUGS() << "LLAssetStorage::getEstateAsset() - " << asset_id << "," << LLAssetType::lookup(atype) << ", estatetype " << etype << LL_ENDL; @@ -724,7 +724,7 @@ void LLAssetStorage::getEstateAsset( return; } - BOOL exists = LLFileSystem::getExists(asset_id, atype); + bool exists = LLFileSystem::getExists(asset_id, atype); LLFileSystem file(asset_id, atype); U32 size = exists ? file.getSize() : 0; @@ -846,7 +846,7 @@ void LLAssetStorage::getInvItemAsset( LLAssetType::EType atype, LLGetAssetCallback callback, void *user_data, - BOOL is_priority) + bool is_priority) { LL_DEBUGS() << "LLAssetStorage::getInvItemAsset() - " << asset_id << "," << LLAssetType::lookup(atype) << LL_ENDL; @@ -995,12 +995,12 @@ void LLAssetStorage::uploadCompleteCallback( return; } LLAssetRequest *req = (LLAssetRequest *)user_data; - BOOL success = TRUE; + bool success = true; if (result) { LL_WARNS("AssetStorage") << "LLAssetStorage::uploadCompleteCallback " << result << ":" << getErrorString(result) << " trying to upload file to upstream provider" << LL_ENDL; - success = FALSE; + success = false; } // we're done grabbing the file, tell the client @@ -1030,7 +1030,7 @@ void LLAssetStorage::processUploadComplete(LLMessageSystem *msg, void **user_dat this_ptr->_callUploadCallbacks(uuid, asset_type, success, LLExtStat::NONE); } -void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType asset_type, BOOL success, LLExtStat ext_status ) +void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType asset_type, bool success, LLExtStat ext_status ) { // SJB: We process the callbacks in reverse order, I do not know if this is important, // but I didn't want to mess with it. @@ -1348,7 +1348,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, S32, LLExtStat), void *user_data, - BOOL is_priority) + bool is_priority) { // check for duplicates here, since we're about to fool the normal duplicate checker for (request_list_t::iterator iter = mPendingDownloads.begin(); @@ -1391,7 +1391,7 @@ void LLAssetStorage::legacyGetDataCallback(const LLUUID &uuid, std::string filename; // Check if the asset is marked toxic, and don't load bad stuff - BOOL toxic = gAssetStorage->isAssetToxic( uuid ); + bool toxic = gAssetStorage->isAssetToxic( uuid ); if ( !status && !toxic ) @@ -1489,9 +1489,9 @@ void LLAssetStorage::reportMetric( const LLUUID& asset_id, const LLAssetType::ET // Check if an asset is in the toxic map. If it is, the entry is updated -BOOL LLAssetStorage::isAssetToxic( const LLUUID& uuid ) +bool LLAssetStorage::isAssetToxic( const LLUUID& uuid ) { - BOOL is_toxic = FALSE; + bool is_toxic = false; if ( !uuid.isNull() ) { @@ -1499,8 +1499,8 @@ BOOL LLAssetStorage::isAssetToxic( const LLUUID& uuid ) if ( iter != mToxicAssetMap.end() ) { // Found toxic asset (*iter).second = LLFrameTimer::getTotalTime() + TOXIC_ASSET_LIFETIME; - is_toxic = TRUE; - } + is_toxic = true; + } } return is_toxic; } @@ -1509,7 +1509,7 @@ BOOL LLAssetStorage::isAssetToxic( const LLUUID& uuid ) // Clean the toxic asset list, remove old entries -void LLAssetStorage::flushOldToxicAssets( BOOL force_it ) +void LLAssetStorage::flushOldToxicAssets( bool force_it ) { // Scan and look for old entries U64 now = LLFrameTimer::getTotalTime(); diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index 274e6a50ad..d9c95485f6 100644 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -232,11 +232,11 @@ public: void setUpstream(const LLHost &upstream_host); - BOOL hasLocalAsset(const LLUUID &uuid, LLAssetType::EType type); + bool hasLocalAsset(const LLUUID &uuid, LLAssetType::EType type); // public interface methods // note that your callback may get called BEFORE the function returns - void getAssetData(const LLUUID uuid, LLAssetType::EType atype, LLGetAssetCallback cb, void *user_data, BOOL is_priority = FALSE); + void getAssetData(const LLUUID uuid, LLAssetType::EType atype, LLGetAssetCallback cb, void *user_data, bool is_priority = false); /* * TransactionID version @@ -259,19 +259,19 @@ public: void getEstateAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id, const LLUUID &asset_id, LLAssetType::EType atype, EstateAssetType etype, - LLGetAssetCallback callback, void *user_data, BOOL is_priority); + LLGetAssetCallback callback, void *user_data, bool is_priority); void getInvItemAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id, const LLUUID &owner_id, const LLUUID &task_id, const LLUUID &item_id, const LLUUID &asset_id, LLAssetType::EType atype, - LLGetAssetCallback cb, void *user_data, BOOL is_priority = FALSE); // Get a particular inventory item. + LLGetAssetCallback cb, void *user_data, bool is_priority = false); // Get a particular inventory item. // Check if an asset is in the toxic map. If it is, the entry is updated - BOOL isAssetToxic( const LLUUID& uuid ); + bool isAssetToxic( const LLUUID& uuid ); // Clean the toxic asset list, remove old entries - void flushOldToxicAssets( BOOL force_it ); + void flushOldToxicAssets( bool force_it ); // Add an item to the toxic asset map void markAssetToxic( const LLUUID& uuid ); @@ -352,7 +352,7 @@ public: // deprecated file-based methods // Not overriden - void getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32, LLExtStat), void *user_data, BOOL is_priority = FALSE); + void getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32, LLExtStat), void *user_data, bool is_priority = false); /* * TransactionID version @@ -374,12 +374,12 @@ public: // add extra methods to handle metadata protected: - void _cleanupRequests(BOOL all, S32 error); - void _callUploadCallbacks(const LLUUID &uuid, const LLAssetType::EType asset_type, BOOL success, LLExtStat ext_status); + void _cleanupRequests(bool all, S32 error); + void _callUploadCallbacks(const LLUUID &uuid, const LLAssetType::EType asset_type, bool success, LLExtStat ext_status); virtual void _queueDataRequest(const LLUUID& uuid, LLAssetType::EType type, LLGetAssetCallback callback, - void *user_data, BOOL duplicate, - BOOL is_priority) = 0; + void *user_data, bool duplicate, + bool is_priority) = 0; private: void _init(LLMessageSystem *msg, diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index a2e85cf6c2..59dd64336e 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -215,7 +215,7 @@ public: Impl(LLMessageSystem* msg); ~Impl(); - BOOL getName(const LLUUID& id, std::string& first, std::string& last); + bool getName(const LLUUID& id, std::string& first, std::string& last); boost::signals2::connection addPending(const LLUUID& id, const LLCacheNameCallback& callback); void addPending(const LLUUID& id, const LLHost& host); @@ -402,13 +402,13 @@ void LLCacheName::exportFile(std::ostream& ostr) } -BOOL LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::string& last) +bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::string& last) { if(id.isNull()) { first = sCacheName["nobody"]; last.clear(); - return TRUE; + return true; } LLCacheNameEntry* entry = get_ptr_in_map(mCache, id ); @@ -416,7 +416,7 @@ BOOL LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::strin { first = entry->mFirstName; last = entry->mLastName; - return TRUE; + return true; } else { @@ -426,7 +426,7 @@ BOOL LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::strin { mAskNameQueue.insert(id); } - return FALSE; + return false; } } @@ -440,22 +440,22 @@ void LLCacheName::localizeCacheName(std::string key, std::string value) LL_WARNS()<< " Error localizing cache key " << key << " To "<< value<<LL_ENDL; } -BOOL LLCacheName::getFullName(const LLUUID& id, std::string& fullname) +bool LLCacheName::getFullName(const LLUUID& id, std::string& fullname) { std::string first_name, last_name; - BOOL res = impl.getName(id, first_name, last_name); + bool res = impl.getName(id, first_name, last_name); fullname = buildFullName(first_name, last_name); return res; } -BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group) +bool LLCacheName::getGroupName(const LLUUID& id, std::string& group) { if(id.isNull()) { group = sCacheName["none"]; - return TRUE; + return true; } LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache,id); @@ -471,7 +471,7 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group) if (entry) { group = entry->mGroupName; - return TRUE; + return true; } else { @@ -480,27 +480,27 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group) { impl.mAskGroupQueue.insert(id); } - return FALSE; + return false; } } -BOOL LLCacheName::getUUID(const std::string& first, const std::string& last, LLUUID& id) +bool LLCacheName::getUUID(const std::string& first, const std::string& last, LLUUID& id) { std::string full_name = buildFullName(first, last); return getUUID(full_name, id); } -BOOL LLCacheName::getUUID(const std::string& full_name, LLUUID& id) +bool LLCacheName::getUUID(const std::string& full_name, LLUUID& id) { ReverseCache::iterator iter = impl.mReverseCache.find(full_name); if (iter != impl.mReverseCache.end()) { id = iter->second; - return TRUE; + return true; } else { - return FALSE; + return false; } } diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h index d238c3a247..d4c18d4d4c 100644 --- a/indra/llmessage/llcachename.h +++ b/indra/llmessage/llcachename.h @@ -71,11 +71,11 @@ public: // If available, copies name ("bobsmith123" or "James Linden") into string // If not available, copies the string "waiting". // Returns TRUE iff available. - BOOL getFullName(const LLUUID& id, std::string& full_name); + bool getFullName(const LLUUID& id, std::string& full_name); // Reverse lookup of UUID from name - BOOL getUUID(const std::string& first, const std::string& last, LLUUID& id); - BOOL getUUID(const std::string& fullname, LLUUID& id); + bool getUUID(const std::string& first, const std::string& last, LLUUID& id); + bool getUUID(const std::string& fullname, LLUUID& id); // IDEVO Temporary code // Clean up new-style "bobsmith123 Resident" names to "bobsmith123" for display @@ -100,7 +100,7 @@ public: // provided. The caller must allocate at least // DB_GROUP_NAME_BUF_SIZE characters. If not available, this // method copies the string "waiting". Returns TRUE iff available. - BOOL getGroupName(const LLUUID& id, std::string& group); + bool getGroupName(const LLUUID& id, std::string& group); // Call the callback with the group or avatar name. // If the data is currently available, may call the callback immediatly diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index a9a292958f..bb667201a0 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -282,7 +282,7 @@ S32 LLCircuitData::resendUnackedPackets(const F64Seconds now) // reliable_iter iter; - BOOL have_resend_overflow = FALSE; + bool have_resend_overflow = false; for (iter = mUnackedPackets.begin(); iter != mUnackedPackets.end();) { packetp = iter->second; @@ -488,7 +488,7 @@ void LLCircuit::removeCircuitData(const LLHost &host) mLastCircuit = NULL; } -void LLCircuitData::setAlive(BOOL b_alive) +void LLCircuitData::setAlive(bool b_alive) { if (mbAlive != b_alive) { @@ -500,12 +500,12 @@ void LLCircuitData::setAlive(BOOL b_alive) { mLastPingReceivedTime = LLMessageSystem::getMessageTimeSeconds(); mPingsInTransit = 0; - mBlocked = FALSE; + mBlocked = false; } } -void LLCircuitData::setAllowTimeout(BOOL allow) +void LLCircuitData::setAllowTimeout(bool allow) { mbAllowTimeout = allow; @@ -513,7 +513,7 @@ void LLCircuitData::setAllowTimeout(BOOL allow) { // resuming circuit // make sure it's alive - setAlive(TRUE); + setAlive(true); } } @@ -599,7 +599,7 @@ void LLCircuit::resendUnackedPackets(S32& unacked_list_length, S32& unacked_list } -BOOL LLCircuitData::isDuplicateResend(TPACKETID packetnum) +bool LLCircuitData::isDuplicateResend(TPACKETID packetnum) { return (mRecentlyReceivedReliablePackets.find(packetnum) != mRecentlyReceivedReliablePackets.end()); } @@ -632,7 +632,7 @@ LLCircuitData* LLCircuit::findCircuit(const LLHost& host) const } -BOOL LLCircuit::isCircuitAlive(const LLHost& host) const +bool LLCircuit::isCircuitAlive(const LLHost& host) const { LLCircuitData *cdp = findCircuit(host); if(cdp) @@ -640,7 +640,7 @@ BOOL LLCircuit::isCircuitAlive(const LLHost& host) const return cdp->mbAlive; } - return FALSE; + return false; } void LLCircuitData::setTimeoutCallback(void (*callback_func)(const LLHost &host, void *user_data), void *user_data) @@ -649,7 +649,7 @@ void LLCircuitData::setTimeoutCallback(void (*callback_func)(const LLHost &host, mTimeoutUserData = user_data; } -void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) +void LLCircuitData::checkPacketInID(TPACKETID id, bool receive_resent) { // Done as floats so we don't have to worry about running out of room // with U32 getting poked into an S32. @@ -844,7 +844,7 @@ void LLCircuit::updateWatchDogTimers(LLMessageSystem *msgsys) } -BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) +bool LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) { F64Seconds cur_time = LLMessageSystem::getMessageTimeSeconds(); mLastPingSendTime = cur_time; @@ -852,7 +852,7 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) if (!checkCircuitTimeout()) { // Pass this back to the calling LLCircuit, this circuit needs to be cleaned up. - return FALSE; + return false; } // WARNING! @@ -866,7 +866,7 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) // This is to handle the case if we actually manage to wrap our // packet IDs - the oldest will actually have a higher packet ID // than the current. - BOOL wrapped = FALSE; + bool wrapped = false; reliable_iter iter; iter = mUnackedPackets.upper_bound(getPacketOutID()); if (iter == mUnackedPackets.end()) @@ -874,19 +874,19 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) // Nothing AFTER this one, so we want the lowest packet ID // then. iter = mUnackedPackets.begin(); - wrapped = TRUE; + wrapped = true; } TPACKETID packet_id = 0; // Check against the "final" packets - BOOL wrapped_final = FALSE; + bool wrapped_final = false; reliable_iter iter_final; iter_final = mFinalRetryPackets.upper_bound(getPacketOutID()); if (iter_final == mFinalRetryPackets.end()) { iter_final = mFinalRetryPackets.begin(); - wrapped_final = TRUE; + wrapped_final = true; } //LL_INFOS() << mHost << " - unacked count " << mUnackedPackets.size() << LL_ENDL; @@ -922,12 +922,12 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) } else { - BOOL had_unacked = FALSE; + bool had_unacked = false; if (iter != mUnackedPackets.end()) { // Unacked list has the lowest so far packet_id = iter->first; - had_unacked = TRUE; + had_unacked = true; //LL_INFOS() << mHost << ": Unacked" << LL_ENDL; } @@ -989,7 +989,7 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) } } - return TRUE; + return true; } @@ -1041,7 +1041,7 @@ void LLCircuitData::clearDuplicateList(TPACKETID oldest_id) //LL_INFOS() << "Recent list after: " << mRecentlyReceivedReliablePackets.size() << LL_ENDL; } -BOOL LLCircuitData::checkCircuitTimeout() +bool LLCircuitData::checkCircuitTimeout() { F64Seconds time_since_last_ping = LLMessageSystem::getMessageTimeSeconds() - mLastPingReceivedTime; @@ -1049,7 +1049,7 @@ BOOL LLCircuitData::checkCircuitTimeout() if (time_since_last_ping > mHeartbeatTimeout) { LL_WARNS() << "LLCircuitData::checkCircuitTimeout for " << mHost << " last ping " << time_since_last_ping << " seconds ago." <<LL_ENDL; - setAlive(FALSE); + setAlive(false); if (mTimeoutCallback) { LL_WARNS() << "LLCircuitData::checkCircuitTimeout for " << mHost << " calling callback." << LL_ENDL; @@ -1059,16 +1059,16 @@ BOOL LLCircuitData::checkCircuitTimeout() { // The callback didn't try and resurrect the circuit. We should kill it. LL_WARNS() << "LLCircuitData::checkCircuitTimeout for " << mHost << " still dead, dropping." << LL_ENDL; - return FALSE; + return false; } } - return TRUE; + return true; } // Call this method when a reliable message comes in - this will // correctly place the packet in the correct list to be acked later. -BOOL LLCircuitData::collectRAck(TPACKETID packet_num) +bool LLCircuitData::collectRAck(TPACKETID packet_num) { if (mAcks.empty()) { @@ -1081,7 +1081,7 @@ BOOL LLCircuitData::collectRAck(TPACKETID packet_num) { mAckCreationTime = getAgeInSeconds(); } - return TRUE; + return true; } // this method is called during the message system processAcks() to @@ -1303,7 +1303,7 @@ void LLCircuitData::pingTimerStart() if (!mBlocked && (mPingsInTransit > PING_START_BLOCK)) { - mBlocked = TRUE; + mBlocked = true; } } @@ -1344,19 +1344,19 @@ U32 LLCircuitData::getPacketsLost() const } -BOOL LLCircuitData::isAlive() const +bool LLCircuitData::isAlive() const { return mbAlive; } -BOOL LLCircuitData::isBlocked() const +bool LLCircuitData::isBlocked() const { return mBlocked; } -BOOL LLCircuitData::getAllowTimeout() const +bool LLCircuitData::getAllowTimeout() const { return mbAllowTimeout; } @@ -1402,13 +1402,13 @@ F32Milliseconds LLCircuitData::getPingDelayAveraged() } -BOOL LLCircuitData::getTrusted() const +bool LLCircuitData::getTrusted() const { return mTrusted; } -void LLCircuitData::setTrusted(BOOL t) +void LLCircuitData::setTrusted(bool t) { mTrusted = t; } diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index b8021bc9f0..95e470b543 100644 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -100,7 +100,7 @@ public: void setRemoteID(const LLUUID& id) { mRemoteID = id; } void setRemoteSessionID(const LLUUID& id) { mRemoteSessionID = id; } - void setTrusted(BOOL t); + void setTrusted(bool t); // The local end point ID is used when establishing a trusted circuit. // no matching set function for getLocalEndPointID() @@ -111,9 +111,9 @@ public: S32 getPingsInTransit() const { return mPingsInTransit; } // ACCESSORS - BOOL isAlive() const; - BOOL isBlocked() const; - BOOL getAllowTimeout() const; + bool isAlive() const; + bool isBlocked() const; + bool getAllowTimeout() const; F32Milliseconds getPingDelayAveraged(); F32Milliseconds getPingInTransitTime(); U32 getPacketsIn() const; @@ -122,7 +122,7 @@ public: U32 getPacketsOut() const; U32 getPacketsLost() const; TPACKETID getPacketOutID() const; - BOOL getTrusted() const; + bool getTrusted() const; F32 getAgeInSeconds() const; S32 getUnackedPacketCount() const { return mUnackedPacketCount; } S32 getUnackedPacketBytes() const { return mUnackedPacketBytes; } @@ -164,31 +164,31 @@ public: protected: TPACKETID nextPacketOutID(); void setPacketInID(TPACKETID id); - void checkPacketInID(TPACKETID id, BOOL receive_resent); + void checkPacketInID(TPACKETID id, bool receive_resent); void setPingDelay(U32Milliseconds ping); - BOOL checkCircuitTimeout(); // Return FALSE if the circuit is dead and should be cleaned up + bool checkCircuitTimeout(); // Return false if the circuit is dead and should be cleaned up void addBytesIn(S32Bytes bytes); void addBytesOut(S32Bytes bytes); U8 nextPingID() { mLastPingID++; return mLastPingID; } - BOOL updateWatchDogTimers(LLMessageSystem *msgsys); // Return FALSE if the circuit is dead and should be cleaned up + bool updateWatchDogTimers(LLMessageSystem *msgsys); // Return false if the circuit is dead and should be cleaned up void addReliablePacket(S32 mSocket, U8 *buf_ptr, S32 buf_len, LLReliablePacketParams *params); - BOOL isDuplicateResend(TPACKETID packetnum); + bool isDuplicateResend(TPACKETID packetnum); // Call this method when a reliable message comes in - this will // correctly place the packet in the correct list to be acked // later. RAack = requested ack - BOOL collectRAck(TPACKETID packet_num); + bool collectRAck(TPACKETID packet_num); void setTimeoutCallback(void (*callback_func)(const LLHost &host, void *user_data), void *user_data); - void setAlive(BOOL b_alive); - void setAllowTimeout(BOOL allow); + void setAlive(bool b_alive); + void setAllowTimeout(bool allow); protected: // Identification for this circuit. @@ -212,12 +212,12 @@ protected: void (*mTimeoutCallback)(const LLHost &host, void *user_data); void *mTimeoutUserData; - BOOL mTrusted; // Is this circuit trusted? - BOOL mbAllowTimeout; // Machines can "pause" circuits, forcing them not to be dropped + bool mTrusted; // Is this circuit trusted? + bool mbAllowTimeout; // Machines can "pause" circuits, forcing them not to be dropped - BOOL mbAlive; // Indicates whether a circuit is "alive", i.e. responded to pings + bool mbAlive; // Indicates whether a circuit is "alive", i.e. responded to pings - BOOL mBlocked; // Blocked is true if the circuit is hosed, i.e. far behind on pings + bool mBlocked; // Blocked is true if the circuit is hosed, i.e. far behind on pings // Not sure what the difference between this and mLastPingSendTime is F64Seconds mPingTime; // Time at which a ping was sent. @@ -293,7 +293,7 @@ public: // ACCESSORS LLCircuitData* findCircuit(const LLHost& host) const; - BOOL isCircuitAlive(const LLHost& host) const; + bool isCircuitAlive(const LLHost& host) const; // MANIPULATORS LLCircuitData *addCircuitData(const LLHost &host, TPACKETID in_id); diff --git a/indra/llmessage/llclassifiedflags.cpp b/indra/llmessage/llclassifiedflags.cpp index f6084d4a60..bf8c9171a7 100644 --- a/indra/llmessage/llclassifiedflags.cpp +++ b/indra/llmessage/llclassifiedflags.cpp @@ -36,7 +36,7 @@ #include "llclassifiedflags.h" -ClassifiedFlags pack_classified_flags_request(BOOL auto_renew, BOOL inc_pg, BOOL inc_mature, BOOL inc_adult) +ClassifiedFlags pack_classified_flags_request(bool auto_renew, bool inc_pg, bool inc_mature, bool inc_adult) { U8 rv = 0; if(inc_pg) rv |= CLASSIFIED_QUERY_INC_PG; @@ -47,7 +47,7 @@ ClassifiedFlags pack_classified_flags_request(BOOL auto_renew, BOOL inc_pg, BOOL return rv; } -ClassifiedFlags pack_classified_flags(BOOL auto_renew, BOOL inc_pg, BOOL inc_mature, BOOL inc_adult) +ClassifiedFlags pack_classified_flags(bool auto_renew, bool inc_pg, bool inc_mature, bool inc_adult) { U8 rv = 0; if(inc_pg) rv |= CLASSIFIED_QUERY_INC_PG; diff --git a/indra/llmessage/llclassifiedflags.h b/indra/llmessage/llclassifiedflags.h index 17fc867453..0365ea8f09 100644 --- a/indra/llmessage/llclassifiedflags.h +++ b/indra/llmessage/llclassifiedflags.h @@ -51,7 +51,7 @@ const S32 MAX_CLASSIFIEDS = 100; // This function is used in AO viewers to pack old query flags into the request // so that they can talk to old dataservers properly. When the AO servers are deployed on agni // we can revert back to ClassifiedFlags pack_classified_flags and get rider of this one. -ClassifiedFlags pack_classified_flags_request(BOOL auto_renew, BOOL is_pg, BOOL is_mature, BOOL is_adult); +ClassifiedFlags pack_classified_flags_request(bool auto_renew, bool is_pg, bool is_mature, bool is_adult); ClassifiedFlags pack_classified_flags(BOOL auto_renew, BOOL is_pg, BOOL is_mature, BOOL is_adult); bool is_cf_mature(ClassifiedFlags flags); diff --git a/indra/llmessage/llhost.cpp b/indra/llmessage/llhost.cpp index ae5c2ecf69..30e4109729 100644 --- a/indra/llmessage/llhost.cpp +++ b/indra/llmessage/llhost.cpp @@ -103,7 +103,7 @@ std::string LLHost::getHostName() const } } -BOOL LLHost::setHostByName(const std::string& hostname) +bool LLHost::setHostByName(const std::string& hostname) { hostent *he; std::string local_name(hostname); @@ -123,7 +123,7 @@ BOOL LLHost::setHostByName(const std::string& hostname) if (he) { mIP = *(U32 *)he->h_addr_list[0]; - return TRUE; + return true; } else { @@ -147,7 +147,7 @@ BOOL LLHost::setHostByName(const std::string& hostname) LL_WARNS() << "LLHost::setAddress(): unknown error - " << error_number << LL_ENDL; break; } - return FALSE; + return false; } } diff --git a/indra/llmessage/llhost.h b/indra/llmessage/llhost.h index 79cad4b123..dd12e381d4 100644 --- a/indra/llmessage/llhost.h +++ b/indra/llmessage/llhost.h @@ -80,7 +80,7 @@ public: void setAddress( const std::string& ipstr ) { mIP = ip_string_to_u32(ipstr.c_str()); } void setAddress( U32 ip ) { mIP = ip; } void setPort( U32 port ) { mPort = port; } - BOOL setHostByName(const std::string& hname); + bool setHostByName(const std::string& hname); LLHost& operator=(const LLHost &rhs); void invalidate() { mIP = INVALID_HOST_IP_ADDRESS; mPort = INVALID_PORT;}; diff --git a/indra/llmessage/llinstantmessage.cpp b/indra/llmessage/llinstantmessage.cpp index dd5a655d7e..52102e55c8 100644 --- a/indra/llmessage/llinstantmessage.cpp +++ b/indra/llmessage/llinstantmessage.cpp @@ -54,7 +54,7 @@ const S32 IM_TTL = 1; void pack_instant_message( LLMessageSystem* msg, const LLUUID& from_id, - BOOL from_group, + bool from_group, const LLUUID& session_id, const LLUUID& to_id, const std::string& name, @@ -93,7 +93,7 @@ void pack_instant_message( void pack_instant_message_block( LLMessageSystem* msg, const LLUUID& from_id, - BOOL from_group, + bool from_group, const LLUUID& session_id, const LLUUID& to_id, const std::string& name, diff --git a/indra/llmessage/llinstantmessage.h b/indra/llmessage/llinstantmessage.h index 55cda15405..383fe2591a 100644 --- a/indra/llmessage/llinstantmessage.h +++ b/indra/llmessage/llinstantmessage.h @@ -180,7 +180,7 @@ extern const S32 IM_TTL; void pack_instant_message( LLMessageSystem* msgsystem, const LLUUID& from_id, - BOOL from_group, + bool from_group, const LLUUID& session_id, const LLUUID& to_id, const std::string& name, @@ -198,7 +198,7 @@ void pack_instant_message( void pack_instant_message_block( LLMessageSystem* msgsystem, const LLUUID& from_id, - BOOL from_group, + bool from_group, const LLUUID& session_id, const LLUUID& to_id, const std::string& name, diff --git a/indra/llmessage/llmail.cpp b/indra/llmessage/llmail.cpp index fcda2a85f6..b22cd8cccd 100644 --- a/indra/llmessage/llmail.cpp +++ b/indra/llmessage/llmail.cpp @@ -102,7 +102,7 @@ void disconnect_smtp() // Returns TRUE on success. // message should NOT be SMTP escaped. // static -BOOL LLMail::send( +bool LLMail::send( const char* from_name, const char* from_address, const char* to_name, @@ -120,7 +120,7 @@ BOOL LLMail::send( headers); if(header.empty()) { - return FALSE; + return false; } std::string message_str; @@ -129,8 +129,8 @@ BOOL LLMail::send( message_str = message; } bool rv = send(header, message_str, to_address, from_address); - if(rv) return TRUE; - return FALSE; + if(rv) return true; + return false; } // static diff --git a/indra/llmessage/llmail.h b/indra/llmessage/llmail.h index 3791714363..f97a443c47 100644 --- a/indra/llmessage/llmail.h +++ b/indra/llmessage/llmail.h @@ -48,7 +48,7 @@ public: * @param to_address The email recipient address * @param subject The subject of the email * @param headers optional X-Foo headers in an llsd map. - * @return Returns TRUE if the call succeeds, FALSE otherwise. + * @return Returns true if the call succeeds, false otherwise. * * Results in: * From: "from_name" <from_address> @@ -57,7 +57,7 @@ public: * * message */ - static BOOL send( + static bool send( const char* from_name, const char* from_address, const char* to_name, diff --git a/indra/llmessage/llmessagebuilder.h b/indra/llmessage/llmessagebuilder.h index bf5be929f2..75bd5f5cc7 100644 --- a/indra/llmessage/llmessagebuilder.h +++ b/indra/llmessage/llmessagebuilder.h @@ -49,14 +49,14 @@ public: virtual void newMessage(const char* name) = 0; virtual void nextBlock(const char* blockname) = 0; - virtual BOOL removeLastBlock() = 0; // TODO: babbage: remove this horror + virtual bool removeLastBlock() = 0; // TODO: babbage: remove this horror /** All add* methods expect pointers to canonical strings. */ virtual void addBinaryData( const char* varname, const void* data, S32 size) = 0; - virtual void addBOOL(const char* varname, BOOL b) = 0; + virtual void addBOOL(const char* varname, bool b) = 0; virtual void addS8(const char* varname, S8 s) = 0; virtual void addU8(const char* varname, U8 u) = 0; virtual void addS16(const char* varname, S16 i) = 0; @@ -76,12 +76,12 @@ public: virtual void addString(const char* varname, const char* s) = 0; virtual void addString(const char* varname, const std::string& s) = 0; - virtual BOOL isMessageFull(const char* blockname) const = 0; + virtual bool isMessageFull(const char* blockname) const = 0; virtual void compressMessage(U8*& buf_ptr, U32& buffer_length) = 0; virtual S32 getMessageSize() = 0; - virtual BOOL isBuilt() const = 0; - virtual BOOL isClear() const = 0; + virtual bool isBuilt() const = 0; + virtual bool isClear() const = 0; virtual U32 buildMessage( U8* buffer, U32 buffer_size, @@ -90,7 +90,7 @@ public: virtual void clearMessage() = 0; // TODO: babbage: remove this horror - virtual void setBuilt(BOOL b) = 0; + virtual void setBuilt(bool b) = 0; virtual const char* getMessageName() const = 0; diff --git a/indra/llmessage/llmessagereader.cpp b/indra/llmessage/llmessagereader.cpp index 1d1bee7f59..4a6f5145b3 100644 --- a/indra/llmessage/llmessagereader.cpp +++ b/indra/llmessage/llmessagereader.cpp @@ -27,7 +27,7 @@ #include "linden_common.h" #include "llmessagereader.h" -static BOOL sTimeDecodes = FALSE; +static bool sTimeDecodes = false; static F32 sTimeDecodesSpamThreshold = 0.05f; @@ -38,7 +38,7 @@ LLMessageReader::~LLMessageReader() } //static -void LLMessageReader::setTimeDecodes(BOOL b) +void LLMessageReader::setTimeDecodes(bool b) { sTimeDecodes = b; } @@ -49,8 +49,8 @@ void LLMessageReader::setTimeDecodesSpamThreshold(F32 seconds) sTimeDecodesSpamThreshold = seconds; } -//static -BOOL LLMessageReader::getTimeDecodes() +//static +bool LLMessageReader::getTimeDecodes() { return sTimeDecodes; } diff --git a/indra/llmessage/llmessagereader.h b/indra/llmessage/llmessagereader.h index 647f267785..2f64371f63 100644 --- a/indra/llmessage/llmessagereader.h +++ b/indra/llmessage/llmessagereader.h @@ -84,8 +84,9 @@ class LLMessageReader virtual void copyToBuilder(LLMessageBuilder&) const = 0; - static void setTimeDecodes(BOOL b); - static BOOL getTimeDecodes(); + + static void setTimeDecodes(bool b); + static bool getTimeDecodes(); static void setTimeDecodesSpamThreshold(F32 seconds); static F32 getTimeDecodesSpamThreshold(); }; diff --git a/indra/llmessage/llmessagetemplateparser.cpp b/indra/llmessage/llmessagetemplateparser.cpp index 1f7c09dbe5..3e81fed49e 100644 --- a/indra/llmessage/llmessagetemplateparser.cpp +++ b/indra/llmessage/llmessagetemplateparser.cpp @@ -42,7 +42,7 @@ // * - repeat last check // checks 'a' -BOOL b_return_alphanumeric_ok(char c) +bool b_return_alphanumeric_ok(char c) { if ( ( (c < 'A') ||(c > 'Z')) @@ -51,26 +51,26 @@ BOOL b_return_alphanumeric_ok(char c) &&( (c < '0') ||(c > '9'))) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 'c' -BOOL b_return_character_ok(char c) +bool b_return_character_ok(char c) { if ( ( (c < 'A') ||(c > 'Z')) &&( (c < 'a') ||(c > 'z'))) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 'f' -BOOL b_return_first_variable_ok(char c) +bool b_return_first_variable_ok(char c) { if ( ( (c < 'A') ||(c > 'Z')) @@ -78,13 +78,13 @@ BOOL b_return_first_variable_ok(char c) ||(c > 'z')) &&(c != '_')) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 'v' -BOOL b_return_variable_ok(char c) +bool b_return_variable_ok(char c) { if ( ( (c < 'A') ||(c > 'Z')) @@ -94,35 +94,35 @@ BOOL b_return_variable_ok(char c) ||(c > '9')) &&(c != '_')) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 's' -BOOL b_return_signed_integer_ok(char c) +bool b_return_signed_integer_ok(char c) { if ( ( (c < '0') ||(c > '9')) &&(c != '-')) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 'd' -BOOL b_return_integer_ok(char c) +bool b_return_integer_ok(char c) { if ( (c < '0') ||(c > '9')) { - return FALSE; + return false; } - return TRUE; + return true; } -BOOL (*gParseCheckCharacters[])(char c) = +bool (*gParseCheckCharacters[])(char c) = { b_return_alphanumeric_ok, b_return_character_ok, @@ -156,7 +156,7 @@ S32 get_checker_number(char checker) } // check token based on passed simplified regular expression -BOOL b_check_token(const char *token, const char *regexp) +bool b_check_token(const char *token, const char *regexp) { S32 tptr, rptr = 0; S32 current_checker, next_checker = 0; @@ -166,13 +166,13 @@ BOOL b_check_token(const char *token, const char *regexp) if (current_checker == -1) { LL_ERRS() << "Invalid regular expression value!" << LL_ENDL; - return FALSE; + return false; } if (current_checker == 9999) { LL_ERRS() << "Regular expression can't start with *!" << LL_ENDL; - return FALSE; + return false; } for (tptr = 0; token[tptr]; tptr++) @@ -196,40 +196,40 @@ BOOL b_check_token(const char *token, const char *regexp) } } } - return TRUE; + return true; } // C variable can be made up of upper or lower case letters, underscores, or numbers, but can't start with a number -BOOL b_variable_ok(const char *token) +bool b_variable_ok(const char *token) { if (!b_check_token(token, "fv*")) { LL_WARNS() << "Token '" << token << "' isn't a variable!" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } // An integer is made up of the digits 0-9 and may be preceded by a '-' -BOOL b_integer_ok(const char *token) +bool b_integer_ok(const char *token) { if (!b_check_token(token, "sd*")) { LL_WARNS() << "Token isn't an integer!" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } // An integer is made up of the digits 0-9 -BOOL b_positive_integer_ok(const char *token) +bool b_positive_integer_ok(const char *token) { if (!b_check_token(token, "d*")) { LL_WARNS() << "Token isn't an integer!" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/indra/llmessage/llmessagethrottle.cpp b/indra/llmessage/llmessagethrottle.cpp index 14582aaf32..bddb9e14d6 100644 --- a/indra/llmessage/llmessagethrottle.cpp +++ b/indra/llmessage/llmessagethrottle.cpp @@ -66,13 +66,13 @@ void LLMessageThrottle::pruneEntries() // Look for the first entry younger than the maximum age. F32 max_age = (F32)MAX_MESSAGE_AGE[cat]; - BOOL found = FALSE; + bool found = false; while (r_iterator != r_last && !found) { if ( LLFrameTimer::getTotalTime() - (*r_iterator).getEntryTime() < max_age ) { // We found a young enough entry. - found = TRUE; + found = true; // Did we find at least one entry to remove? if (r_iterator != message_list->rbegin()) @@ -95,7 +95,7 @@ void LLMessageThrottle::pruneEntries() } } -BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg) +bool LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg) { message_list_t* message_list = &(mMessageList[MTC_VIEWER_ALERT]); @@ -114,16 +114,16 @@ BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg { // This message was not found. Add it to the list. message_list->push_front(entry); - return TRUE; + return true; } else { // This message was already in the list. - return FALSE; + return false; } } -BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, const std::string& mesg) +bool LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, const std::string& mesg) { message_list_t* message_list = &(mMessageList[MTC_AGENT_ALERT]); @@ -142,12 +142,12 @@ BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, c { // This message was not found. Add it to the list. message_list->push_front(entry); - return TRUE; + return true; } else { // This message was already in the list. - return FALSE; + return false; } } diff --git a/indra/llmessage/llmessagethrottle.h b/indra/llmessage/llmessagethrottle.h index 4ea84f712a..ae62b43920 100644 --- a/indra/llmessage/llmessagethrottle.h +++ b/indra/llmessage/llmessagethrottle.h @@ -59,8 +59,8 @@ public: LLMessageThrottle(); ~LLMessageThrottle(); - BOOL addViewerAlert (const LLUUID& to, const std::string& mesg); - BOOL addAgentAlert (const LLUUID& agent, const LLUUID& task, const std::string& mesg); + bool addViewerAlert (const LLUUID& to, const std::string& mesg); + bool addAgentAlert (const LLUUID& agent, const LLUUID& task, const std::string& mesg); void pruneEntries(); diff --git a/indra/llmessage/llnamevalue.cpp b/indra/llmessage/llnamevalue.cpp index c51883ee3d..761e990c76 100644 --- a/indra/llmessage/llnamevalue.cpp +++ b/indra/llmessage/llnamevalue.cpp @@ -676,13 +676,13 @@ LLVector3 *LLNameValue::getVec3() } -BOOL LLNameValue::sendToData() const +bool LLNameValue::sendToData() const { return (mSendto == NVS_DATA_SIM || mSendto == NVS_DATA_SIM_VIEWER); } -BOOL LLNameValue::sendToViewer() const +bool LLNameValue::sendToViewer() const { return (mSendto == NVS_SIM_VIEWER || mSendto == NVS_DATA_SIM_VIEWER); } diff --git a/indra/llmessage/llnamevalue.h b/indra/llmessage/llnamevalue.h index f8b556b5fe..92b20284ef 100644 --- a/indra/llmessage/llnamevalue.h +++ b/indra/llmessage/llnamevalue.h @@ -139,8 +139,8 @@ public: const char *getClass() const { return mStringClass; } const char *getSendto() const { return mStringSendto; } - BOOL sendToData() const; - BOOL sendToViewer() const; + bool sendToData() const; + bool sendToViewer() const; void callCallback(); std::string printNameValue() const; diff --git a/indra/llmessage/llpacketack.cpp b/indra/llmessage/llpacketack.cpp index c3c022c297..8e04934286 100644 --- a/indra/llmessage/llpacketack.cpp +++ b/indra/llmessage/llpacketack.cpp @@ -58,7 +58,7 @@ LLReliablePacket::LLReliablePacket( else { mRetries = 0; - mPingBasedRetry = TRUE; + mPingBasedRetry = true; mTimeout = F32Seconds(0.f); mCallback = NULL; mCallbackData = NULL; diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp index 687212ea10..7ba76bea25 100644 --- a/indra/llmessage/llpacketring.cpp +++ b/indra/llmessage/llpacketring.cpp @@ -97,12 +97,12 @@ void LLPacketRing::setDropPercentage (F32 percent_to_drop) mDropPercentage = percent_to_drop; } -void LLPacketRing::setUseInThrottle(const BOOL use_throttle) +void LLPacketRing::setUseInThrottle(const bool use_throttle) { mUseInThrottle = use_throttle; } -void LLPacketRing::setUseOutThrottle(const BOOL use_throttle) +void LLPacketRing::setUseOutThrottle(const bool use_throttle) { mUseOutThrottle = use_throttle; } @@ -161,7 +161,7 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap) // If using the throttle, simulate a limited size input buffer. if (mUseInThrottle) { - BOOL done = FALSE; + bool done = false; // push any current net packet (if any) onto delay ring while (!done) @@ -270,9 +270,9 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap) return packet_size; } -BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host) +bool LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host) { - BOOL status = TRUE; + bool status = true; if (!mUseOutThrottle) { return sendPacketImpl(h_socket, send_buffer, buf_size, host ); @@ -344,7 +344,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL return status; } -BOOL LLPacketRing::sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host) +bool LLPacketRing::sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host) { if (!LLProxy::isSOCKSProxyEnabled()) diff --git a/indra/llmessage/llpacketring.h b/indra/llmessage/llpacketring.h index b214271e78..888ee927b5 100644 --- a/indra/llmessage/llpacketring.h +++ b/indra/llmessage/llpacketring.h @@ -46,14 +46,14 @@ public: void dropPackets(U32); void setDropPercentage (F32 percent_to_drop); - void setUseInThrottle(const BOOL use_throttle); - void setUseOutThrottle(const BOOL use_throttle); + void setUseInThrottle(const bool use_throttle); + void setUseOutThrottle(const bool use_throttle); void setInBandwidth(const F32 bps); void setOutBandwidth(const F32 bps); S32 receivePacket (S32 socket, char *datap); S32 receiveFromRing (S32 socket, char *datap); - BOOL sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host); + bool sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host); inline LLHost getLastSender(); inline LLHost getLastReceivingInterface(); @@ -61,8 +61,8 @@ public: S32 getAndResetActualInBits() { S32 bits = mActualBitsIn; mActualBitsIn = 0; return bits;} S32 getAndResetActualOutBits() { S32 bits = mActualBitsOut; mActualBitsOut = 0; return bits;} protected: - BOOL mUseInThrottle; - BOOL mUseOutThrottle; + bool mUseInThrottle; + bool mUseOutThrottle; // For simulating a lower-bandwidth connection - BPS LLThrottle mInThrottle; @@ -84,7 +84,7 @@ protected: LLHost mLastReceivingIF; private: - BOOL sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host); + bool sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host); }; diff --git a/indra/llmessage/llpartdata.cpp b/indra/llmessage/llpartdata.cpp index 6664eb02dc..a4852cefba 100644 --- a/indra/llmessage/llpartdata.cpp +++ b/indra/llmessage/llpartdata.cpp @@ -71,31 +71,31 @@ S32 LLPartData::getSize() const } -BOOL LLPartData::unpackLegacy(LLDataPacker &dp) +bool LLPartData::unpackLegacy(LLDataPacker &dp) { LLColor4U coloru; dp.unpackU32(mFlags, "pdflags"); - dp.unpackFixed(mMaxAge, "pdmaxage", FALSE, 8, 8); + dp.unpackFixed(mMaxAge, "pdmaxage", false, 8, 8); dp.unpackColor4U(coloru, "pdstartcolor"); mStartColor.setVec(coloru); dp.unpackColor4U(coloru, "pdendcolor"); mEndColor.setVec(coloru); - dp.unpackFixed(mStartScale.mV[0], "pdstartscalex", FALSE, 3, 5); - dp.unpackFixed(mStartScale.mV[1], "pdstartscaley", FALSE, 3, 5); - dp.unpackFixed(mEndScale.mV[0], "pdendscalex", FALSE, 3, 5); - dp.unpackFixed(mEndScale.mV[1], "pdendscaley", FALSE, 3, 5); + dp.unpackFixed(mStartScale.mV[0], "pdstartscalex", false, 3, 5); + dp.unpackFixed(mStartScale.mV[1], "pdstartscaley", false, 3, 5); + dp.unpackFixed(mEndScale.mV[0], "pdendscalex", false, 3, 5); + dp.unpackFixed(mEndScale.mV[1], "pdendscaley", false, 3, 5); mStartGlow = 0.f; mEndGlow = 0.f; mBlendFuncSource = LLPartData::LL_PART_BF_SOURCE_ALPHA; mBlendFuncDest = LLPartData::LL_PART_BF_ONE_MINUS_SOURCE_ALPHA; - return TRUE; + return true; } -BOOL LLPartData::unpack(LLDataPacker &dp) +bool LLPartData::unpack(LLDataPacker &dp) { S32 size = 0; dp.unpackS32(size, "partsize"); @@ -105,7 +105,7 @@ BOOL LLPartData::unpack(LLDataPacker &dp) if (mFlags & LL_PART_DATA_GLOW) { - if (size < PS_PART_DATA_GLOW_SIZE) return FALSE; + if (size < PS_PART_DATA_GLOW_SIZE) return false; U8 tmp_glow = 0; dp.unpackU8(tmp_glow,"pdstartglow"); @@ -123,7 +123,7 @@ BOOL LLPartData::unpack(LLDataPacker &dp) if (mFlags & LL_PART_DATA_BLEND) { - if (size < PS_PART_DATA_BLEND_SIZE) return FALSE; + if (size < PS_PART_DATA_BLEND_SIZE) return false; dp.unpackU8(mBlendFuncSource,"pdblendsource"); dp.unpackU8(mBlendFuncDest,"pdblenddest"); size -= PS_PART_DATA_BLEND_SIZE; @@ -144,11 +144,11 @@ BOOL LLPartData::unpack(LLDataPacker &dp) } //this particle system won't display properly, better to not show anything - return FALSE; + return false; } - return TRUE; + return true; } void LLPartData::setFlags(const U32 flags) @@ -240,44 +240,44 @@ LLPartSysData::LLPartSysData() mNumParticles = 0; } -BOOL LLPartSysData::unpackSystem(LLDataPacker &dp) +bool LLPartSysData::unpackSystem(LLDataPacker &dp) { dp.unpackU32(mCRC, "pscrc"); dp.unpackU32(mFlags, "psflags"); dp.unpackU8(mPattern, "pspattern"); - dp.unpackFixed(mMaxAge, "psmaxage", FALSE, 8, 8); - dp.unpackFixed(mStartAge, "psstartage", FALSE, 8, 8); - dp.unpackFixed(mInnerAngle, "psinnerangle", FALSE, 3, 5); - dp.unpackFixed(mOuterAngle, "psouterangle", FALSE, 3, 5); - dp.unpackFixed(mBurstRate, "psburstrate", FALSE, 8, 8); + dp.unpackFixed(mMaxAge, "psmaxage", false, 8, 8); + dp.unpackFixed(mStartAge, "psstartage", false, 8, 8); + dp.unpackFixed(mInnerAngle, "psinnerangle", false, 3, 5); + dp.unpackFixed(mOuterAngle, "psouterangle", false, 3, 5); + dp.unpackFixed(mBurstRate, "psburstrate", false, 8, 8); mBurstRate = llmax(0.01f, mBurstRate); - dp.unpackFixed(mBurstRadius, "psburstradius", FALSE, 8, 8); - dp.unpackFixed(mBurstSpeedMin, "psburstspeedmin", FALSE, 8, 8); - dp.unpackFixed(mBurstSpeedMax, "psburstspeedmax", FALSE, 8, 8); + dp.unpackFixed(mBurstRadius, "psburstradius", false, 8, 8); + dp.unpackFixed(mBurstSpeedMin, "psburstspeedmin", false, 8, 8); + dp.unpackFixed(mBurstSpeedMax, "psburstspeedmax", false, 8, 8); dp.unpackU8(mBurstPartCount, "psburstpartcount"); - dp.unpackFixed(mAngularVelocity.mV[0], "psangvelx", TRUE, 8, 7); - dp.unpackFixed(mAngularVelocity.mV[1], "psangvely", TRUE, 8, 7); - dp.unpackFixed(mAngularVelocity.mV[2], "psangvelz", TRUE, 8, 7); + dp.unpackFixed(mAngularVelocity.mV[0], "psangvelx", true, 8, 7); + dp.unpackFixed(mAngularVelocity.mV[1], "psangvely", true, 8, 7); + dp.unpackFixed(mAngularVelocity.mV[2], "psangvelz", true, 8, 7); - dp.unpackFixed(mPartAccel.mV[0], "psaccelx", TRUE, 8, 7); - dp.unpackFixed(mPartAccel.mV[1], "psaccely", TRUE, 8, 7); - dp.unpackFixed(mPartAccel.mV[2], "psaccelz", TRUE, 8, 7); + dp.unpackFixed(mPartAccel.mV[0], "psaccelx", true, 8, 7); + dp.unpackFixed(mPartAccel.mV[1], "psaccely", true, 8, 7); + dp.unpackFixed(mPartAccel.mV[2], "psaccelz", true, 8, 7); dp.unpackUUID(mPartImageID, "psuuid"); dp.unpackUUID(mTargetUUID, "pstargetuuid"); - return TRUE; + return true; } -BOOL LLPartSysData::unpackLegacy(LLDataPacker &dp) +bool LLPartSysData::unpackLegacy(LLDataPacker &dp) { unpackSystem(dp); mPartData.unpackLegacy(dp); - return TRUE; + return true; } -BOOL LLPartSysData::unpack(LLDataPacker &dp) +bool LLPartSysData::unpack(LLDataPacker &dp) { // syssize is currently unused. Adding now when modifying the 'version to make extensible in the future S32 size = 0; @@ -300,7 +300,7 @@ BOOL LLPartSysData::unpack(LLDataPacker &dp) { dp.unpackU8(feh, "whippang"); } - return FALSE; + return false; } unpackSystem(dp); @@ -324,7 +324,7 @@ std::ostream& operator<<(std::ostream& s, const LLPartSysData &data) return s; } -BOOL LLPartSysData::isNullPS(const S32 block_num) +bool LLPartSysData::isNullPS(const S32 block_num) { U8 ps_data_block[PS_MAX_DATA_BLOCK_SIZE]; U32 crc; @@ -335,13 +335,13 @@ BOOL LLPartSysData::isNullPS(const S32 block_num) if (!size) { - return TRUE; + return true; } if (size > PS_MAX_DATA_BLOCK_SIZE) { //size is too big, newer particle version unsupported - return TRUE; + return true; } gMessageSystem->getBinaryData("ObjectData", "PSBlock", ps_data_block, size, block_num, PS_MAX_DATA_BLOCK_SIZE); @@ -355,7 +355,7 @@ BOOL LLPartSysData::isNullPS(const S32 block_num) if (tmp > PS_SYS_DATA_BLOCK_SIZE) { //unknown system data block size, don't know how to parse it, treat as NULL - return TRUE; + return true; } } @@ -363,12 +363,12 @@ BOOL LLPartSysData::isNullPS(const S32 block_num) if (crc == 0) { - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLPartSysData::unpackBlock(const S32 block_num) +bool LLPartSysData::unpackBlock(const S32 block_num) { U8 ps_data_block[PS_MAX_DATA_BLOCK_SIZE]; @@ -378,7 +378,7 @@ BOOL LLPartSysData::unpackBlock(const S32 block_num) if (size > PS_MAX_DATA_BLOCK_SIZE) { // Larger packets are newer and unsupported - return FALSE; + return false; } // Get from message diff --git a/indra/llmessage/llpartdata.h b/indra/llmessage/llpartdata.h index ed5c1a6ac7..c61e411a23 100644 --- a/indra/llmessage/llpartdata.h +++ b/indra/llmessage/llpartdata.h @@ -88,10 +88,10 @@ public: mParameter(0.f) { } - BOOL unpackLegacy(LLDataPacker &dp); - BOOL unpack(LLDataPacker &dp); + bool unpackLegacy(LLDataPacker &dp); + bool unpack(LLDataPacker &dp); - BOOL pack(LLDataPacker &dp); + bool pack(LLDataPacker &dp); bool hasGlow() const; bool hasBlendFunc() const; @@ -183,11 +183,11 @@ class LLPartSysData public: LLPartSysData(); - BOOL unpack(LLDataPacker &dp); - BOOL unpackLegacy(LLDataPacker &dp); - BOOL unpackBlock(const S32 block_num); + bool unpack(LLDataPacker &dp); + bool unpackLegacy(LLDataPacker &dp); + bool unpackBlock(const S32 block_num); - static BOOL isNullPS(const S32 block_num); // Returns FALSE if this is a "NULL" particle system (i.e. no system) + static bool isNullPS(const S32 block_num); // Returns false if this is a "NULL" particle system (i.e. no system) bool isLegacyCompatible() const; @@ -227,7 +227,7 @@ public: S32 getdataBlockSize() const; private: - BOOL unpackSystem(LLDataPacker &dp); + bool unpackSystem(LLDataPacker &dp); public: // Public because I'm lazy.... diff --git a/indra/llmessage/llsdmessagebuilder.cpp b/indra/llmessage/llsdmessagebuilder.cpp index 49456c71ed..7ea0c55afd 100644 --- a/indra/llmessage/llsdmessagebuilder.cpp +++ b/indra/llmessage/llsdmessagebuilder.cpp @@ -68,8 +68,8 @@ void LLSDMessageBuilder::newMessage(const char* name) // virtual void LLSDMessageBuilder::clearMessage() { - mbSBuilt = FALSE; - mbSClear = TRUE; + mbSBuilt = false; + mbSClear = true; mCurrentMessage = LLSD::emptyMap(); mCurrentMessageName = ""; @@ -96,10 +96,10 @@ void LLSDMessageBuilder::nextBlock(const char* blockname) } // TODO: Remove this horror... -BOOL LLSDMessageBuilder::removeLastBlock() +bool LLSDMessageBuilder::removeLastBlock() { /* TODO: finish implementing this */ - return FALSE; + return false; } void LLSDMessageBuilder::addBinaryData( @@ -168,9 +168,9 @@ void LLSDMessageBuilder::addIPPort(const char* varname, U16 v) (*mCurrentBlock)[varname] = v; } -void LLSDMessageBuilder::addBOOL(const char* varname, BOOL v) +void LLSDMessageBuilder::addBOOL(const char* varname, bool v) { - (*mCurrentBlock)[varname] = (v == TRUE); + (*mCurrentBlock)[varname] = (v == true); } void LLSDMessageBuilder::addString(const char* varname, const char* v) @@ -218,9 +218,9 @@ void LLSDMessageBuilder::compressMessage(U8*& buf_ptr, U32& buffer_length) { } -BOOL LLSDMessageBuilder::isMessageFull(const char* blockname) const +bool LLSDMessageBuilder::isMessageFull(const char* blockname) const { - return FALSE; + return false; } U32 LLSDMessageBuilder::buildMessage(U8*, U32, U8) @@ -400,13 +400,13 @@ const LLSD& LLSDMessageBuilder::getMessage() const } //virtual -void LLSDMessageBuilder::setBuilt(BOOL b) { mbSBuilt = b; } +void LLSDMessageBuilder::setBuilt(bool b) { mbSBuilt = b; } //virtual -BOOL LLSDMessageBuilder::isBuilt() const {return mbSBuilt;} +bool LLSDMessageBuilder::isBuilt() const {return mbSBuilt;} //virtual -BOOL LLSDMessageBuilder::isClear() const {return mbSClear;} +bool LLSDMessageBuilder::isClear() const {return mbSClear;} //virtual S32 LLSDMessageBuilder::getMessageSize() diff --git a/indra/llmessage/llsdmessagebuilder.h b/indra/llmessage/llsdmessagebuilder.h index 9c7c1bfde3..f1e824f5d4 100644 --- a/indra/llmessage/llsdmessagebuilder.h +++ b/indra/llmessage/llsdmessagebuilder.h @@ -48,14 +48,14 @@ public: virtual void newMessage(const char* name); virtual void nextBlock(const char* blockname); - virtual BOOL removeLastBlock(); // TODO: babbage: remove this horror... + virtual bool removeLastBlock(); // TODO: babbage: remove this horror... /** All add* methods expect pointers to canonical varname strings. */ virtual void addBinaryData( const char* varname, const void* data, S32 size); - virtual void addBOOL(const char* varname, BOOL b); + virtual void addBOOL(const char* varname, bool b); virtual void addS8(const char* varname, S8 s); virtual void addU8(const char* varname, U8 u); virtual void addS16(const char* varname, S16 i); @@ -75,18 +75,18 @@ public: virtual void addString(const char* varname, const char* s); virtual void addString(const char* varname, const std::string& s); - virtual BOOL isMessageFull(const char* blockname) const; + virtual bool isMessageFull(const char* blockname) const; virtual void compressMessage(U8*& buf_ptr, U32& buffer_length); - virtual BOOL isBuilt() const; - virtual BOOL isClear() const; + virtual bool isBuilt() const; + virtual bool isClear() const; virtual U32 buildMessage(U8* buffer, U32 buffer_size, U8 offset_to_data); /**< Null implementation which returns 0. */ virtual void clearMessage(); // TODO: babbage: remove this horror. - virtual void setBuilt(BOOL b); + virtual void setBuilt(bool b); virtual S32 getMessageSize(); virtual const char* getMessageName() const; diff --git a/indra/llmessage/lltemplatemessagebuilder.cpp b/indra/llmessage/lltemplatemessagebuilder.cpp index 5ac5f6c580..fad94ecab6 100644 --- a/indra/llmessage/lltemplatemessagebuilder.cpp +++ b/indra/llmessage/lltemplatemessagebuilder.cpp @@ -220,7 +220,7 @@ void LLTemplateMessageBuilder::nextBlock(const char* blockname) } // TODO: Remove this horror... -BOOL LLTemplateMessageBuilder::removeLastBlock() +bool LLTemplateMessageBuilder::removeLastBlock() { if (mCurrentSBlockName) { @@ -268,18 +268,18 @@ BOOL LLTemplateMessageBuilder::removeLastBlock() << ". Block: " << block_name << ". Number: " << num_blocks << LL_ENDL; - return FALSE; + return false; } else { // Decrement the counter. block_data->mBlockNumber--; - return TRUE; + return true; } } } } - return FALSE; + return false; } // add data to variable in current block @@ -445,7 +445,7 @@ void LLTemplateMessageBuilder::addIPPort(const char *varname, U16 u) addData(varname, &u, MVT_IP_PORT, sizeof(u)); } -void LLTemplateMessageBuilder::addBOOL(const char* varname, BOOL b) +void LLTemplateMessageBuilder::addBOOL(const char* varname, bool b) { // Can't just cast a BOOL (actually a U32) to a U8. // In some cases the low order bits will be zero. @@ -584,15 +584,15 @@ void LLTemplateMessageBuilder::compressMessage(U8*& buf_ptr, U32& buffer_length) } } -BOOL LLTemplateMessageBuilder::isMessageFull(const char* blockname) const +bool LLTemplateMessageBuilder::isMessageFull(const char* blockname) const { if(mCurrentSendTotal > MTUBYTES) { - return TRUE; + return true; } if(!blockname) { - return FALSE; + return false; } char* bnamep = (char*)blockname; S32 max; @@ -614,9 +614,9 @@ BOOL LLTemplateMessageBuilder::isMessageFull(const char* blockname) const } if(mCurrentSMessageData->mMemberBlocks[bnamep]->mBlockNumber >= max) { - return TRUE; + return true; } - return FALSE; + return false; } static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* template_data, LLMsgData* message_data) @@ -877,13 +877,13 @@ void LLTemplateMessageBuilder::copyFromLLSD(const LLSD&) } //virtual -void LLTemplateMessageBuilder::setBuilt(BOOL b) { mbSBuilt = b; } +void LLTemplateMessageBuilder::setBuilt(bool b) { mbSBuilt = b; } //virtual -BOOL LLTemplateMessageBuilder::isBuilt() const {return mbSBuilt;} +bool LLTemplateMessageBuilder::isBuilt() const {return mbSBuilt;} //virtual -BOOL LLTemplateMessageBuilder::isClear() const {return mbSClear;} +bool LLTemplateMessageBuilder::isClear() const {return mbSClear;} //virtual S32 LLTemplateMessageBuilder::getMessageSize() {return mCurrentSendTotal;} diff --git a/indra/llmessage/lltemplatemessagebuilder.h b/indra/llmessage/lltemplatemessagebuilder.h index 4f614a4657..b8b4b36c3d 100644 --- a/indra/llmessage/lltemplatemessagebuilder.h +++ b/indra/llmessage/lltemplatemessagebuilder.h @@ -49,12 +49,12 @@ public: virtual void newMessage(const char* name); virtual void nextBlock(const char* blockname); - virtual BOOL removeLastBlock(); // TODO: babbage: remove this horror... + virtual bool removeLastBlock(); // TODO: babbage: remove this horror... /** All add* methods expect pointers to canonical varname strings. */ virtual void addBinaryData(const char *varname, const void *data, S32 size); - virtual void addBOOL(const char* varname, BOOL b); + virtual void addBOOL(const char* varname, bool b); virtual void addS8(const char* varname, S8 s); virtual void addU8(const char* varname, U8 u); virtual void addS16(const char* varname, S16 i); @@ -74,18 +74,18 @@ public: virtual void addString(const char* varname, const char* s); virtual void addString(const char* varname, const std::string& s); - virtual BOOL isMessageFull(const char* blockname) const; + virtual bool isMessageFull(const char* blockname) const; virtual void compressMessage(U8*& buf_ptr, U32& buffer_length); - virtual BOOL isBuilt() const; - virtual BOOL isClear() const; + virtual bool isBuilt() const; + virtual bool isClear() const; virtual U32 buildMessage(U8* buffer, U32 buffer_size, U8 offset_to_data); /**< Return built message size */ virtual void clearMessage(); // TODO: babbage: remove this horror. - virtual void setBuilt(BOOL b); + virtual void setBuilt(bool b); virtual S32 getMessageSize(); virtual const char* getMessageName() const; diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index 8a41d5565d..0ff49a2308 100644 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -286,9 +286,9 @@ void LLTemplateMessageReader::getU8(const char *block, const char *var, void LLTemplateMessageReader::getBOOL(const char *block, const char *var, bool &b, S32 blocknum ) { - U8 value; - getData(block, var, &value, sizeof(U8), blocknum); - b = (BOOL) value; + bool value; + getData(block, var, &value, sizeof(bool), blocknum); + b = value; } void LLTemplateMessageReader::getS16(const char *block, const char *var, @@ -443,7 +443,7 @@ S32 LLTemplateMessageReader::getMessageSize() const } // Returns template for the message contained in buffer -BOOL LLTemplateMessageReader::decodeTemplate( +bool LLTemplateMessageReader::decodeTemplate( const U8* buffer, S32 buffer_size, // inputs LLMessageTemplate** msg_template ) // outputs { @@ -453,7 +453,7 @@ BOOL LLTemplateMessageReader::decodeTemplate( if (buffer_size <= 0) { LL_WARNS() << "No message waiting for decode!" << LL_ENDL; - return(FALSE); + return(false); } U32 num = 0; @@ -489,7 +489,7 @@ BOOL LLTemplateMessageReader::decodeTemplate( { LL_WARNS() << "Packet with unusable length received (too short): " << buffer_size << LL_ENDL; - return(FALSE); + return(false); } LLMessageTemplate* temp = get_ptr_in_map(mMessageNumbers,num); @@ -503,10 +503,10 @@ BOOL LLTemplateMessageReader::decodeTemplate( LL_WARNS_ONCE() << "Message #" << std::hex << num << std::dec << " received but not registered!" << LL_ENDL; //gMessageSystem->callExceptionFunc(MX_UNREGISTERED_MESSAGE); - return(FALSE); + return(false); } - return(TRUE); + return(true); } void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted ) @@ -531,7 +531,7 @@ void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S3 static LLTrace::BlockTimerStatHandle FTM_PROCESS_MESSAGES("Process Messages"); // decode a given message -BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender ) +bool LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender ) { LL_RECORD_BLOCK_TIME(FTM_PROCESS_MESSAGES); @@ -592,7 +592,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender else { LL_ERRS() << "Unknown block type" << LL_ENDL; - return FALSE; + return false; } LLMsgBlkData* cur_data_block = NULL; @@ -698,7 +698,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender && !mCurrentRMessageTemplate->mMemberBlocks.empty()) { LL_DEBUGS() << "Empty message '" << mCurrentRMessageTemplate->mName << "' (no blocks)" << LL_ENDL; - return FALSE; + return false; } { @@ -747,16 +747,16 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender } } } - return TRUE; + return true; } -BOOL LLTemplateMessageReader::validateMessage(const U8* buffer, - S32 buffer_size, +bool LLTemplateMessageReader::validateMessage(const U8* buffer, + S32 buffer_size, const LLHost& sender, bool trusted) { mReceiveSize = buffer_size; - BOOL valid = decodeTemplate(buffer, buffer_size, &mCurrentRMessageTemplate ); + bool valid = decodeTemplate(buffer, buffer_size, &mCurrentRMessageTemplate ); if(valid) { mCurrentRMessageTemplate->mReceiveCount++; @@ -773,7 +773,7 @@ BOOL LLTemplateMessageReader::validateMessage(const U8* buffer, << " from " << ((trusted) ? "trusted " : "untrusted ") << sender << LL_ENDL; - valid = FALSE; + valid = false; } if(valid && isUdpBanned()) @@ -781,12 +781,12 @@ BOOL LLTemplateMessageReader::validateMessage(const U8* buffer, LL_WARNS() << "Received UDP black listed message " << getMessageName() << " from " << sender << LL_ENDL; - valid = FALSE; + valid = false; } return valid; } -BOOL LLTemplateMessageReader::readMessage(const U8* buffer, +bool LLTemplateMessageReader::readMessage(const U8* buffer, const LLHost& sender) { return decodeData(buffer, sender); diff --git a/indra/llmessage/lltemplatemessagereader.h b/indra/llmessage/lltemplatemessagereader.h index 88889cd7d2..14656230e3 100644 --- a/indra/llmessage/lltemplatemessagereader.h +++ b/indra/llmessage/lltemplatemessagereader.h @@ -98,9 +98,9 @@ public: virtual void copyToBuilder(LLMessageBuilder&) const; - BOOL validateMessage(const U8* buffer, S32 buffer_size, + bool validateMessage(const U8* buffer, S32 buffer_size, const LLHost& sender, bool trusted = false); - BOOL readMessage(const U8* buffer, const LLHost& sender); + bool readMessage(const U8* buffer, const LLHost& sender); bool isTrusted() const; bool isBanned(bool trusted_source) const; @@ -111,12 +111,12 @@ private: void getData(const char *blockname, const char *varname, void *datap, S32 size = 0, S32 blocknum = 0, S32 max_size = S32_MAX); - BOOL decodeTemplate(const U8* buffer, S32 buffer_size, // inputs + bool decodeTemplate(const U8* buffer, S32 buffer_size, // inputs LLMessageTemplate** msg_template ); // outputs void logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted ); - BOOL decodeData(const U8* buffer, const LLHost& sender ); + bool decodeData(const U8* buffer, const LLHost& sender ); S32 mReceiveSize; LLMessageTemplate* mCurrentRMessageTemplate; diff --git a/indra/llmessage/llthrottle.cpp b/indra/llmessage/llthrottle.cpp index e659414e8c..dc02b5ea90 100644 --- a/indra/llmessage/llthrottle.cpp +++ b/indra/llmessage/llthrottle.cpp @@ -57,9 +57,9 @@ F32 LLThrottle::getAvailable() return mAvailable + (mRate * elapsed_time.value()); } -BOOL LLThrottle::checkOverflow(const F32 amount) +bool LLThrottle::checkOverflow(const F32 amount) { - BOOL retval = TRUE; + bool retval = true; F32 lookahead_amount = mRate * mLookaheadSecs; @@ -72,17 +72,17 @@ BOOL LLThrottle::checkOverflow(const F32 amount) { // ...enough space to send this message // Also do if > lookahead so we can use if amount > capped amount. - retval = FALSE; + retval = false; } return retval; } -BOOL LLThrottle::throttleOverflow(const F32 amount) +bool LLThrottle::throttleOverflow(const F32 amount) { F32Seconds elapsed_time; F32 lookahead_amount; - BOOL retval = TRUE; + bool retval = true; lookahead_amount = mRate * mLookaheadSecs; @@ -97,12 +97,12 @@ BOOL LLThrottle::throttleOverflow(const F32 amount) // ...channel completely open, so allow send regardless // of size. This allows sends on very low BPS channels. mAvailable = lookahead_amount; - retval = FALSE; + retval = false; } else if (mAvailable > amount) { // ...enough space to send this message - retval = FALSE; + retval = false; } // We actually already sent the bits. @@ -236,15 +236,15 @@ void LLThrottleGroup::resetDynamicAdjust() } -BOOL LLThrottleGroup::setNominalBPS(F32* throttle_vec) +bool LLThrottleGroup::setNominalBPS(F32* throttle_vec) { - BOOL changed = FALSE; + bool changed = false; S32 i; for (i = 0; i < TC_EOF; i++) { if (mNominalBPS[i] != throttle_vec[i]) { - changed = TRUE; + changed = true; mNominalBPS[i] = throttle_vec[i]; } } @@ -285,9 +285,9 @@ S32 LLThrottleGroup::getAvailable(S32 throttle_cat) } -BOOL LLThrottleGroup::checkOverflow(S32 throttle_cat, F32 bits) +bool LLThrottleGroup::checkOverflow(S32 throttle_cat, F32 bits) { - BOOL retval = TRUE; + bool retval = true; F32 category_bps = mCurrentBPS[throttle_cat]; F32 lookahead_bits = category_bps * THROTTLE_LOOKAHEAD_TIME; @@ -302,23 +302,23 @@ BOOL LLThrottleGroup::checkOverflow(S32 throttle_cat, F32 bits) // ...channel completely open, so allow send regardless // of size. This allows sends on very low BPS channels. mBitsAvailable[throttle_cat] = lookahead_bits; - retval = FALSE; + retval = false; } else if ( bits_available > bits ) { // ...enough space to send this message - retval = FALSE; + retval = false; } return retval; } -BOOL LLThrottleGroup::throttleOverflow(S32 throttle_cat, F32 bits) +bool LLThrottleGroup::throttleOverflow(S32 throttle_cat, F32 bits) { F32Seconds elapsed_time; F32 category_bps; F32 lookahead_bits; - BOOL retval = TRUE; + bool retval = true; category_bps = mCurrentBPS[throttle_cat]; lookahead_bits = category_bps * THROTTLE_LOOKAHEAD_TIME; @@ -333,12 +333,12 @@ BOOL LLThrottleGroup::throttleOverflow(S32 throttle_cat, F32 bits) // ...channel completely open, so allow send regardless // of size. This allows sends on very low BPS channels. mBitsAvailable[throttle_cat] = lookahead_bits; - retval = FALSE; + retval = false; } else if ( mBitsAvailable[throttle_cat] > bits ) { // ...enough space to send this message - retval = FALSE; + retval = false; } // We actually already sent the bits. @@ -354,7 +354,7 @@ BOOL LLThrottleGroup::throttleOverflow(S32 throttle_cat, F32 bits) } -BOOL LLThrottleGroup::dynamicAdjust() +bool LLThrottleGroup::dynamicAdjust() { const F32Seconds DYNAMIC_ADJUST_TIME(1.0f); const F32 CURRENT_PERIOD_WEIGHT = .25f; // how much weight to give to last period while determining BPS utilization @@ -370,7 +370,7 @@ BOOL LLThrottleGroup::dynamicAdjust() // Only dynamically adjust every few seconds if ((mt_sec - mDynamicAdjustTime) < DYNAMIC_ADJUST_TIME) { - return FALSE; + return false; } mDynamicAdjustTime = mt_sec; @@ -394,11 +394,11 @@ BOOL LLThrottleGroup::dynamicAdjust() // Look for busy channels // TODO: Fold into loop above. - BOOL channels_busy = FALSE; + bool channels_busy = false; F32 busy_nominal_sum = 0; - BOOL channel_busy[TC_EOF]; - BOOL channel_idle[TC_EOF]; - BOOL channel_over_nominal[TC_EOF]; + bool channel_busy[TC_EOF]; + bool channel_idle[TC_EOF]; + bool channel_over_nominal[TC_EOF]; for (i = 0; i < TC_EOF; i++) { @@ -406,34 +406,34 @@ BOOL LLThrottleGroup::dynamicAdjust() if (mBitsSentHistory[i] >= BUSY_PERCENT * DYNAMIC_ADJUST_TIME.value() * mCurrentBPS[i]) { // this channel is busy - channels_busy = TRUE; + channels_busy = true; busy_nominal_sum += mNominalBPS[i]; // use for allocation of pooled idle bandwidth - channel_busy[i] = TRUE; + channel_busy[i] = true; } else { - channel_busy[i] = FALSE; + channel_busy[i] = false; } // Is this an idle channel? if ((mBitsSentHistory[i] < IDLE_PERCENT * DYNAMIC_ADJUST_TIME.value() * mCurrentBPS[i]) && (mBitsAvailable[i] > 0)) { - channel_idle[i] = TRUE; + channel_idle[i] = true; } else { - channel_idle[i] = FALSE; + channel_idle[i] = false; } // Is this an overpumped channel? if (mCurrentBPS[i] > mNominalBPS[i]) { - channel_over_nominal[i] = TRUE; + channel_over_nominal[i] = true; } else { - channel_over_nominal[i] = FALSE; + channel_over_nominal[i] = false; } } @@ -573,5 +573,5 @@ BOOL LLThrottleGroup::dynamicAdjust() } } } - return TRUE; + return true; } diff --git a/indra/llmessage/llthrottle.h b/indra/llmessage/llthrottle.h index e43e54f61b..9b829e788a 100644 --- a/indra/llmessage/llthrottle.h +++ b/indra/llmessage/llthrottle.h @@ -41,8 +41,8 @@ public: ~LLThrottle() { } void setRate(const F32 rate); - BOOL checkOverflow(const F32 amount); // I'm about to add an amount, TRUE if would overflow throttle - BOOL throttleOverflow(const F32 amount); // I just sent amount, TRUE if that overflowed the throttle + bool checkOverflow(const F32 amount); // I'm about to add an amount, TRUE if would overflow throttle + bool throttleOverflow(const F32 amount); // I just sent amount, TRUE if that overflowed the throttle F32 getAvailable(); // Return the available bits F32 getRate() const { return mRate; } @@ -73,10 +73,10 @@ public: ~LLThrottleGroup() { } void resetDynamicAdjust(); - BOOL checkOverflow(S32 throttle_cat, F32 bits); // I'm about to send bits, TRUE if would overflow channel - BOOL throttleOverflow(S32 throttle_cat, F32 bits); // I just sent bits, TRUE if that overflowed the channel - BOOL dynamicAdjust(); // Shift bandwidth from idle channels to busy channels, TRUE if adjustment occurred - BOOL setNominalBPS(F32* throttle_vec); // TRUE if any value was different, resets adjustment system if was different + bool checkOverflow(S32 throttle_cat, F32 bits); // I'm about to send bits, TRUE if would overflow channel + bool throttleOverflow(S32 throttle_cat, F32 bits); // I just sent bits, TRUE if that overflowed the channel + bool dynamicAdjust(); // Shift bandwidth from idle channels to busy channels, TRUE if adjustment occurred + bool setNominalBPS(F32* throttle_vec); // TRUE if any value was different, resets adjustment system if was different S32 getAvailable(S32 throttle_cat); // Return bits available in the channel diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp index 452b77fb6d..fb901644c7 100644 --- a/indra/llmessage/lltransfermanager.cpp +++ b/indra/llmessage/lltransfermanager.cpp @@ -254,7 +254,7 @@ void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **) msgp->getBinaryData("TransferInfo", "Params", tmp, size); LLDataPackerBinaryBuffer dpb(tmp, MAX_PARAMS_SIZE); - BOOL unpack_ok = tsp->unpackParams(dpb); + bool unpack_ok = tsp->unpackParams(dpb); if (!unpack_ok) { // This should only happen if the data is corrupt or @@ -505,7 +505,7 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) // NOTE: THERE IS A CUT AND PASTE OF THIS CODE IN THE TRANSFERINFO HANDLER // SO WE CAN PLAY BACK DELAYED PACKETS THERE!!!!!!!!!!!!!!!!!!!!!!!!! // - BOOL done = FALSE; + bool done = false; while (!done) { LLTSCode ret_code = ttp->dataCallback(packet_id, tmp_data, size); @@ -780,7 +780,7 @@ void LLTransferSourceChannel::updateTransfers() LLPriQueueMap<LLTransferSource *>::pqm_iter iter, next; - BOOL done = FALSE; + bool done = false; for (iter = mTransferSources.mMap.begin(); (iter != mTransferSources.mMap.end()) && !done;) { //LL_INFOS() << "LLTransferSourceChannel::updateTransfers()" << LL_ENDL; @@ -791,7 +791,7 @@ void LLTransferSourceChannel::updateTransfers() LLTransferSource *tsp = iter->second; U8 *datap = NULL; S32 data_size = 0; - BOOL delete_data = FALSE; + bool delete_data = false; S32 packet_id = 0; S32 sent_bytes = 0; LLTSCode status = LLTS_OK; @@ -1335,7 +1335,7 @@ void LLTransferSourceParamsInvItem::packParams(LLDataPacker &dp) const } -BOOL LLTransferSourceParamsInvItem::unpackParams(LLDataPacker &dp) +bool LLTransferSourceParamsInvItem::unpackParams(LLDataPacker &dp) { S32 tmp_at; @@ -1349,7 +1349,7 @@ BOOL LLTransferSourceParamsInvItem::unpackParams(LLDataPacker &dp) mAssetType = (LLAssetType::EType)tmp_at; - return TRUE; + return true; } LLTransferSourceParamsEstate::LLTransferSourceParamsEstate() : @@ -1387,7 +1387,7 @@ void LLTransferSourceParamsEstate::packParams(LLDataPacker &dp) const } -BOOL LLTransferSourceParamsEstate::unpackParams(LLDataPacker &dp) +bool LLTransferSourceParamsEstate::unpackParams(LLDataPacker &dp) { S32 tmp_et; @@ -1397,5 +1397,5 @@ BOOL LLTransferSourceParamsEstate::unpackParams(LLDataPacker &dp) mEstateAssetType = (EstateAssetType)tmp_et; - return TRUE; + return true; } diff --git a/indra/llmessage/lltransfermanager.h b/indra/llmessage/lltransfermanager.h index 6aad153c24..a756771445 100644 --- a/indra/llmessage/lltransfermanager.h +++ b/indra/llmessage/lltransfermanager.h @@ -263,7 +263,7 @@ public: virtual ~LLTransferSourceParams(); virtual void packParams(LLDataPacker &dp) const = 0; - virtual BOOL unpackParams(LLDataPacker &dp) = 0; + virtual bool unpackParams(LLDataPacker &dp) = 0; LLTransferSourceType getType() const { return mType; } @@ -300,13 +300,13 @@ protected: const S32 max_bytes, U8 **datap, S32 &returned_bytes, - BOOL &delete_returned) = 0; + bool &delete_returned) = 0; // The completionCallback is GUARANTEED to be called before the destructor. virtual void completionCallback(const LLTSCode status) = 0; virtual void packParams(LLDataPacker& dp) const = 0; - virtual BOOL unpackParams(LLDataPacker& dp) = 0; + virtual bool unpackParams(LLDataPacker& dp) = 0; virtual S32 getNextPacketID() { return mLastPacketID + 1; } virtual void setLastPacketID(const S32 packet_id) { mLastPacketID = packet_id; } @@ -440,7 +440,7 @@ public: LLTransferSourceParamsInvItem(); virtual ~LLTransferSourceParamsInvItem() {} /*virtual*/ void packParams(LLDataPacker &dp) const; - /*virtual*/ BOOL unpackParams(LLDataPacker &dp); + /*virtual*/ bool unpackParams(LLDataPacker &dp); void setAgentSession(const LLUUID &agent_id, const LLUUID &session_id); void setInvItem(const LLUUID &owner_id, const LLUUID &task_id, const LLUUID &item_id); @@ -472,7 +472,7 @@ public: LLTransferSourceParamsEstate(); virtual ~LLTransferSourceParamsEstate() {} /*virtual*/ void packParams(LLDataPacker &dp) const; - /*virtual*/ BOOL unpackParams(LLDataPacker &dp); + /*virtual*/ bool unpackParams(LLDataPacker &dp); void setAgentSession(const LLUUID &agent_id, const LLUUID &session_id); void setEstateAssetType(const EstateAssetType etype); diff --git a/indra/llmessage/lltransfersourceasset.cpp b/indra/llmessage/lltransfersourceasset.cpp index 027283232d..32fdc83f0e 100644 --- a/indra/llmessage/lltransfersourceasset.cpp +++ b/indra/llmessage/lltransfersourceasset.cpp @@ -62,7 +62,7 @@ void LLTransferSourceAsset::initTransfer() mParams.getAssetType(), LLTransferSourceAsset::responderCallback, tidp, - FALSE); + false); } else { @@ -91,7 +91,7 @@ LLTSCode LLTransferSourceAsset::dataCallback(const S32 packet_id, const S32 max_bytes, U8 **data_handle, S32 &returned_bytes, - BOOL &delete_returned) + bool &delete_returned) { //LL_INFOS() << "LLTransferSourceAsset::dataCallback" << LL_ENDL; if (!mGotResponse) @@ -164,7 +164,7 @@ void LLTransferSourceAsset::packParams(LLDataPacker& dp) const mParams.packParams(dp); } -BOOL LLTransferSourceAsset::unpackParams(LLDataPacker &dp) +bool LLTransferSourceAsset::unpackParams(LLDataPacker &dp) { //LL_INFOS() << "LLTransferSourceAsset::unpackParams" << LL_ENDL; return mParams.unpackParams(dp); @@ -240,7 +240,7 @@ void LLTransferSourceParamsAsset::packParams(LLDataPacker &dp) const } -BOOL LLTransferSourceParamsAsset::unpackParams(LLDataPacker &dp) +bool LLTransferSourceParamsAsset::unpackParams(LLDataPacker &dp) { S32 tmp_at; @@ -249,6 +249,6 @@ BOOL LLTransferSourceParamsAsset::unpackParams(LLDataPacker &dp) mAssetType = (LLAssetType::EType)tmp_at; - return TRUE; + return true; } diff --git a/indra/llmessage/lltransfersourceasset.h b/indra/llmessage/lltransfersourceasset.h index 585e683cb3..f2a5dc214e 100644 --- a/indra/llmessage/lltransfersourceasset.h +++ b/indra/llmessage/lltransfersourceasset.h @@ -38,7 +38,7 @@ public: LLTransferSourceParamsAsset(); virtual ~LLTransferSourceParamsAsset() {} /*virtual*/ void packParams(LLDataPacker &dp) const; - /*virtual*/ BOOL unpackParams(LLDataPacker &dp); + /*virtual*/ bool unpackParams(LLDataPacker &dp); void setAsset(const LLUUID &asset_id, const LLAssetType::EType asset_type); @@ -65,15 +65,15 @@ protected: const S32 max_bytes, U8 **datap, S32 &returned_bytes, - BOOL &delete_returned); + bool &delete_returned); /*virtual*/ void completionCallback(const LLTSCode status); virtual void packParams(LLDataPacker& dp) const; - /*virtual*/ BOOL unpackParams(LLDataPacker &dp); + /*virtual*/ bool unpackParams(LLDataPacker &dp); protected: LLTransferSourceParamsAsset mParams; - BOOL mGotResponse; + bool mGotResponse; S32 mCurPos; }; diff --git a/indra/llmessage/lltransfersourcefile.cpp b/indra/llmessage/lltransfersourcefile.cpp index 1f284a158d..1192a6e461 100644 --- a/indra/llmessage/lltransfersourcefile.cpp +++ b/indra/llmessage/lltransfersourcefile.cpp @@ -86,7 +86,7 @@ LLTSCode LLTransferSourceFile::dataCallback(const S32 packet_id, const S32 max_bytes, U8 **data_handle, S32 &returned_bytes, - BOOL &delete_returned) + bool &delete_returned) { //LL_INFOS() << "LLTransferSourceFile::dataCallback" << LL_ENDL; @@ -141,7 +141,7 @@ void LLTransferSourceFile::packParams(LLDataPacker& dp) const mParams.packParams(dp); } -BOOL LLTransferSourceFile::unpackParams(LLDataPacker &dp) +bool LLTransferSourceFile::unpackParams(LLDataPacker &dp) { //LL_INFOS() << "LLTransferSourceFile::unpackParams" << LL_ENDL; return mParams.unpackParams(dp); @@ -150,7 +150,7 @@ BOOL LLTransferSourceFile::unpackParams(LLDataPacker &dp) LLTransferSourceParamsFile::LLTransferSourceParamsFile() : LLTransferSourceParams(LLTST_FILE), - mDeleteOnCompletion(FALSE) + mDeleteOnCompletion(false) { } @@ -162,7 +162,7 @@ void LLTransferSourceParamsFile::packParams(LLDataPacker &dp) const } -BOOL LLTransferSourceParamsFile::unpackParams(LLDataPacker &dp) +bool LLTransferSourceParamsFile::unpackParams(LLDataPacker &dp) { dp.unpackString(mFilename, "Filename"); U8 delete_flag; @@ -170,5 +170,5 @@ BOOL LLTransferSourceParamsFile::unpackParams(LLDataPacker &dp) mDeleteOnCompletion = delete_flag; LL_INFOS() << "Unpacked filename: " << mFilename << LL_ENDL; - return TRUE; + return true; } diff --git a/indra/llmessage/lltransfersourcefile.h b/indra/llmessage/lltransfersourcefile.h index 985042417e..bda6bad14f 100644 --- a/indra/llmessage/lltransfersourcefile.h +++ b/indra/llmessage/lltransfersourcefile.h @@ -35,7 +35,7 @@ public: LLTransferSourceParamsFile(); virtual ~LLTransferSourceParamsFile() {} /*virtual*/ void packParams(LLDataPacker &dp) const; - /*virtual*/ BOOL unpackParams(LLDataPacker &dp); + /*virtual*/ bool unpackParams(LLDataPacker &dp); void setFilename(const std::string &filename) { mFilename = filename; } std::string getFilename() const { return mFilename; } @@ -61,11 +61,11 @@ protected: const S32 max_bytes, U8 **datap, S32 &returned_bytes, - BOOL &delete_returned); + bool &delete_returned); /*virtual*/ void completionCallback(const LLTSCode status); virtual void packParams(LLDataPacker& dp) const; - /*virtual*/ BOOL unpackParams(LLDataPacker &dp); + /*virtual*/ bool unpackParams(LLDataPacker &dp); protected: LLTransferSourceParamsFile mParams; diff --git a/indra/llmessage/lluseroperation.cpp b/indra/llmessage/lluseroperation.cpp index c506af19ce..d56997c7de 100644 --- a/indra/llmessage/lluseroperation.cpp +++ b/indra/llmessage/lluseroperation.cpp @@ -72,14 +72,14 @@ void LLUserOperation::SetNoExpireFlag(const BOOL flag) mNoExpire = flag; } -BOOL LLUserOperation::isExpired() +bool LLUserOperation::isExpired() { if (!mNoExpire) { const F32 EXPIRE_TIME_SECS = 10.f; return mTimer.getElapsedTimeF32() > EXPIRE_TIME_SECS; } - return FALSE; + return false; } void LLUserOperation::expire() @@ -128,7 +128,7 @@ LLUserOperation* LLUserOperationMgr::findOperation(const LLUUID& tid) } -BOOL LLUserOperationMgr::deleteOperation(LLUserOperation* op) +bool LLUserOperationMgr::deleteOperation(LLUserOperation* op) { size_t rv = 0; if(op) @@ -138,7 +138,7 @@ BOOL LLUserOperationMgr::deleteOperation(LLUserOperation* op) delete op; op = NULL; } - return rv ? TRUE : FALSE; + return rv ? true : false; } void LLUserOperationMgr::deleteExpiredOperations() diff --git a/indra/llmessage/lluseroperation.h b/indra/llmessage/lluseroperation.h index 7db5f0b27f..88e5f82622 100644 --- a/indra/llmessage/lluseroperation.h +++ b/indra/llmessage/lluseroperation.h @@ -44,7 +44,7 @@ public: const LLUUID& getAgentID() const { return mAgentID; } // Operation never got necessary data, so expired - virtual BOOL isExpired(); + virtual bool isExpired(); // ability to mark this operation as never expiring. void SetNoExpireFlag(const BOOL flag); @@ -54,7 +54,7 @@ public: // Run the operation. This will only be called in the case of an // actual success or failure of the operation. - virtual BOOL execute(BOOL transaction_success) = 0; + virtual bool execute(BOOL transaction_success) = 0; // This method is called when the user op has expired, and is // about to be deleted by the manager. This gives the user op the @@ -68,7 +68,7 @@ protected: LLUUID mAgentID; LLUUID mTransactionID; LLFrameTimer mTimer; - BOOL mNoExpire; // this is used for operations that expect an answer and will wait till it gets one. + bool mNoExpire; // this is used for operations that expect an answer and will wait till it gets one. }; @@ -80,7 +80,7 @@ public: void addOperation(LLUserOperation* op); LLUserOperation* findOperation(const LLUUID& transaction_id); - BOOL deleteOperation(LLUserOperation* op); + bool deleteOperation(LLUserOperation* op); // Call this method every once in a while to clean up old // transactions. diff --git a/indra/llmessage/llxfer.cpp b/indra/llmessage/llxfer.cpp index 93d5cfc131..ad291df717 100644 --- a/indra/llmessage/llxfer.cpp +++ b/indra/llmessage/llxfer.cpp @@ -327,7 +327,7 @@ S32 LLXfer::processEOF() /////////////////////////////////////////////////////////// -S32 LLXfer::encodePacketNum(S32 packet_num, BOOL is_EOF) +S32 LLXfer::encodePacketNum(S32 packet_num, bool is_EOF) { if (is_EOF) { diff --git a/indra/llmessage/llxfer.h b/indra/llmessage/llxfer.h index a906674dec..cfd9f83d54 100644 --- a/indra/llmessage/llxfer.h +++ b/indra/llmessage/llxfer.h @@ -103,7 +103,7 @@ class LLXfer virtual S32 suck(S32 start_position); virtual S32 flush(); - virtual S32 encodePacketNum(S32 packet_num, BOOL is_eof); + virtual S32 encodePacketNum(S32 packet_num, bool is_eof); virtual void setXferSize (S32 data_size); virtual S32 getMaxBufferSize(); diff --git a/indra/llmessage/llxfer_file.cpp b/indra/llmessage/llxfer_file.cpp index 7fd4222fb7..f5e9071aa4 100644 --- a/indra/llmessage/llxfer_file.cpp +++ b/indra/llmessage/llxfer_file.cpp @@ -412,14 +412,14 @@ S32 LLXfer_File::processEOF() /////////////////////////////////////////////////////////// -BOOL LLXfer_File::matchesLocalFilename(const std::string& filename) +bool LLXfer_File::matchesLocalFilename(const std::string& filename) { return (filename == mLocalFilename); } /////////////////////////////////////////////////////////// -BOOL LLXfer_File::matchesRemoteFilename(const std::string& filename, ELLPath remote_path) +bool LLXfer_File::matchesRemoteFilename(const std::string& filename, ELLPath remote_path) { return ((filename == mRemoteFilename) && (remote_path == mRemotePath)); } diff --git a/indra/llmessage/llxfer_file.h b/indra/llmessage/llxfer_file.h index ab9374549e..15a0120932 100644 --- a/indra/llmessage/llxfer_file.h +++ b/indra/llmessage/llxfer_file.h @@ -69,8 +69,8 @@ class LLXfer_File : public LLXfer virtual S32 suck(S32 start_position); virtual S32 flush(); - virtual BOOL matchesLocalFilename(const std::string& filename); - virtual BOOL matchesRemoteFilename(const std::string& filename, ELLPath remote_path); + virtual bool matchesLocalFilename(const std::string& filename); + virtual bool matchesRemoteFilename(const std::string& filename, ELLPath remote_path); virtual S32 getMaxBufferSize(); diff --git a/indra/llmessage/llxfer_vfile.cpp b/indra/llmessage/llxfer_vfile.cpp index 12419b342d..f478825d97 100644 --- a/indra/llmessage/llxfer_vfile.cpp +++ b/indra/llmessage/llxfer_vfile.cpp @@ -367,14 +367,14 @@ S32 LLXfer_VFile::processEOF() //////////////////////////////////////////////////////////// -BOOL LLXfer_VFile::matchesLocalFile(const LLUUID &id, LLAssetType::EType type) +bool LLXfer_VFile::matchesLocalFile(const LLUUID &id, LLAssetType::EType type) { return (id == mLocalID && type == mType); } ////////////////////////////////////////////////////////// -BOOL LLXfer_VFile::matchesRemoteFile(const LLUUID &id, LLAssetType::EType type) +bool LLXfer_VFile::matchesRemoteFile(const LLUUID &id, LLAssetType::EType type) { return (id == mRemoteID && type == mType); } diff --git a/indra/llmessage/llxfer_vfile.h b/indra/llmessage/llxfer_vfile.h index d82bab5f6c..71eaeb7393 100644 --- a/indra/llmessage/llxfer_vfile.h +++ b/indra/llmessage/llxfer_vfile.h @@ -72,8 +72,8 @@ class LLXfer_VFile : public LLXfer virtual S32 suck(S32 start_position); virtual S32 flush(); - virtual BOOL matchesLocalFile(const LLUUID &id, LLAssetType::EType type); - virtual BOOL matchesRemoteFile(const LLUUID &id, LLAssetType::EType type); + virtual bool matchesLocalFile(const LLUUID &id, LLAssetType::EType type); + virtual bool matchesRemoteFile(const LLUUID &id, LLAssetType::EType type); virtual void setXferSize(S32 xfer_size); virtual S32 getMaxBufferSize(); diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index 956ecc11a3..591dbc18c2 100644 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp @@ -367,7 +367,7 @@ U64 LLXferManager::getNextID () /////////////////////////////////////////////////////////// -S32 LLXferManager::encodePacketNum(S32 packet_num, BOOL is_EOF) +S32 LLXferManager::encodePacketNum(S32 packet_num, bool is_EOF) { if (is_EOF) { @@ -385,7 +385,7 @@ S32 LLXferManager::decodePacketNum(S32 packet_num) /////////////////////////////////////////////////////////// -BOOL LLXferManager::isLastPacket(S32 packet_num) +bool LLXferManager::isLastPacket(S32 packet_num) { return(packet_num & 0x80000000); } @@ -396,11 +396,11 @@ U64 LLXferManager::requestFile(const std::string& local_filename, const std::string& remote_filename, ELLPath remote_path, const LLHost& remote_host, - BOOL delete_remote_on_completion, + bool delete_remote_on_completion, void (*callback)(void**,S32,LLExtStat), void** user_data, - BOOL is_priority, - BOOL use_big_packets) + bool is_priority, + bool use_big_packets) { LLXfer_File* file_xfer_p = NULL; @@ -464,7 +464,7 @@ void LLXferManager::requestVFile(const LLUUID& local_id, const LLHost& remote_host, void (*callback)(void**,S32,LLExtStat), void** user_data, - BOOL is_priority) + bool is_priority) { LLXfer_VFile * xfer_p = NULL; @@ -1235,7 +1235,7 @@ void LLXferManager::startPendingDownloads() /////////////////////////////////////////////////////////// -void LLXferManager::addToList(LLXfer* xferp, xfer_list_t & xfer_list, BOOL is_priority) +void LLXferManager::addToList(LLXfer* xferp, xfer_list_t & xfer_list, bool is_priority) { if(is_priority) { diff --git a/indra/llmessage/llxfermanager.h b/indra/llmessage/llxfermanager.h index f49209bed0..17625aedfa 100644 --- a/indra/llmessage/llxfermanager.h +++ b/indra/llmessage/llxfermanager.h @@ -100,7 +100,7 @@ class LLXferManager protected: // implementation methods virtual void startPendingDownloads(); - virtual void addToList(LLXfer* xferp, xfer_list_t & xfer_list, BOOL is_priority); + virtual void addToList(LLXfer* xferp, xfer_list_t & xfer_list, bool is_priority); std::multiset<std::string> mExpectedTransfers; // files that are authorized to transfer out std::multiset<std::string> mExpectedRequests; // files that are authorized to be downloaded on top of std::multiset<std::string> mExpectedVFileTransfers; // files that are authorized to transfer out @@ -135,9 +135,9 @@ class LLXferManager // general utility routines virtual void registerCallbacks(LLMessageSystem *mesgsys); virtual U64 getNextID (); - virtual S32 encodePacketNum(S32 packet_num, BOOL is_eof); - virtual S32 decodePacketNum(S32 packet_num); - virtual BOOL isLastPacket(S32 packet_num); + virtual S32 encodePacketNum(S32 packet_num, bool is_eof); + virtual S32 decodePacketNum(S32 packet_num); + virtual bool isLastPacket(S32 packet_num); // file requesting routines // .. to file @@ -145,19 +145,19 @@ class LLXferManager const std::string& remote_filename, ELLPath remote_path, const LLHost& remote_host, - BOOL delete_remote_on_completion, + bool delete_remote_on_completion, void (*callback)(void**,S32,LLExtStat), void** user_data, - BOOL is_priority = FALSE, - BOOL use_big_packets = FALSE); + bool is_priority = false, + bool use_big_packets = false); /* // .. to memory virtual void requestFile(const std::string& remote_filename, ELLPath remote_path, const LLHost &remote_host, - BOOL delete_remote_on_completion, + bool delete_remote_on_completion, void (*callback)(void*, S32, void**, S32, LLExtStat), void** user_data, - BOOL is_priority = FALSE); + bool is_priority = false); */ // vfile requesting // .. to vfile @@ -165,7 +165,7 @@ class LLXferManager LLAssetType::EType type, const LLHost& remote_host, void (*callback)(void**,S32,LLExtStat), void** user_data, - BOOL is_priority = FALSE); + bool is_priority = false); /** When arbitrary files are requested to be transfered (by giving a dir of LL_PATH_NONE) they must be "expected", but having something pre-authorize them. This pair of functions diff --git a/indra/llmessage/llxorcipher.cpp b/indra/llmessage/llxorcipher.cpp index 9053e1b2f1..17651b1ecf 100644 --- a/indra/llmessage/llxorcipher.cpp +++ b/indra/llmessage/llxorcipher.cpp @@ -109,7 +109,7 @@ void LLXORCipher::init(const U8* pad, U32 pad_len) #ifdef _DEBUG // static -BOOL LLXORCipher::testHarness() +bool LLXORCipher::testHarness() { const U32 PAD_LEN = 3; const U8 PAD[] = "abc"; @@ -122,7 +122,7 @@ BOOL LLXORCipher::testHarness() cipher.encrypt((U8*)MESSAGE, MSG_LENGTH, encrypted, MSG_LENGTH); cipher.decrypt(encrypted, MSG_LENGTH, decrypted, MSG_LENGTH); - if(0 != memcmp((void*)MESSAGE, decrypted, MSG_LENGTH)) return FALSE; - return TRUE; + if(0 != memcmp((void*)MESSAGE, decrypted, MSG_LENGTH)) return false; + return true; } #endif diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 5e24061959..d11efab7ab 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -362,7 +362,7 @@ void LLMessageSystem::clearReceiveState() } -BOOL LLMessageSystem::poll(F32 seconds) +bool LLMessageSystem::poll(F32 seconds) { S32 num_socks; apr_status_t status; @@ -373,11 +373,11 @@ BOOL LLMessageSystem::poll(F32 seconds) } if (num_socks) { - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -468,7 +468,7 @@ LLCircuitData* LLMessageSystem::findCircuit(const LLHost& host, else { // wake up the circuit - cdp->setAlive(TRUE); + cdp->setAlive(true); if(resetPacketId) { @@ -484,10 +484,10 @@ LLCircuitData* LLMessageSystem::findCircuit(const LLHost& host, // Returns TRUE if a valid, on-circuit message has been received. // Requiring a non-const LockMessageChecker reference ensures that // mMessageReader has been set to mTemplateMessageReader. -BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) +bool LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) { // Pump - BOOL valid_packet = FALSE; + bool valid_packet = false; LLTransferTargetVFile::updateQueue(); @@ -506,8 +506,8 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) { clearReceiveState(); - BOOL recv_reliable = FALSE; - BOOL recv_resent = FALSE; + BOOL recv_reliable = false; + BOOL recv_resent = false; S32 acks = 0; S32 true_rcv_size = 0; @@ -531,7 +531,7 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) callExceptionFunc(MX_PACKET_TOO_SHORT); } // no data in packet receive buffer - valid_packet = FALSE; + valid_packet = false; } else { @@ -554,7 +554,7 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) LL_WARNS("Messaging") << "Malformed packet received. Packet size " << receive_size << " with invalid no. of acks " << acks << LL_ENDL; - valid_packet = FALSE; + valid_packet = false; continue; } } @@ -593,11 +593,11 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) if (buffer[0] & LL_RELIABLE_FLAG) { - recv_reliable = TRUE; + recv_reliable = true; } if (buffer[0] & LL_RESENT_FLAG) { - recv_resent = TRUE; + recv_resent = true; if (cdp && cdp->isDuplicateResend(mCurrentRecvPacketID)) { // We need to ACK here to suppress @@ -635,7 +635,7 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) LL_INFOS("Messaging") << str.str() << LL_ENDL; } mPacketsIn++; - valid_packet = FALSE; + valid_packet = false; continue; } } @@ -664,7 +664,7 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) { logMsgFromInvalidCircuit( host, recv_reliable ); clearReceiveState(); - valid_packet = FALSE; + valid_packet = false; } if( @@ -677,12 +677,12 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) clearReceiveState(); sendDenyTrustedCircuit(host); - valid_packet = FALSE; + valid_packet = false; } if( valid_packet ) { - logValidMsg(cdp, host, recv_reliable, recv_resent, (BOOL)(acks>0) ); + logValidMsg(cdp, host, recv_reliable, recv_resent, acks>0 ); valid_packet = mTemplateMessageReader->readMessage(buffer, host); } @@ -943,7 +943,7 @@ void LLMessageSystem::nextBlock(const char *blockname) nextBlockFast(LLMessageStringTable::getInstance()->getString(blockname)); } -BOOL LLMessageSystem::isSendFull(const char* blockname) +bool LLMessageSystem::isSendFull(const char* blockname) { char* stringTableName = NULL; if(NULL != blockname) @@ -953,7 +953,7 @@ BOOL LLMessageSystem::isSendFull(const char* blockname) return isSendFullFast(stringTableName); } -BOOL LLMessageSystem::isSendFullFast(const char* blockname) +bool LLMessageSystem::isSendFullFast(const char* blockname) { return mMessageBuilder->isMessageFull(blockname); } @@ -961,7 +961,7 @@ BOOL LLMessageSystem::isSendFullFast(const char* blockname) // blow away the last block of a message, return FALSE if that leaves no blocks or there wasn't a block to remove // TODO: Babbage: Remove this horror. -BOOL LLMessageSystem::removeLastBlock() +bool LLMessageSystem::removeLastBlock() { return mMessageBuilder->removeLastBlock(); } @@ -1524,7 +1524,7 @@ void LLMessageSystem::enableCircuit(const LLHost &host, BOOL trusted) } else { - cdp->setAlive(TRUE); + cdp->setAlive(true); } cdp->setTrusted(trusted); } @@ -1595,14 +1595,14 @@ void LLMessageSystem::setCircuitTimeoutCallback(const LLHost &host, void (*callb } -BOOL LLMessageSystem::checkCircuitBlocked(const U32 circuit) +bool LLMessageSystem::checkCircuitBlocked(const U32 circuit) { LLHost host = findHost(circuit); if (!host.isOk()) { LL_DEBUGS("Messaging") << "checkCircuitBlocked: Unknown circuit " << circuit << LL_ENDL; - return TRUE; + return true; } LLCircuitData *cdp = mCircuitInfo.findCircuit(host); @@ -1613,18 +1613,18 @@ BOOL LLMessageSystem::checkCircuitBlocked(const U32 circuit) else { LL_INFOS("Messaging") << "checkCircuitBlocked(circuit): Unknown host - " << host << LL_ENDL; - return FALSE; + return false; } } -BOOL LLMessageSystem::checkCircuitAlive(const U32 circuit) +bool LLMessageSystem::checkCircuitAlive(const U32 circuit) { LLHost host = findHost(circuit); if (!host.isOk()) { LL_DEBUGS("Messaging") << "checkCircuitAlive: Unknown circuit " << circuit << LL_ENDL; - return FALSE; + return false; } LLCircuitData *cdp = mCircuitInfo.findCircuit(host); @@ -1635,11 +1635,11 @@ BOOL LLMessageSystem::checkCircuitAlive(const U32 circuit) else { LL_INFOS("Messaging") << "checkCircuitAlive(circuit): Unknown host - " << host << LL_ENDL; - return FALSE; + return false; } } -BOOL LLMessageSystem::checkCircuitAlive(const LLHost &host) +bool LLMessageSystem::checkCircuitAlive(const LLHost &host) { LLCircuitData *cdp = mCircuitInfo.findCircuit(host); if (cdp) @@ -1649,7 +1649,7 @@ BOOL LLMessageSystem::checkCircuitAlive(const LLHost &host) else { LL_DEBUGS("Messaging") << "checkCircuitAlive(host): Unknown host - " << host << LL_ENDL; - return FALSE; + return false; } } @@ -2291,7 +2291,7 @@ void process_create_trusted_circuit(LLMessageSystem *msg, void **) their_digest[MD5HEX_STR_SIZE - 1] = '\0'; if(msg->isMatchingDigestForWindowAndUUIDs(their_digest, TRUST_TIME_WINDOW, local_id, remote_id)) { - cdp->setTrusted(TRUE); + cdp->setTrusted(true); LL_INFOS("Messaging") << "Trusted digest from " << msg->getSender() << LL_ENDL; return; } @@ -2715,7 +2715,7 @@ void LLMessageSystem::dumpReceiveCounts() -BOOL LLMessageSystem::isClear() const +bool LLMessageSystem::isClear() const { return mMessageBuilder->isClear(); } @@ -2981,12 +2981,12 @@ void LLMessageSystem::setExceptionFunc(EMessageException e, } } -BOOL LLMessageSystem::callExceptionFunc(EMessageException exception) +bool LLMessageSystem::callExceptionFunc(EMessageException exception) { callbacks_t::iterator it = mExceptionCallbacks.find(exception); if(it == mExceptionCallbacks.end()) { - return FALSE; + return false; } exception_t& ex = it->second; @@ -2995,12 +2995,12 @@ BOOL LLMessageSystem::callExceptionFunc(EMessageException exception) if (!ex_cb) { LL_WARNS("Messaging") << "LLMessageSystem::callExceptionFunc: bad message exception callback." << LL_ENDL; - return FALSE; + return false; } (ex_cb)(this, ex.second, exception); - return TRUE; + return true; } void LLMessageSystem::setTimingFunc(msg_timing_callback func, void* data) @@ -3009,14 +3009,14 @@ void LLMessageSystem::setTimingFunc(msg_timing_callback func, void* data) mTimingCallbackData = data; } -BOOL LLMessageSystem::isCircuitCodeKnown(U32 code) const +bool LLMessageSystem::isCircuitCodeKnown(U32 code) const { if(mCircuitCodes.find(code) == mCircuitCodes.end()) - return FALSE; - return TRUE; + return false; + return true; } -BOOL LLMessageSystem::isMessageFast(const char *msg) +bool LLMessageSystem::isMessageFast(const char *msg) { return msg == mMessageReader->getMessageName(); } @@ -3561,12 +3561,12 @@ void LLMessageSystem::addIPPort(const char *varname, U16 v) mMessageBuilder->addIPPort(LLMessageStringTable::getInstance()->getString(varname), v); } -void LLMessageSystem::addBOOLFast(const char* varname, BOOL v) +void LLMessageSystem::addBOOLFast(const char* varname, bool v) { mMessageBuilder->addBOOL(varname, v); } -void LLMessageSystem::addBOOL(const char* varname, BOOL v) +void LLMessageSystem::addBOOL(const char* varname, bool v) { mMessageBuilder->addBOOL(LLMessageStringTable::getInstance()->getString(varname), v); } @@ -3969,7 +3969,7 @@ S32 LLMessageSystem::getReceiveSize() const } //static -void LLMessageSystem::setTimeDecodes( BOOL b ) +void LLMessageSystem::setTimeDecodes( bool b ) { LLMessageReader::setTimeDecodes(b); } diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index c041a69d79..c40da26067 100644 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h @@ -390,7 +390,7 @@ public: void setExceptionFunc(EMessageException exception, msg_exception_callback func, void* data = NULL); // Call the specified exception func, and return TRUE if a // function was found and called. Otherwise return FALSE. - BOOL callExceptionFunc(EMessageException exception); + bool callExceptionFunc(EMessageException exception); // Set a function that will be called once per packet processed with the // hashed message name and the time spent in the processing handler function @@ -407,18 +407,18 @@ public: } // This method returns true if the code is in the circuit codes map. - BOOL isCircuitCodeKnown(U32 code) const; + bool isCircuitCodeKnown(U32 code) const; // usually called in response to an AddCircuitCode message, but // may also be called by the login process. bool addCircuitCode(U32 code, const LLUUID& session_id); - BOOL poll(F32 seconds); // Number of seconds that we want to block waiting for data, returns if data was received - BOOL checkMessages(LockMessageChecker&, S64 frame_count = 0 ); + bool poll(F32 seconds); // Number of seconds that we want to block waiting for data, returns if data was received + bool checkMessages(LockMessageChecker&, S64 frame_count = 0 ); void processAcks(LockMessageChecker&, F32 collect_time = 0.f); - BOOL isMessageFast(const char *msg); - BOOL isMessage(const char *msg) + bool isMessageFast(const char *msg); + bool isMessage(const char *msg) { return isMessageFast(LLMessageStringTable::getInstance()->getString(msg)); } @@ -482,8 +482,8 @@ public: void addBinaryDataFast(const char *varname, const void *data, S32 size); void addBinaryData(const char *varname, const void *data, S32 size); - void addBOOLFast( const char* varname, BOOL b); // typed, checks storage space - void addBOOL( const char* varname, BOOL b); // typed, checks storage space + void addBOOLFast( const char* varname, bool b); // typed, checks storage space + void addBOOL( const char* varname, bool b); // typed, checks storage space void addS8Fast( const char *varname, S8 s); // typed, checks storage space void addS8( const char *varname, S8 s); // typed, checks storage space void addU8Fast( const char *varname, U8 u); // typed, checks storage space @@ -528,10 +528,10 @@ public: // you need to go to the next block type or need to start a new // message. Specify the current blockname to check block counts, // otherwise the method only checks against MTU. - BOOL isSendFull(const char* blockname = NULL); - BOOL isSendFullFast(const char* blockname = NULL); + bool isSendFull(const char* blockname = NULL); + bool isSendFullFast(const char* blockname = NULL); - BOOL removeLastBlock(); + bool removeLastBlock(); //void buildMessage(); @@ -717,9 +717,9 @@ public: void setCircuitAllowTimeout(const LLHost &host, BOOL allow); void setCircuitTimeoutCallback(const LLHost &host, void (*callback_func)(const LLHost &host, void *user_data), void *user_data); - BOOL checkCircuitBlocked(const U32 circuit); - BOOL checkCircuitAlive(const U32 circuit); - BOOL checkCircuitAlive(const LLHost &host); + bool checkCircuitBlocked(const U32 circuit); + bool checkCircuitAlive(const U32 circuit); + bool checkCircuitAlive(const LLHost &host); void setCircuitProtection(BOOL b_protect); U32 findCircuitCode(const LLHost &host); LLHost findHost(const U32 circuit_code); @@ -738,7 +738,7 @@ public: void dumpReceiveCounts(); // dumps receive count for each message type to LL_INFOS() void dumpCircuitInfo(); // Circuit information to LL_INFOS() - BOOL isClear() const; // returns mbSClear; + bool isClear() const; // returns mbSClear; S32 flush(const LLHost &host); U32 getListenPort( void ) const; @@ -765,8 +765,8 @@ public: static U64Microseconds getMessageTimeUsecs(const BOOL update = FALSE); // Get the current message system time in microseconds static F64Seconds getMessageTimeSeconds(const BOOL update = FALSE); // Get the current message system time in seconds - static void setTimeDecodes(BOOL b); - static void setTimeDecodesSpamThreshold(F32 seconds); + static void setTimeDecodes(bool b); + static void setTimeDecodesSpamThreshold(F32 seconds); // message handlers internal to the message systesm //static void processAssignCircuitCode(LLMessageSystem* msg, void**); diff --git a/indra/llmessage/partsyspacket.cpp b/indra/llmessage/partsyspacket.cpp index d87de38aa5..d42a7ef989 100644 --- a/indra/llmessage/partsyspacket.cpp +++ b/indra/llmessage/partsyspacket.cpp @@ -1052,7 +1052,7 @@ U32 LLPartSysCompressedPacket::readWindDiffusionFactor(LLPartInitData *in, U32 s return startByte; } -BOOL LLPartSysCompressedPacket::fromLLPartInitData(LLPartInitData *in, U32 &bytesUsed) +bool LLPartSysCompressedPacket::fromLLPartInitData(LLPartInitData *in, U32 &bytesUsed) { writeFlagByte(in); @@ -1171,7 +1171,7 @@ BOOL LLPartSysCompressedPacket::fromLLPartInitData(LLPartInitData *in, U32 &byte return TRUE; } -BOOL LLPartSysCompressedPacket::toLLPartInitData(LLPartInitData *out, U32 *bytesUsed) +bool LLPartSysCompressedPacket::toLLPartInitData(LLPartInitData *out, U32 *bytesUsed) { U32 currByte = 4; @@ -1259,21 +1259,21 @@ BOOL LLPartSysCompressedPacket::toLLPartInitData(LLPartInitData *out, U32 *bytes } *bytesUsed = currByte; - return TRUE; + return true; } -BOOL LLPartSysCompressedPacket::fromUnsignedBytes(U8 *in, U32 bytesUsed) +bool LLPartSysCompressedPacket::fromUnsignedBytes(U8 *in, U32 bytesUsed) { if ((in != NULL) && (bytesUsed <= sizeof(mData))) { memcpy(mData, in, bytesUsed); /* Flawfinder: ignore */ mNumBytes = bytesUsed; - return TRUE; + return true; } else { LL_ERRS() << "NULL input data or number of bytes exceed mData size" << LL_ENDL; - return FALSE; + return false; } } @@ -1283,10 +1283,10 @@ U32 LLPartSysCompressedPacket::bufferSize() return mNumBytes; } -BOOL LLPartSysCompressedPacket::toUnsignedBytes(U8 *out) +bool LLPartSysCompressedPacket::toUnsignedBytes(U8 *out) { memcpy(out, mData, mNumBytes); /* Flawfinder: ignore */ - return TRUE; + return true; } U8 * LLPartSysCompressedPacket::getBytePtr() diff --git a/indra/llmessage/partsyspacket.h b/indra/llmessage/partsyspacket.h index d9abecea3f..0a8e433cbd 100644 --- a/indra/llmessage/partsyspacket.h +++ b/indra/llmessage/partsyspacket.h @@ -202,10 +202,10 @@ class LLPartSysCompressedPacket public: LLPartSysCompressedPacket(); ~LLPartSysCompressedPacket(); - BOOL fromLLPartInitData(LLPartInitData *in, U32 &bytesUsed); - BOOL toLLPartInitData(LLPartInitData *out, U32 *bytesUsed); - BOOL fromUnsignedBytes(U8 *in, U32 bytesUsed); - BOOL toUnsignedBytes(U8 *out); + bool fromLLPartInitData(LLPartInitData *in, U32 &bytesUsed); + bool toLLPartInitData(LLPartInitData *out, U32 *bytesUsed); + bool fromUnsignedBytes(U8 *in, U32 bytesUsed); + bool toUnsignedBytes(U8 *out); U32 bufferSize(); U8 *getBytePtr(); diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index 4b0fbc0466..2ded1d1906 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -45,7 +45,7 @@ #include "llglheaders.h" #include "glh/glh_linear.h" -extern BOOL gDebugGL; +extern bool gDebugGL; extern BOOL gDebugSession; extern BOOL gDebugGLSession; extern llofstream gFailLog; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 6315b2cd7c..78c4c90663 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -2072,9 +2072,9 @@ S64 LLImageGL::getMipBytes(S32 discard_level) const return res; } -BOOL LLImageGL::isJustBound() const +bool LLImageGL::isJustBound() const { - return (BOOL)(sLastFrameTime - mLastBindTime < 0.5f); + return sLastFrameTime - mLastBindTime < 0.5f; } BOOL LLImageGL::getBoundRecently() const diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index a9a6b93cb3..1b77fd0964 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -148,7 +148,7 @@ public: S64 getBytes(S32 discard_level = -1) const; S64 getMipBytes(S32 discard_level = -1) const; BOOL getBoundRecently() const; - BOOL isJustBound() const; + bool isJustBound() const; BOOL getHasExplicitFormat() const { return mHasExplicitFormat; } LLGLenum getPrimaryFormat() const { return mFormatPrimary; } LLGLenum getFormatType() const { return mFormatType; } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 89d3428d9b..4ffd9198a2 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -286,7 +286,7 @@ extern void init_apple_menu(const char* product); extern BOOL gRandomizeFramerate; extern BOOL gPeriodicSlowFrame; -extern BOOL gDebugGL; +extern bool gDebugGL; #if LL_DARWIN extern bool gHiDPISupport; diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index 4b22f7427b..24e7d8af04 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -1344,7 +1344,7 @@ void LLPanelRequestTools::sendRequest(const LLHost& host) { gXferManager->requestFile(std::string("terrain.raw"), std::string("terrain.raw"), LL_PATH_NONE, host, - FALSE, + false, terrain_download_done, NULL); } diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index a7a7ed1b70..01763e4934 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -782,7 +782,7 @@ void LLMuteList::processMuteListUpdate(LLMessageSystem* msg, void**) filename, LL_PATH_CACHE, msg->getSender(), - TRUE, // make the remote file temporary. + true, // make the remote file temporary. onFileMuteList, (void**)local_filename_and_path, LLXferManager::HIGH_PRIORITY); diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index aa9ff012c3..2c47ef0e32 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -361,8 +361,8 @@ void LLViewerAssetStorage::_queueDataRequest( LLAssetType::EType atype, LLGetAssetCallback callback, void *user_data, - BOOL duplicate, - BOOL is_priority) + bool duplicate, + bool is_priority) { mCountRequests++; queueRequestHttp(uuid, atype, callback, user_data, duplicate, is_priority); @@ -373,8 +373,8 @@ void LLViewerAssetStorage::queueRequestHttp( LLAssetType::EType atype, LLGetAssetCallback callback, void *user_data, - BOOL duplicate, - BOOL is_priority) + bool duplicate, + bool is_priority) { LL_DEBUGS("ViewerAsset") << "Request asset via HTTP " << uuid << " type " << LLAssetType::lookup(atype) << LL_ENDL; diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h index c3719d0918..cc1854d496 100644 --- a/indra/newview/llviewerassetstorage.h +++ b/indra/newview/llviewerassetstorage.h @@ -70,15 +70,15 @@ protected: LLAssetType::EType type, LLGetAssetCallback callback, void *user_data, - BOOL duplicate, - BOOL is_priority) override; + bool duplicate, + bool is_priority) override; void queueRequestHttp(const LLUUID& uuid, LLAssetType::EType type, LLGetAssetCallback callback, void *user_data, - BOOL duplicate, - BOOL is_priority); + bool duplicate, + bool is_priority); void capsRecvForRegion(const LLUUID& region_id, std::string pumpname); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 61cc1dee25..9b5719ea1c 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -95,7 +95,7 @@ std::string gLastRunVersion; extern BOOL gResizeScreenTexture; extern BOOL gResizeShadowTexture; -extern BOOL gDebugGL; +extern bool gDebugGL; //////////////////////////////////////////////////////////////////////////// // Listeners diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8bf69d54bd..cf14b59292 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6805,7 +6805,7 @@ void process_initiate_download(LLMessageSystem* msg, void**) sim_filename, LL_PATH_NONE, msg->getSender(), - FALSE, // don't delete remote + false, // don't delete remote callback_download_complete, (void**)new std::string(viewer_filename)); } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index a0a9da5bec..1b7c668b7d 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3186,7 +3186,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data) U64 new_id = gXferManager->requestFile(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ft->mFilename), ft->mFilename, LL_PATH_CACHE, object->mRegionp->getHost(), - TRUE, + true, &LLViewerObject::processTaskInvFile, (void**)ft, // This takes ownership of ft LLXferManager::HIGH_PRIORITY); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 0917a819d0..a91da62f80 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2140,13 +2140,13 @@ void LLVOVolume::updateFaceSize(S32 idx) } } -BOOL LLVOVolume::isRootEdit() const +bool LLVOVolume::isRootEdit() const { if (mParent && !((LLViewerObject*)mParent)->isAvatar()) { - return FALSE; + return false; } - return TRUE; + return true; } //virtual diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index b65450a3f2..b8ccc26cad 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -134,7 +134,7 @@ public: BOOL isVisible() const ; BOOL isActive() const override; BOOL isAttachment() const override; - BOOL isRootEdit() const override; // overridden for sake of attachments treating themselves as a root object + bool isRootEdit() const override; // overridden for sake of attachments treating themselves as a root object BOOL isHUDAttachment() const override; void generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 3a1edb0d00..7f83f17def 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -209,7 +209,7 @@ const U32 DEFERRED_VB_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TE extern S32 gBoxFrame; //extern BOOL gHideSelectedObjects; extern BOOL gDisplaySwapBuffers; -extern BOOL gDebugGL; +extern bool gDebugGL; extern BOOL gCubeSnapshot; extern BOOL gSnapshotNoPost; |