MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / unregisterModule

Method unregisterModule

Engine/source/module/moduleManager.cpp:2137–2158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2135//-----------------------------------------------------------------------------
2136
2137bool ModuleManager::unregisterModule( const char* pModuleId, const U32 versionId )
2138{
2139 // Sanity!
2140 AssertFatal( pModuleId != NULL, "A module Id cannot be NULL." );
2141
2142 // Fetch module Id.
2143 StringTableEntry moduleId = StringTable->insert( pModuleId );
2144
2145 // Find the module definition.
2146 ModuleDefinition* pModuleDefinition = findModule( pModuleId, versionId );
2147
2148 // Did we find the module definition?
2149 if ( pModuleDefinition == NULL )
2150 {
2151 // No, so warn.
2152 Con::warnf( "Module Manager: Cannot unregister module Id '%s' as it is not registered.", moduleId );
2153 return false;
2154 }
2155
2156 // Remove the module definition.
2157 return removeModuleDefinition( pModuleDefinition );
2158}
2159
2160//-----------------------------------------------------------------------------
2161

Callers 1

Calls 2

warnfFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected