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

Method AddFunction

neo/game/script/Script_Program.cpp:547–559  ·  view source on GitHub ↗

================ idTypeDef::AddFunction ================ */

Source from the content-addressed store, hash-verified

545================
546*/
547void idTypeDef::AddFunction( const function_t *func ) {
548 int i;
549
550 for( i = 0; i < functions.Num(); i++ ) {
551 if ( !strcmp( functions[ i ]->def->Name(), func->def->Name() ) ) {
552 if ( func->def->TypeDef()->MatchesVirtualFunction( *functions[ i ]->def->TypeDef() ) ) {
553 functions[ i ] = func;
554 return;
555 }
556 }
557 }
558 functions.Append( func );
559}
560
561/***********************************************************************
562

Callers 2

ParseObjectDefMethod · 0.45
ParseFunctionDefMethod · 0.45

Calls 5

NumMethod · 0.45
NameMethod · 0.45
TypeDefMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected