| 2287 | //----------------------------------------------------------------------------- |
| 2288 | |
| 2289 | bool 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 |
no test coverage detected