mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 20:34:07 +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);
|
||||
} else {
|
||||
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;
|
||||
}
|
||||
++itemItr;
|
||||
}
|
||||
}
|
||||
if (_mortalEntities.size() < 1) {
|
||||
_nextExpiry = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue