mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Reserve vector size
This commit is contained in:
parent
3a22db0a13
commit
597cff335a
1 changed files with 1 additions and 0 deletions
|
@ -30,6 +30,7 @@ const AnimPoseVec& AnimRandomSwitch::evaluate(const AnimVariantMap& animVars, co
|
|||
// filter states different to the last random state and with priorities.
|
||||
bool currentStateHasPriority = false;
|
||||
std::vector<RandomSwitchState::Pointer> randomStatesToConsider;
|
||||
randomStatesToConsider.reserve(_randomStates.size());
|
||||
float totalPriorities = 0.0f;
|
||||
for (size_t i = 0; i < _randomStates.size(); i++) {
|
||||
auto randState = _randomStates[i];
|
||||
|
|
Loading…
Reference in a new issue