diff options
author | Joseph Heenan <joseph@emobix.co.uk> | 2015-02-25 15:06:01 +0000 |
---|---|---|
committer | Joseph Heenan <joseph@emobix.co.uk> | 2015-02-25 16:06:04 +0000 |
commit | 92770188d52bed40b9d370fae571897c2b469293 (patch) | |
tree | ebcfc5583f5b905d27050088686292f6f68a9465 | |
parent | 8460689041a2876dd3cfb741e296d0ccf708e500 (diff) | |
download | mupdf-92770188d52bed40b9d370fae571897c2b469293.tar.xz |
iOS: Minor cleanups to match current best practice
-rw-r--r-- | platform/ios/Classes/MuAppDelegate.h | 5 | ||||
-rw-r--r-- | platform/ios/Classes/MuAppDelegate.m | 3 | ||||
-rw-r--r-- | platform/ios/common.h | 1 | ||||
-rw-r--r-- | platform/ios/main.m | 21 |
4 files changed, 15 insertions, 15 deletions
diff --git a/platform/ios/Classes/MuAppDelegate.h b/platform/ios/Classes/MuAppDelegate.h index ab0c2a0a..c3d5e1d6 100644 --- a/platform/ios/Classes/MuAppDelegate.h +++ b/platform/ios/Classes/MuAppDelegate.h @@ -4,9 +4,8 @@ enum { - // use at most 128M for resource cache - ResourceCacheMaxSize = 128<<20 // use at most 128M for resource cache + ResourceCacheMaxSize = 128<<20 /**< use at most 128M for resource cache */ }; -@interface MuAppDelegate : NSObject <UIApplicationDelegate, UINavigationControllerDelegate> +@interface MuAppDelegate : NSObject <UIApplicationDelegate> @end diff --git a/platform/ios/Classes/MuAppDelegate.m b/platform/ios/Classes/MuAppDelegate.m index 6f7857bc..b3ff1481 100644 --- a/platform/ios/Classes/MuAppDelegate.m +++ b/platform/ios/Classes/MuAppDelegate.m @@ -7,6 +7,9 @@ #import <Crashlytics/Crashlytics.h> #endif +@interface MuAppDelegate () <UINavigationControllerDelegate> +@end + @implementation MuAppDelegate { UIWindow *window; diff --git a/platform/ios/common.h b/platform/ios/common.h index dcef5b22..15d9a64c 100644 --- a/platform/ios/common.h +++ b/platform/ios/common.h @@ -8,7 +8,6 @@ #undef MAX #include "mupdf/fitz.h" -#include "dispatch/dispatch.h" extern fz_context *ctx; extern dispatch_queue_t queue; diff --git a/platform/ios/main.m b/platform/ios/main.m index 516ced70..dd2bc30e 100644 --- a/platform/ios/main.m +++ b/platform/ios/main.m @@ -1,18 +1,17 @@ #import <UIKit/UIKit.h> +#import "MuAppDelegate.h" int main(int argc, char *argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - int retVal; + @autoreleasepool { + @try { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([MuAppDelegate class])); + } + @catch (NSException* exception) { + NSLog(@"Uncaught exception %@", exception); + NSLog(@"Stack trace: %@", [exception callStackSymbols]); + } - @try { - retVal = UIApplicationMain(argc, argv, nil, @"MuAppDelegate"); + return 0; } - @catch (NSException* exception) { - NSLog(@"Uncaught exception %@", exception); - NSLog(@"Stack trace: %@", [exception callStackSymbols]); - } - - [pool release]; - return retVal; } |