From 540076e9d55fcb2cd80368d971d1e8723c6167b8 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 4 May 2016 17:12:10 +0900 Subject: [PATCH] Fix code styling issue --- atom/browser/auto_updater_mac.mm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/atom/browser/auto_updater_mac.mm b/atom/browser/auto_updater_mac.mm index edc6972..ab996dd 100644 --- a/atom/browser/auto_updater_mac.mm +++ b/atom/browser/auto_updater_mac.mm @@ -90,13 +90,11 @@ void AutoUpdater::CheckForUpdates() { delegate->OnUpdateNotAvailable(); } } error:^(NSError *error) { - NSString *failureString; - if(error.localizedFailureReason) { - failureString = [NSString stringWithFormat:@"%@: %@", - error.localizedDescription, error.localizedFailureReason]; - } else { - failureString = [NSString stringWithString: error.localizedDescription]; - } + NSString* failureString = error.localizedFailureReason ? + [NSString stringWithFormat:@"%@: %@", + error.localizedDescription, + error.localizedFailureReason] : + [NSString stringWithString:error.localizedDescription]; delegate->OnError(base::SysNSStringToUTF8(failureString)); }]; } -- 2.7.4