diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index bc142cb245..6ad0b12cf9 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -510,15 +510,7 @@ void Object::ClearUpdateMask(bool remove) void Object::BuildFieldsUpdate(Player* player, UpdateDataMapType& data_map) const { - UpdateDataMapType::iterator iter = data_map.find(player); - - if (iter == data_map.end()) - { - std::pair p = data_map.emplace(player, UpdateData()); - ASSERT(p.second); - iter = p.first; - } - + UpdateDataMapType::iterator iter = data_map.try_emplace(player).first; BuildValuesUpdateBlockForPlayer(&iter->second, iter->first); }