MCPcopy Create free account
hub / github.com/anjo76/angelscript / ComputeSignatureId

Method ComputeSignatureId

sdk/angelscript/source/as_scriptfunction.cpp:1034–1053  ·  view source on GitHub ↗

internal

Source from the content-addressed store, hash-verified

1032
1033// internal
1034void asCScriptFunction::ComputeSignatureId()
1035{
1036 // This function will compute the signatureId based on the
1037 // function name, return type, and parameter types. The object
1038 // type for methods is not used, so that class methods and
1039 // interface methods match each other.
1040 for( asUINT n = 0; n < engine->signatureIds.GetLength(); n++ )
1041 {
1042 if( !IsSignatureEqual(engine->signatureIds[n]) ) continue;
1043
1044 // We don't need to increment the reference counter here, because
1045 // asCScriptEngine::FreeScriptFunctionId will maintain the signature
1046 // id as the function is freed.
1047 signatureId = engine->signatureIds[n]->signatureId;
1048 return;
1049 }
1050
1051 signatureId = id;
1052 engine->signatureIds.PushLast(this);
1053}
1054
1055// internal
1056bool asCScriptFunction::IsSignatureEqual(const asCScriptFunction *func) const

Callers 3

ReadFunctionMethod · 0.80
AddScriptFunctionMethod · 0.80

Calls 2

PushLastMethod · 0.80
GetLengthMethod · 0.45

Tested by

no test coverage detected