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

Method findModuleId

Engine/source/module/moduleManager.cpp:2246–2264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2244//-----------------------------------------------------------------------------
2245
2246ModuleManager::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

Callers 2

mergeModulesMethod · 0.80

Calls 4

warnfFunction · 0.85
EmptyStringMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected