~renatofilho/compiz/compiz-lp1036542

« back to all changes in this revision

Viewing changes to plugins/opengl/src/paint.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:
244
244
    if (!(mask & PAINT_SCREEN_NO_OCCLUSION_DETECTION_MASK))
245
245
    {
246
246
        /* detect occlusions */
247
 
        for (rit = pl.rbegin (); rit != pl.rend (); rit++)
 
247
        for (rit = pl.rbegin (); rit != pl.rend (); ++rit)
248
248
        {
249
249
            w = (*rit);
250
250
            gw = GLWindow::get (w);