Quellcode durchsuchen

Minor code update for less verbosity

Alex Szpakowski vor 10 Jahren
Ursprung
Commit
362899776e
1 geänderte Dateien mit 3 neuen und 4 gelöschten Zeilen
  1. 3 4
      src/video/uikit/SDL_uikitviewcontroller.m

+ 3 - 4
src/video/uikit/SDL_uikitviewcontroller.m

@@ -63,11 +63,10 @@
 - (NSUInteger)supportedInterfaceOrientations
 {
     NSUInteger orientationMask = 0;
-    const char *orientationsHint = SDL_GetHint(SDL_HINT_ORIENTATIONS);
+    const char *hint = SDL_GetHint(SDL_HINT_ORIENTATIONS);
 
-    if (orientationsHint != NULL) {
-        NSArray *orientations = [@(orientationsHint) componentsSeparatedByCharactersInSet:
-                                 [NSCharacterSet characterSetWithCharactersInString:@" "]];
+    if (hint != NULL) {
+        NSArray *orientations = [@(hint) componentsSeparatedByString:@" "];
 
         if ([orientations containsObject:@"LandscapeLeft"]) {
             orientationMask |= UIInterfaceOrientationMaskLandscapeLeft;