mirror of https://github.com/AxioDL/metaforce.git
CAiFuncMap: Reserve containers before adding entries
Eliminates some reallocation churn.
This commit is contained in:
parent
10c6c6729f
commit
a9be7b45b2
|
@ -6,6 +6,7 @@
|
|||
namespace urde {
|
||||
CAiFuncMap::CAiFuncMap() {
|
||||
/* Ai States */
|
||||
x0_stateFuncs.reserve(55);
|
||||
x0_stateFuncs.emplace("Patrol", &CAi::Patrol);
|
||||
x0_stateFuncs.emplace("FollowPattern", &CAi::FollowPattern);
|
||||
x0_stateFuncs.emplace("Dead", &CAi::Dead);
|
||||
|
@ -63,6 +64,7 @@ CAiFuncMap::CAiFuncMap() {
|
|||
x0_stateFuncs.emplace("PodAttack", &CAi::PodAttack);
|
||||
|
||||
/* Ai Triggers */
|
||||
x10_triggerFuncs.reserve(68);
|
||||
x10_triggerFuncs.emplace("InAttackPosition", &CAi::InAttackPosition);
|
||||
x10_triggerFuncs.emplace("Leash", &CAi::Leash);
|
||||
x10_triggerFuncs.emplace("OffLine", &CAi::OffLine);
|
||||
|
|
Loading…
Reference in New Issue