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

Method MatchesType

neo/game/script/Script_Program.cpp:233–255  ·  view source on GitHub ↗

================ idTypeDef::MatchesType Returns true if both types' base types and parameters match ================ */

Source from the content-addressed store, hash-verified

231================
232*/
233bool idTypeDef::MatchesType( const idTypeDef &matchtype ) const {
234 int i;
235
236 if ( this == &matchtype ) {
237 return true;
238 }
239
240 if ( ( type != matchtype.type ) || ( auxType != matchtype.auxType ) ) {
241 return false;
242 }
243
244 if ( parmTypes.Num() != matchtype.parmTypes.Num() ) {
245 return false;
246 }
247
248 for( i = 0; i < matchtype.parmTypes.Num(); i++ ) {
249 if ( parmTypes[ i ] != matchtype.parmTypes[ i ] ) {
250 return false;
251 }
252 }
253
254 return true;
255}
256
257/*
258================

Callers 2

GetTypeMethod · 0.45
ParseEventDefMethod · 0.45

Calls 1

NumMethod · 0.45

Tested by

no test coverage detected