Merge lp:~mc-return/compiz/compiz.merge-shiftswitcher-one-if-statement-is-enough into lp:compiz/0.9.9
Proposed by
MC Return
on 2012-11-01
| Status: | Merged |
|---|---|
| Approved by: | Ćukasz Zemczak on 2012-11-05 |
| Approved revision: | 3447 |
| Merged at revision: | 3450 |
| Proposed branch: | lp:~mc-return/compiz/compiz.merge-shiftswitcher-one-if-statement-is-enough |
| Merge into: | lp:compiz/0.9.9 |
| Diff against target: |
27 lines (+2/-8) 1 file modified
plugins/shift/src/shift.cpp (+2/-8) |
| To merge this branch: | bzr merge lp:~mc-return/compiz/compiz.merge-shiftswitcher-one-if-statement-is-enough |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | Needs Fixing on 2012-11-05 | |
| Daniel van Vugt | Approve on 2012-11-05 | ||
| Sam Spilsbury | 2012-11-01 | Approve on 2012-11-01 | |
|
Review via email:
|
|||
Commit Message
Shift Switcher: Minor optimization: As we return in both cases one if statement is enough here (x2).
Description of the Change
Thanks for the suggestion, Daniel :) - you are right of course.
To post a comment you must log in.
review:
Approve
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
review:
Needs Fixing
(continuous-integration)


If the intention is optimization then De Morgan's law [1] suggests there's a more efficient way with fewer operations: Title ())) en.wikipedia. org/wiki/ De_Morgan' s_laws
if (!(textAvailable && optionGetWindow
[1] http://
However I think the syntax you have already is more readable.