Skip to content

Commit 18f6f93

Browse files
committed
stuff
1 parent af046f9 commit 18f6f93

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

src/ruisapp/glue/ios/glue.mm

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3333

3434
// TODO: check if app == nullptr
3535

36-
return YES;
36+
return YES; // TODO: what does this YES mean?
3737
}
3838

3939
- (void)applicationWillResignActive:(UIApplication *)application
@@ -61,17 +61,27 @@ - (void)applicationDidBecomeActive:(UIApplication *)application
6161
- (void)applicationWillTerminate:(UIApplication *)application
6262
{
6363
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
64-
ASSERT(self->app)
64+
utki::assert(self->app, SL);
6565
delete self->app;
6666
}
6767

6868
@end
6969

7070
int main(int argc, char * argv[]){
7171
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
72-
int retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
73-
[pool release];
74-
return retVal;
72+
73+
utki::scope_exit pool_scope_exit([&](){
74+
[pool release];
75+
});
76+
77+
int ret = UIApplicationMain(
78+
argc,//
79+
argv,
80+
nil,
81+
NSStringFromClass([AppDelegate class])
82+
);
83+
84+
return ret;
7585
}
7686

7787
@interface ViewController : GLKViewController{
@@ -117,8 +127,8 @@ @interface ViewController : GLKViewController{
117127
};
118128

119129
WindowWrapper& get_impl(const std::unique_ptr<utki::destructable>& pimpl){
120-
ASSERT(pimpl)
121-
ASSERT(dynamic_cast<WindowWrapper*>(pimpl.get()))
130+
utki::assert(pimpl, SL);
131+
utki::assert(dynamic_cast<WindowWrapper*>(pimpl.get()), SL);
122132
return static_cast<WindowWrapper&>(*pimpl);
123133
}
124134
}

0 commit comments

Comments
 (0)