~didrocks/compiz/g-c-c-integration

« back to all changes in this revision

Viewing changes to plugins/switcher/src/switcher.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:
480
480
            if (w == windows.back ())
481
481
                newSelected = windows.begin ();
482
482
            else
483
 
                newSelected++;
 
483
                ++newSelected;
484
484
 
485
485
            selected = *newSelected;
486
486
        }