From 4be4c028253f454281e2347705c5d2e8b13c7d52 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Fri, 7 Jan 2011 18:30:14 +0000 Subject: [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) --- AppKit/GTMNSAnimation+Duration.m | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'AppKit') 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; } } -- cgit v1.2.3