Merge lp:~mc-return/compiz/compiz.merge-shiftswitcher-one-if-statement-is-enough into lp:compiz/0.9.9
Proposed by
MC Return
Status: | Merged |
---|---|
Approved by: | Ćukasz Zemczak |
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 (community) | continuous-integration | Needs Fixing | |
Daniel van Vugt | Approve | ||
Sam Spilsbury | Approve | ||
Review via email: mp+132516@code.launchpad.net |
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.
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.