mirror of
https://github.com/lubosz/overte.git
synced 2025-04-07 22:42:05 +02:00
only one copy of entityIDs instead of two
This commit is contained in:
parent
dbeea4038d
commit
9dd0105ba5
1 changed files with 5 additions and 7 deletions
|
@ -339,14 +339,12 @@ void Avatar::removeAvatarEntitiesFromTree() {
|
|||
auto treeRenderer = DependencyManager::get<EntityTreeRenderer>();
|
||||
EntityTreePointer entityTree = treeRenderer ? treeRenderer->getTree() : nullptr;
|
||||
if (entityTree) {
|
||||
QList<QUuid> avatarEntityIDs;
|
||||
_avatarEntitiesLock.withReadLock([&] {
|
||||
avatarEntityIDs = _packedAvatarEntityData.keys();
|
||||
});
|
||||
std::vector<EntityItemID> ids;
|
||||
ids.reserve(avatarEntityIDs.size());
|
||||
foreach (auto id, avatarEntityIDs) {
|
||||
ids.push_back(id);
|
||||
ids.reserve(_packedAvatarEntityData.size());
|
||||
PackedAvatarEntityMap::const_iterator itr = _packedAvatarEntityData.constBegin();
|
||||
while (itr != _packedAvatarEntityData.constEnd()) {
|
||||
ids.push_back(itr.key());
|
||||
++itr;
|
||||
}
|
||||
bool force = true;
|
||||
bool ignoreWarnings = true;
|
||||
|
|
Loading…
Reference in a new issue