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

Method unregisterModule

Engine/source/module/moduleManager.cpp:2289–2310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2287//-----------------------------------------------------------------------------
2288
2289bool ModuleManager::unregisterModule( const char* pModuleId, const U32 versionId )
2290{
2291 // Sanity!
2292 AssertFatal( pModuleId != NULL, "A module Id cannot be NULL." );
2293
2294 // Fetch module Id.
2295 StringTableEntry moduleId = StringTable->insert( pModuleId );
2296
2297 // Find the module definition.
2298 ModuleDefinition* pModuleDefinition = findModule( pModuleId, versionId );
2299
2300 // Did we find the module definition?
2301 if ( pModuleDefinition == NULL )
2302 {
2303 // No, so warn.
2304 Con::warnf( "Module Manager: Cannot unregister module Id '%s' as it is not registered.", moduleId );
2305 return false;
2306 }
2307
2308 // Remove the module definition.
2309 return removeModuleDefinition( pModuleDefinition );
2310}
2311
2312//-----------------------------------------------------------------------------
2313

Callers 1

Calls 2

warnfFunction · 0.50
insertMethod · 0.45

Tested by

no test coverage detected