Refactor new macOS code to reduce #ifs, increase shared code, and fix warnings

This commit is contained in:
Cameron Gutman
2018-03-27 00:34:38 -07:00
parent 6cc165b589
commit e8832ed746
22 changed files with 73 additions and 293 deletions
+1 -5
View File
@@ -19,11 +19,7 @@ static const int MAX_ATTEMPTS = 5;
- (void) main {
#if TARGET_OS_IPHONE
UIImage* appImage = nil;
#else
NSImage* appImage = nil;
#endif
OSImage* appImage = nil;
int attempts = 0;
while (![self isCancelled] && appImage == nil && attempts++ < MAX_ATTEMPTS) {