Issue found with PVS-Studio:

Many places utilize post-incrementation with iterators, but it's better performance to use pre-incrementation.

Resolved by changing the iter++ instances to ++iter;
This commit is contained in:
Areloch 2015-07-13 23:08:17 -05:00
parent ec63398042
commit 5c688260d5
8 changed files with 22 additions and 22 deletions

View file

@ -56,7 +56,7 @@ Point3F Selection<ForestItem>::getOrigin()
Selection<ForestItem>::iterator itr = begin();
for ( ; itr != end(); itr++ )
for (; itr != end(); ++itr)
{
const MatrixF &mat = itr->getTransform();
Point3F wPos;