mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:29:01 +02:00
minor optimiztion
This commit is contained in:
parent
39ef5402bd
commit
d3d724530a
1 changed files with 4 additions and 1 deletions
|
@ -101,12 +101,15 @@ void EntitySimulation::expireMortalEntities(const quint64& now) {
|
||||||
prepareEntityForDelete(entity);
|
prepareEntityForDelete(entity);
|
||||||
} else {
|
} else {
|
||||||
if (expiry < _nextExpiry) {
|
if (expiry < _nextExpiry) {
|
||||||
// remeber the smallest _nextExpiry so we know when to start the next search
|
// remember the smallest _nextExpiry so we know when to start the next search
|
||||||
_nextExpiry = expiry;
|
_nextExpiry = expiry;
|
||||||
}
|
}
|
||||||
++itemItr;
|
++itemItr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (_mortalEntities.size() < 1) {
|
||||||
|
_nextExpiry = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue