MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / AllocStatement

Method AllocStatement

neo/game/script/Script_Program.cpp:1633–1640  ·  view source on GitHub ↗

================ idProgram::AllocStatement ================ */

Source from the content-addressed store, hash-verified

1631================
1632*/
1633statement_t *idProgram::AllocStatement( void ) {
1634 if ( statements.Num() >= statements.Max() ) {
1635 throw idCompileError( va( "Exceeded maximum allowed number of statements (%d)", statements.Max() ) );
1636 }
1637 statement_t* ret = statements.Alloc();
1638 ret->flags = 0; // DG: initialize the added flags (that are rarely set/used otherwise) to 0
1639 return ret;
1640}
1641
1642/*
1643==============

Callers 1

EmitOpcodeMethod · 0.45

Calls 5

vaFunction · 0.85
MaxMethod · 0.80
idCompileErrorClass · 0.70
NumMethod · 0.45
AllocMethod · 0.45

Tested by

no test coverage detected