aboutsummaryrefslogtreecommitdiff
path: root/AppKit
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-01-07 18:30:14 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-01-07 18:30:14 +0000
commit4be4c028253f454281e2347705c5d2e8b13c7d52 (patch)
treec52e56c2981c18442cdb69fef375304fd06d3377 /AppKit
parent9dbbb99c4bf1d848cb90cb0a12e9e769951d464f (diff)
[Author: thakis]
Fix a harmless clang warning about the self-assignment duration = duration; R=thomasvl APPROVED=thomasvl DELTA=6 (0 added, 1 deleted, 5 changed)
Diffstat (limited to 'AppKit')
-rw-r--r--AppKit/GTMNSAnimation+Duration.m11
1 files changed, 5 insertions, 6 deletions
diff --git a/AppKit/GTMNSAnimation+Duration.m b/AppKit/GTMNSAnimation+Duration.m
index e3d0d81..1f09492 100644
--- a/AppKit/GTMNSAnimation+Duration.m
+++ b/AppKit/GTMNSAnimation+Duration.m
@@ -35,12 +35,11 @@ NSTimeInterval GTMModifyDurationBasedOnCurrentState(NSTimeInterval duration,
// Tab and shift-tab are often used for navigating around UI elements,
// and in the majority of cases slowing down the animations while
// navigating around UI elements is not desired.
- if ((currentEventMask & (NSKeyDownMask | NSKeyUpMask))
- && !(modifiers & NSControlKeyMask)
- && ([[currentEvent characters] length] == 1)
- && ([[currentEvent characters] characterAtIndex:0] == 25)) {
- duration = duration;
- } else {
+ BOOL isShiftTab = (currentEventMask & (NSKeyDownMask | NSKeyUpMask))
+ && !(modifiers & NSControlKeyMask)
+ && ([[currentEvent characters] length] == 1)
+ && ([[currentEvent characters] characterAtIndex:0] == 25);
+ if (!isShiftTab) {
duration *= 5.0;
}
}