MovementAiComponent pass

This commit is contained in:
David Markowitz
2023-07-09 20:38:47 -07:00
parent 2528e02b98
commit 8a512e5c76
3 changed files with 94 additions and 218 deletions

View File

@@ -37,10 +37,7 @@ CDPhysicsComponentTable::~CDPhysicsComponentTable() {
}
CDPhysicsComponent* CDPhysicsComponentTable::GetByID(unsigned int componentID) {
for (auto e : m_entries) {
if (e.first == componentID) return e.second;
}
return nullptr;
auto itr = m_entries.find(componentID);
return itr != m_entries.end() ? itr->second : nullptr;
}