| 2135 | //----------------------------------------------------------------------------- |
| 2136 | |
| 2137 | bool 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 |
no test coverage detected