Silence various warnings

Günther Brammer 2011-03-28 20:58:42 +02:00
parent 1c43f9dd76
commit 6768614feb
3 changed files with 5 additions and 1 deletions

View File

@ -536,7 +536,7 @@ void C4GameControl::PrepareInput()
if (Application.pGamePadControl) Application.pGamePadControl->DoAxisInput();
// per-player input
C4Player *plr; int32_t i=0;
while (plr = ::Players.GetLocalByIndex(i++))
while ((plr = ::Players.GetLocalByIndex(i++)))
plr->Control.PrepareInput();
}

View File

@ -277,10 +277,12 @@ bool C4Object::Init(C4PropList *pDef, C4Object *pCreator,
// Color
if (Def->ColorByOwner)
{
if (ValidPlr(Owner))
Color=::Players.Get(Owner)->ColorDw;
else
Color=0xff; // no-owner color: blue
}
// Shape & face
Shape=Def->Shape;

View File

@ -1074,6 +1074,7 @@ void C4AulParseState::AddBCC(C4AulBCCType eType, intptr_t X)
// Prune unneeded Incs / Decs
if(eType == AB_STACK && X < 0 && (pCPos1->bccType == AB_Inc || pCPos1->bccType == AB_Dec))
{
if(C4ScriptOpMap[pCPos1->Par.i].ResultModifier != pCPos1->bccType)
{
pCPos1->bccType = eType;
@ -1087,6 +1088,7 @@ void C4AulParseState::AddBCC(C4AulBCCType eType, intptr_t X)
a->RemoveLastBCC();
pCPos1--;
}
}
// Join VARN_SET + STACK -1 to IVARN (equivalent)
if(eType == AB_STACK && X == -1 && pCPos1->bccType == AB_VARN_SET)