From: Jay Freeman (saurik) Date: Wed, 23 Feb 2011 02:11:12 +0000 (-0800) Subject: Simplify if logic in -[CydiaProgressEvent compoundTitle]. X-Git-Tag: v1.1.0%b1~258 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/83b78e5f9642d8a57b6ff3549815e57fd8e1ed40 Simplify if logic in -[CydiaProgressEvent compoundTitle]. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 79582982..88efb14f 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -1417,14 +1417,12 @@ typedef std::map< unsigned long, _H > SourceMap; - (NSString *) compoundTitle { NSString *title; - if (package_ != nil) { - if (Package *package = [[Database sharedInstance] packageWithName:package_]) - title = [package name]; - else - title = package_; - } else { + if (package_ == nil) title = nil; - } + else if (Package *package = [[Database sharedInstance] packageWithName:package_]) + title = [package name]; + else + title = package_; return [self compound:title]; }