mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
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:
parent
ec63398042
commit
5c688260d5
8 changed files with 22 additions and 22 deletions
|
|
@ -66,7 +66,7 @@ template<class T> inline void Selection<T>::offset( const Point3F &delta )
|
|||
{
|
||||
typename Selection<T>::iterator itr = this->begin();
|
||||
|
||||
for ( ; itr != this->end(); itr++ )
|
||||
for (; itr != this->end(); ++itr)
|
||||
offsetObject( *itr, delta );
|
||||
}
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ template<class T> inline void Selection<T>::rotate( const EulerF &delta )
|
|||
typename Selection<T>::iterator itr = this->begin();
|
||||
Point3F origin = getOrigin();
|
||||
|
||||
for ( ; itr != this->end(); itr++ )
|
||||
for (; itr != this->end(); ++itr)
|
||||
rotateObject( *itr, delta, origin );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue