~timo-jyrinki/compiz/metacity-key-migrations

« back to all changes in this revision

Viewing changes to plugins/animationaddon/src/burn.cpp

Fixed various problems described in bug 1030473.
Optimized performance and style following suggestions reported by cppcheck:

1. Reduced the scope of various variables.

2. Used prefix ++ operators for non-primitive types, because those can be more efficient than post-increment. Post-increment usually keeps a copy of the previous value, adds extra code and is slower.. Fixes: https://bugs.launchpad.net/bugs/1030473. Approved by Daniel van Vugt, Sam Spilsbury.

Show diffs side-by-side

added added

removed removed

Lines of Context:
392
392
        // force animation to continue until particle systems are done
393
393
        mRemainingTime = timestep;
394
394
 
395
 
    int nParticles;
396
395
    Particle *part;
397
396
 
398
397
    if (mRemainingTime > 0)
399
398
    {
 
399
        int nParticles;
400
400
        if (mHasSmoke)
401
401
        {
402
402
            float partxg = outRect.width () / 40.0;