forked from Mirrors/openclonk
Added parentheses to clarify when an assignment result was intentionally used as truth value.
To silence some warnings.shapetextures
parent
36fbbb34a4
commit
3e4b30b2ba
|
@ -479,8 +479,8 @@ void C4GameParameters::EnforceLeagueRules(C4Scenario *pScenario)
|
|||
if (pScenario) MaxPlayers = pScenario->Head.MaxPlayerLeague;
|
||||
// forced league values in custom scenario parameters
|
||||
size_t idx=0; const C4ScenarioParameterDef *pdef; int32_t val;
|
||||
while(pdef = ::Game.ScenarioParameterDefs.GetParameterDefByIndex(idx++))
|
||||
if (val = pdef->GetLeagueValue())
|
||||
while ((pdef = ::Game.ScenarioParameterDefs.GetParameterDefByIndex(idx++)))
|
||||
if ((val = pdef->GetLeagueValue()))
|
||||
ScenarioParameters.SetValue(pdef->GetID(), val, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ void C4GameOptionsList::OptionScenarioParameter::DoDropdownFill(C4GUI::ComboBox_
|
|||
{
|
||||
// Fill dropdown menuy with known possible options for this parameter
|
||||
size_t idx=0; const C4ScenarioParameterDef::Option *option;
|
||||
while (option = ParameterDef->GetOptionByIndex(idx++))
|
||||
while ((option = ParameterDef->GetOptionByIndex(idx++)))
|
||||
{
|
||||
pFiller->AddEntry(option->Name.getData(), option->Value);
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ void C4GameOptionsList::InitOptions()
|
|||
if (param_defs)
|
||||
{
|
||||
size_t idx = 0; const C4ScenarioParameterDef *def;
|
||||
while (def = param_defs->GetParameterDefByIndex(idx++))
|
||||
while ((def = param_defs->GetParameterDefByIndex(idx++)))
|
||||
if (!def->IsAchievement()) // achievements are displayed in scenario selection. no need to repeat them here
|
||||
new OptionScenarioParameter(this, def);
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ void C4GameOptionsList::InitOptions()
|
|||
void C4GameOptionsList::ClearOptions()
|
||||
{
|
||||
C4GUI::Element *pFirst;
|
||||
while (pFirst = GetFirst()) delete pFirst;
|
||||
while ((pFirst = GetFirst())) delete pFirst;
|
||||
}
|
||||
|
||||
void C4GameOptionsList::Update()
|
||||
|
|
Loading…
Reference in New Issue