Skip to content
Commit e20ab381 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Unlock effect chains in the middle of two if's

As part of the upcoming threadLoop() merge, this CL makes it clearer
what are the similar and different parts before and after unlocking
effect chains.

In each threadLoop(), the old code was:

    if (sleepTime == 0) {
        // A
        unlockEffectChains(effectChains);
        // B
    } else {
        unlockEffectChains(effectChains);
        // C
    }

The new code is:

    if (sleepTime == 0) {
        // A
    }
    unlockEffectChains(effectChains);
    if (sleepTime == 0) {
        // B
    } else {
        // C
    }

Also this is slightly slower by one "if", it has the advantage of making
it much more obvious about what is done before and after the unlock,
and also to see the similarities and differences among the various
copies of threadLoop().

Change-Id: I7bf4369d2dcb072573ec43b7e52c637f0097dc00
parent be3835c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment