| 2396 | //----------------------------------------------------------------------------- |
| 2397 | |
| 2398 | ModuleManager::ModuleDefinitionEntry* ModuleManager::findModuleId( StringTableEntry moduleId ) |
| 2399 | { |
| 2400 | // Sanity! |
| 2401 | AssertFatal( moduleId != NULL, "A module Id cannot be NULL." ); |
| 2402 | |
| 2403 | // Is the module Id valid? |
| 2404 | if ( moduleId == StringTable->EmptyString() ) |
| 2405 | { |
| 2406 | // No, so warn. |
| 2407 | Con::warnf( "Module Manager: Invalid Module Id." ); |
| 2408 | return NULL; |
| 2409 | } |
| 2410 | |
| 2411 | // Find module Id. |
| 2412 | typeModuleIdDatabaseHash::iterator moduleItr = mModuleIdDatabase.find( moduleId ); |
| 2413 | |
| 2414 | // Return appropriately. |
| 2415 | return moduleItr != mModuleIdDatabase.end() ? moduleItr->value : NULL; |
| 2416 | } |
| 2417 | |
| 2418 | //----------------------------------------------------------------------------- |
| 2419 |
no test coverage detected