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

Method findModuleId

Engine/source/module/moduleManager.cpp:2398–2416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2396//-----------------------------------------------------------------------------
2397
2398ModuleManager::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

Callers 2

mergeModulesMethod · 0.80

Calls 4

EmptyStringMethod · 0.80
warnfFunction · 0.50
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected