minor optimiztion

This commit is contained in:
Andrew Meadows 2016-03-24 21:09:45 -07:00
parent 39ef5402bd
commit d3d724530a

View file

@ -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;
}
}
}