Use an emplace instead of an insert

pull/3097/head
jvoisin 3 years ago
parent 7400050b38
commit 0792bb212a

@ -1609,7 +1609,7 @@ namespace MWMechanics
MWRender::Animation *anim = MWBase::Environment::get().getWorld()->getAnimation(ptr);
if (!anim)
return;
mActors.insert(std::make_pair(ptr, new Actor(ptr, anim)));
mActors.emplace(ptr, new Actor(ptr, anim));
CharacterController* ctrl = mActors[ptr]->getCharacterController();
if (updateImmediately)

Loading…
Cancel
Save