| 2244 | //----------------------------------------------------------------------------- |
| 2245 | |
| 2246 | ModuleManager::ModuleDefinitionEntry* ModuleManager::findModuleId( StringTableEntry moduleId ) |
| 2247 | { |
| 2248 | // Sanity! |
| 2249 | AssertFatal( moduleId != NULL, "A module Id cannot be NULL." ); |
| 2250 | |
| 2251 | // Is the module Id valid? |
| 2252 | if ( moduleId == StringTable->EmptyString() ) |
| 2253 | { |
| 2254 | // No, so warn. |
| 2255 | Con::warnf( "Module Manager: Invalid Module Id." ); |
| 2256 | return NULL; |
| 2257 | } |
| 2258 | |
| 2259 | // Find module Id. |
| 2260 | typeModuleIdDatabaseHash::iterator moduleItr = mModuleIdDatabase.find( moduleId ); |
| 2261 | |
| 2262 | // Return appropriately. |
| 2263 | return moduleItr != mModuleIdDatabase.end() ? moduleItr->value : NULL; |
| 2264 | } |
| 2265 | |
| 2266 | //----------------------------------------------------------------------------- |
| 2267 |
no test coverage detected