Reduce code duplication a bit

Günther Brammer 2011-04-01 00:03:02 +02:00
parent e6e5b801d6
commit b403fc61c1
1 changed files with 5 additions and 6 deletions

View File

@ -394,16 +394,15 @@ void C4Value::CompileFunc(StdCompiler *pComp, C4ValueNumbers * numbers)
assert(fCompiler);
C4ID id;
pComp->Value(id);
Data.PropList = Definitions.ID2Def(id);
Type = C4V_PropList;
if (!Data.PropList)
C4PropList * p = Definitions.ID2Def(id);
if (!p)
{
LogF("ERROR: Definition %s is missing.", id.ToString());
Type = C4V_Any;
Set0();
pComp->Warn("ERROR: Definition %s is missing.", id.ToString());
}
else
{
Data.PropList->AddRef(this);
SetPropList(p);
}
break;
}