Commit e20ab38
committed
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: I7bf4369d2dcb072573ec43b7e52c637f0097dc001 parent be3835c commit e20ab38
1 file changed
+25
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2111 | 2111 | | |
2112 | 2112 | | |
2113 | 2113 | | |
2114 | | - | |
| 2114 | + | |
| 2115 | + | |
2115 | 2116 | | |
2116 | 2117 | | |
2117 | 2118 | | |
2118 | 2119 | | |
2119 | | - | |
2120 | | - | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
2121 | 2127 | | |
2122 | 2128 | | |
2123 | 2129 | | |
| |||
2141 | 2147 | | |
2142 | 2148 | | |
2143 | 2149 | | |
2144 | | - | |
2145 | | - | |
2146 | 2150 | | |
2147 | 2151 | | |
2148 | 2152 | | |
| |||
2920 | 2924 | | |
2921 | 2925 | | |
2922 | 2926 | | |
2923 | | - | |
| 2927 | + | |
| 2928 | + | |
2924 | 2929 | | |
2925 | 2930 | | |
2926 | 2931 | | |
2927 | 2932 | | |
2928 | 2933 | | |
2929 | 2934 | | |
2930 | 2935 | | |
2931 | | - | |
| 2936 | + | |
2932 | 2937 | | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
2933 | 2943 | | |
2934 | 2944 | | |
2935 | 2945 | | |
| |||
2939 | 2949 | | |
2940 | 2950 | | |
2941 | 2951 | | |
2942 | | - | |
2943 | 2952 | | |
2944 | 2953 | | |
2945 | 2954 | | |
| |||
3191 | 3200 | | |
3192 | 3201 | | |
3193 | 3202 | | |
3194 | | - | |
| 3203 | + | |
| 3204 | + | |
3195 | 3205 | | |
3196 | 3206 | | |
3197 | 3207 | | |
3198 | 3208 | | |
3199 | | - | |
3200 | | - | |
| 3209 | + | |
| 3210 | + | |
| 3211 | + | |
| 3212 | + | |
3201 | 3213 | | |
| 3214 | + | |
| 3215 | + | |
3202 | 3216 | | |
3203 | 3217 | | |
3204 | 3218 | | |
3205 | 3219 | | |
3206 | 3220 | | |
3207 | 3221 | | |
3208 | 3222 | | |
3209 | | - | |
3210 | | - | |
3211 | 3223 | | |
3212 | 3224 | | |
3213 | 3225 | | |
| |||
0 commit comments