From 92770188d52bed40b9d370fae571897c2b469293 Mon Sep 17 00:00:00 2001 From: Joseph Heenan Date: Wed, 25 Feb 2015 15:06:01 +0000 Subject: iOS: Minor cleanups to match current best practice --- platform/ios/Classes/MuAppDelegate.h | 5 ++--- platform/ios/Classes/MuAppDelegate.m | 3 +++ platform/ios/common.h | 1 - platform/ios/main.m | 21 ++++++++++----------- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'platform/ios') 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 +@interface MuAppDelegate : NSObject @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 #endif +@interface MuAppDelegate () +@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 +#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; } -- cgit v1.2.3