llmath: BOOL (int) to real bool

master
Lars Næsbye Christensen 2024-02-09 23:16:24 +01:00 committed by Andrey Lihatskiy
parent 2b31dad400
commit 5666681f85
8 changed files with 33 additions and 33 deletions

View File

@ -38,7 +38,7 @@ void LLBBox::addPointLocal(const LLVector3& p)
{
mMinLocal = p;
mMaxLocal = p;
mEmpty = FALSE;
mEmpty = false;
}
else
{
@ -140,7 +140,7 @@ LLVector3 LLBBox::agentToLocalBasis(const LLVector3& v) const
return v * m;
}
BOOL LLBBox::containsPointLocal(const LLVector3& p) const
bool LLBBox::containsPointLocal(const LLVector3& p) const
{
if ( (p.mV[VX] < mMinLocal.mV[VX])
||(p.mV[VX] > mMaxLocal.mV[VX])
@ -149,12 +149,12 @@ BOOL LLBBox::containsPointLocal(const LLVector3& p) const
||(p.mV[VZ] < mMinLocal.mV[VZ])
||(p.mV[VZ] > mMaxLocal.mV[VZ]))
{
return FALSE;
return false;
}
return TRUE;
return true;
}
BOOL LLBBox::containsPointAgent(const LLVector3& p) const
bool LLBBox::containsPointAgent(const LLVector3& p) const
{
LLVector3 point_local = agentToLocal(p);
return containsPointLocal(point_local);

View File

@ -64,8 +64,8 @@ public:
LLVector3 getExtentLocal() const { return mMaxLocal - mMinLocal; }
BOOL containsPointLocal(const LLVector3& p) const;
BOOL containsPointAgent(const LLVector3& p) const;
bool containsPointLocal(const LLVector3& p) const;
bool containsPointAgent(const LLVector3& p) const;
void addPointAgent(LLVector3 p);
void addBBoxAgent(const LLBBox& b);
@ -92,7 +92,7 @@ private:
LLVector3 mMaxLocal;
LLVector3 mPosAgent; // Position relative to Agent's Region
LLQuaternion mRotation;
BOOL mEmpty; // Nothing has been added to this bbox yet
bool mEmpty; // Nothing has been added to this bbox yet
};
//LLBBox operator*(const LLBBox &a, const LLMatrix4 &b);

View File

@ -69,18 +69,18 @@ F32 LLSphere::getRadius() const
return mRadius;
}
// returns 'TRUE' if this sphere completely contains other_sphere
BOOL LLSphere::contains(const LLSphere& other_sphere) const
// returns 'true' if this sphere completely contains other_sphere
bool LLSphere::contains(const LLSphere& other_sphere) const
{
F32 separation = (mCenter - other_sphere.mCenter).length();
return (mRadius >= separation + other_sphere.mRadius) ? TRUE : FALSE;
return (mRadius >= separation + other_sphere.mRadius) ? true : false;
}
// returns 'TRUE' if this sphere completely contains other_sphere
BOOL LLSphere::overlaps(const LLSphere& other_sphere) const
// returns 'true' if this sphere completely contains other_sphere
bool LLSphere::overlaps(const LLSphere& other_sphere) const
{
F32 separation = (mCenter - other_sphere.mCenter).length();
return (separation <= mRadius + other_sphere.mRadius) ? TRUE : FALSE;
return (separation <= mRadius + other_sphere.mRadius) ? true : false;
}
// returns overlap

View File

@ -47,11 +47,11 @@ public:
const LLVector3& getCenter() const;
F32 getRadius() const;
// returns TRUE if this sphere completely contains other_sphere
BOOL contains(const LLSphere& other_sphere) const;
// returns true if this sphere completely contains other_sphere
bool contains(const LLSphere& other_sphere) const;
// returns TRUE if this sphere overlaps other_sphere
BOOL overlaps(const LLSphere& other_sphere) const;
// returns true if this sphere overlaps other_sphere
bool overlaps(const LLSphere& other_sphere) const;
// returns overlap distance
// negative overlap is closest approach

View File

@ -4789,10 +4789,10 @@ LLVolumeFace::LLVolumeFace() :
mJustWeights(NULL),
mJointIndices(NULL),
#endif
mWeightsScrubbed(FALSE),
mWeightsScrubbed(false),
mOctree(NULL),
mOctreeTriangles(NULL),
mOptimized(FALSE)
mOptimized(false)
{
mExtents = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*3);
mExtents[0].splat(-0.5f);

View File

@ -687,9 +687,9 @@ class LLProfile
public:
LLProfile()
: mOpen(FALSE),
mConcave(FALSE),
mDirty(TRUE),
: mOpen(false),
mConcave(false),
mDirty(true),
mTotalOut(0),
mTotal(2)
{
@ -779,9 +779,9 @@ public:
public:
LLPath()
: mOpen(FALSE),
: mOpen(false),
mTotal(0),
mDirty(TRUE),
mDirty(true),
mStep(1)
{
}

View File

@ -59,9 +59,9 @@ LLVolumeMgr::~LLVolumeMgr()
mDataMutex = NULL;
}
BOOL LLVolumeMgr::cleanup()
bool LLVolumeMgr::cleanup()
{
BOOL no_refs = TRUE;
bool no_refs = true;
if (mDataMutex)
{
mDataMutex->lock();
@ -73,7 +73,7 @@ BOOL LLVolumeMgr::cleanup()
LLVolumeLODGroup *volgroupp = iter->second;
if (volgroupp->cleanupRefs() == false)
{
no_refs = FALSE;
no_refs = false;
}
delete volgroupp;
}
@ -301,7 +301,7 @@ LLVolume* LLVolumeLODGroup::refLOD(const S32 lod)
return mVolumeLODs[lod];
}
BOOL LLVolumeLODGroup::derefLOD(LLVolume *volumep)
bool LLVolumeLODGroup::derefLOD(LLVolume *volumep)
{
llassert_always(mRefs > 0);
mRefs--;
@ -317,11 +317,11 @@ BOOL LLVolumeLODGroup::derefLOD(LLVolume *volumep)
mVolumeLODs[i] = NULL;
}
#endif
return TRUE;
return true;
}
}
LL_ERRS() << "Deref of non-matching LOD in volume LOD group" << LL_ENDL;
return FALSE;
return false;
}
S32 LLVolumeLODGroup::getDetailFromTan(const F32 tan_angle)

View File

@ -56,7 +56,7 @@ public:
static S32 getVolumeDetailFromScale(F32 scale);
LLVolume* refLOD(const S32 detail);
BOOL derefLOD(LLVolume *volumep);
bool derefLOD(LLVolume *volumep);
S32 getNumRefs() const { return mRefs; }
const LLVolumeParams* getVolumeParams() const { return &mVolumeParams; };
@ -80,7 +80,7 @@ class LLVolumeMgr
public:
LLVolumeMgr();
virtual ~LLVolumeMgr();
BOOL cleanup(); // Cleanup all volumes being managed, returns TRUE if no dangling references
bool cleanup(); // Cleanup all volumes being managed, returns true if no dangling references
virtual LLVolumeLODGroup* getGroup( const LLVolumeParams& volume_params ) const;