~vanvugt/compiz/blacklist

« back to all changes in this revision

Viewing changes to src/option.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:
381
381
                        CompString         name,
382
382
                        unsigned int       *index)
383
383
{
384
 
    unsigned int i;
385
 
 
386
 
    for (i = 0; i < options.size (); i++)
 
384
    for (unsigned int i = 0; i < options.size (); i++)
387
385
    {
388
386
        if (options[i].priv->name == name)
389
387
        {