mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-26 15:49:30 +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
|
|
@ -65,7 +65,7 @@ ForestWindMgr::ForestWindMgr()
|
|||
ForestWindMgr::~ForestWindMgr()
|
||||
{
|
||||
IdToWindMap::Iterator sourceIter = mSources->begin();
|
||||
for( ; sourceIter != mSources->end(); sourceIter++ )
|
||||
for (; sourceIter != mSources->end(); ++sourceIter)
|
||||
delete (*sourceIter).value;
|
||||
|
||||
delete mSources;
|
||||
|
|
@ -185,7 +185,7 @@ void ForestWindMgr::processTick()
|
|||
PROFILE_SCOPE( ForestWindMgr_AdvanceTime_Cleanup );
|
||||
|
||||
IdToWindMap::Iterator sourceIter = mPrevSources->begin();
|
||||
for( ; sourceIter != mPrevSources->end(); sourceIter++ )
|
||||
for (; sourceIter != mPrevSources->end(); ++sourceIter)
|
||||
{
|
||||
ForestWindAccumulator *accum = (*sourceIter).value;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue