~vanvugt/compiz/blacklist

« back to all changes in this revision

Viewing changes to src/modifierhandler.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:
156
156
unsigned int
157
157
ModifierHandler::virtualToRealModMask (unsigned int modMask)
158
158
{
159
 
    int i;
160
 
 
161
 
    for (i = 0; i < CompModNum; i++)
 
159
    for (int i = 0; i < CompModNum; i++)
162
160
    {
163
161
        if (modMask & virtualModMask[i])
164
162
        {