MCPcopy Create free account
hub / github.com/ZDoom/gzdoom / ResolveForDefault

Function ResolveForDefault

src/scripting/backend/codegen_doom.cpp:235–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233//==========================================================================
234
235static FxExpression *ResolveForDefault(FxIdentifier *expr, FxExpression*& object, PContainerType* objtype, FCompileContext &ctx)
236{
237
238 if (expr->Identifier == NAME_Default)
239 {
240 if (!isActor(objtype))
241 {
242 expr->ScriptPosition.Message(MSG_ERROR, "'Default' requires an actor type.");
243 delete object;
244 object = nullptr;
245 return nullptr;
246 }
247
248 FxExpression * x = new FxClassDefaults(object, expr->ScriptPosition);
249 object = nullptr;
250 delete expr;
251 return x->Resolve(ctx);
252 }
253 return expr;
254}
255
256
257//==========================================================================

Callers

nothing calls this directly

Calls 3

isActorFunction · 0.85
MessageMethod · 0.80
ResolveMethod · 0.45

Tested by

no test coverage detected