~compiz-team/compiz/compiz.fix_1088399

« back to all changes in this revision

Viewing changes to plugins/firepaint/src/firepaint.cpp

Minor Performance Optimizations:

* Return ASAP./Prevent executing any unnecessary operations if we return.
* Used De Morgan's laws to merge and simplify if statements.

Other Changes:

* C++ Style: Declared iterator variables inside the for loops they are used in.
* No logic changes have been made.

Approved by Daniel van Vugt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
    coords_cache.size  = 0;
97
97
    dcolors_cache.size = 0;
98
98
 
99
 
    int i;
100
 
 
101
 
    for (i = 0; i < f_numParticles; i++)
 
99
    for (int i = 0; i < f_numParticles; i++)
102
100
    {
103
101
        Particle p;
104
102
        p.life = 0.0f;