forked from electronicarts/CnC_Generals_Zero_Hour
-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Labels
InvestigatePerformanceIs a performance concernIs a performance concernRefactorEdits the code with insignificant behavior changes, is never user facingEdits the code with insignificant behavior changes, is never user facing
Description
SimpleObjectIterator is 16 bytes but allocated in memory pools. This looks like a waste of space. It could simply be used as a stack object.
...
SimpleObjectIterator *iter = ThePartitionManager->iterateObjectsInRange(
self, visionRange, FROM_CENTER_2D, filters); // <--- this allocates 16 byte iterator. Why??????
MemoryPoolObjectHolder hold(iter);
for (Object *them = iter->first(); them; them = iter->next())
{
...
Metadata
Metadata
Assignees
Labels
InvestigatePerformanceIs a performance concernIs a performance concernRefactorEdits the code with insignificant behavior changes, is never user facingEdits the code with insignificant behavior changes, is never user facing