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

Method ReplaceFuncDef

sdk/angelscript/source/as_module.cpp:1542–1557  ·  view source on GitHub ↗

internal

Source from the content-addressed store, hash-verified

1540
1541// internal
1542void asCModule::ReplaceFuncDef(asCFuncdefType* type, asCFuncdefType* newType)
1543{
1544 int i = m_funcDefs.IndexOf(type);
1545 if( i >= 0 )
1546 {
1547 m_funcDefs[i] = newType;
1548
1549 // Replace it in the lookup map too
1550 asSMapNode<asSNameSpaceNamePair, asCTypeInfo*>* result = 0;
1551 if(m_typeLookup.MoveTo(&result, asSNameSpaceNamePair(type->nameSpace, type->name)))
1552 {
1553 asASSERT( result->value == type );
1554 result->value = newType;
1555 }
1556 }
1557}
1558
1559// internal
1560asCTypeInfo *asCModule::GetType(const asCString &type, asSNameSpace *ns) const

Callers 2

ReadInnerMethod · 0.80
CompleteFuncDefMethod · 0.80

Calls 3

IndexOfMethod · 0.80
MoveToMethod · 0.80

Tested by

no test coverage detected