clang reports: unclear || + && and &+| mixes.

This commit is contained in:
Azaezel 2016-10-14 17:26:13 -05:00
parent 1131ed15df
commit c57b1a8b70
16 changed files with 30 additions and 28 deletions

View file

@ -1043,9 +1043,9 @@ NavMesh *AIPlayer::findNavMesh() const
}
else
{
if(getNavSize() == Small && !m->mSmallCharacters ||
getNavSize() == Regular && !m->mRegularCharacters ||
getNavSize() == Large && !m->mLargeCharacters)
if((getNavSize() == Small && !m->mSmallCharacters) ||
(getNavSize() == Regular && !m->mRegularCharacters) ||
(getNavSize() == Large && !m->mLargeCharacters))
continue;
}
if(!mesh || m->getWorldBox().getVolume() < mesh->getWorldBox().getVolume())

View file

@ -572,7 +572,7 @@ void Camera::processTick(const Move* move)
// process input/determine rotation vector
if(virtualMode != StationaryMode &&
virtualMode != TrackObjectMode &&
(!mLocked || virtualMode != OrbitObjectMode && virtualMode != OrbitPointMode))
(!mLocked || ((virtualMode != OrbitObjectMode) && (virtualMode != OrbitPointMode))))
{
if(!strafeMode)
{

View file

@ -632,9 +632,9 @@ DecalInstance* DecalManager::getClosestDecal( const Point3F &pos )
}
}
if ( !collectedInsts.empty() &&
if ( (!collectedInsts.empty() &&
collectedInsts[closestIndex] &&
closestDistance < 1.0f ||
closestDistance < 1.0f) ||
worldInstSphere.isContained( pos ) )
return collectedInsts[closestIndex];
else

View file

@ -440,7 +440,7 @@ void LightFlareData::prepRender(SceneRenderState *state, LightFlareState *flareS
// We can only skip rendering if the light is not
// visible, and it has elapsed the fade out time.
if (mIsZero(occlusionFade) ||
!lightVisible && visDelta > FadeOutTime)
(!lightVisible && visDelta > FadeOutTime))
return;
const RectI &viewport = GFX->getViewport();

View file

@ -3930,9 +3930,9 @@ void Player::updateActionThread()
if (mMountPending)
mMountPending = (isMounted() ? 0 : (mMountPending - 1));
if (mActionAnimation.action == PlayerData::NullAnimation ||
((!mActionAnimation.waitForEnd || mActionAnimation.atEnd)) &&
!mActionAnimation.holdAtEnd && (mActionAnimation.delayTicks -= !mMountPending) <= 0)
if ((mActionAnimation.action == PlayerData::NullAnimation) ||
((!mActionAnimation.waitForEnd || mActionAnimation.atEnd) &&
(!mActionAnimation.holdAtEnd && (mActionAnimation.delayTicks -= !mMountPending) <= 0)))
{
//The scripting language will get a call back when a script animation has finished...
// example: When the chat menu animations are done playing...

View file

@ -2638,7 +2638,7 @@ void ShapeBase::setImageState(U32 imageSlot, U32 newState,bool force)
F32 randomPos = Platform::getRandom();
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
{
if (!image.dataBlock->shapeIsValid[i] || i != imageShapeIndex && !image.doAnimateAllShapes)
if (!image.dataBlock->shapeIsValid[i] || (i != imageShapeIndex && !image.doAnimateAllShapes))
continue;
if (image.animThread[i] && image.state->sequence[i] != -1 && image.state->flashSequence[i]) {
@ -2779,7 +2779,7 @@ void ShapeBase::setImageState(U32 imageSlot, U32 newState,bool force)
updateAnimThread(imageSlot, imageShapeIndex, lastState);
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
{
if (!image.dataBlock->shapeIsValid[i] || i != imageShapeIndex && !image.doAnimateAllShapes)
if (!image.dataBlock->shapeIsValid[i] || (i != imageShapeIndex && !image.doAnimateAllShapes))
continue;
// Start spin thread
@ -2834,7 +2834,7 @@ void ShapeBase::updateAnimThread(U32 imageSlot, S32 imageShapeIndex, ShapeBaseIm
F32 randomPos = Platform::getRandom();
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
{
if (!image.dataBlock->shapeIsValid[i] || i != imageShapeIndex && !image.doAnimateAllShapes)
if (!image.dataBlock->shapeIsValid[i] || (i != imageShapeIndex && !image.doAnimateAllShapes))
continue;
if (image.animThread[i] && stateData.sequence[i] != -1)
@ -3076,7 +3076,7 @@ TICKAGAIN:
U32 imageShapeIndex = getImageShapeIndex(image);
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
{
if (!image.dataBlock->shapeIsValid[i] || i != imageShapeIndex && !image.doAnimateAllShapes)
if (!image.dataBlock->shapeIsValid[i] || (i != imageShapeIndex && !image.doAnimateAllShapes))
continue;
if (image.spinThread[i])
@ -3131,7 +3131,7 @@ void ShapeBase::updateImageAnimation(U32 imageSlot, F32 dt)
// Advance animation threads
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
{
if (!image.dataBlock->shapeIsValid[i] || i != imageShapeIndex && !image.doAnimateAllShapes)
if (!image.dataBlock->shapeIsValid[i] || (i != imageShapeIndex && !image.doAnimateAllShapes))
continue;
if (image.ambientThread[i])

View file

@ -252,7 +252,7 @@ void StaticShape::onUnmount(ShapeBase*,S32)
U32 StaticShape::packUpdate(NetConnection *connection, U32 mask, BitStream *bstream)
{
U32 retMask = Parent::packUpdate(connection,mask,bstream);
if (bstream->writeFlag(mask & PositionMask | ExtendedInfoMask))
if (bstream->writeFlag(mask & (PositionMask | ExtendedInfoMask)))
{
// Write the transform (do _not_ use writeAffineTransform. Since this is a static

View file

@ -1157,7 +1157,7 @@ U32 AITurretShape::packUpdate(NetConnection *connection, U32 mask, BitStream *bs
U32 retMask = Parent::packUpdate(connection,mask,bstream);
// Indicate that the transform has changed to update the scan box
bstream->writeFlag(mask & PositionMask | ExtendedInfoMask);
bstream->writeFlag(mask & (PositionMask | ExtendedInfoMask));
// Handle any state changes that need to be passed along
if (bstream->writeFlag(mask & TurretStateMask))