Explorar el Código

Update block usage requirements.

Jeff Kelley hace 7 años
padre
commit
684dfe05d8
Se han modificado 1 ficheros con 2 adiciones y 5 borrados
  1. 2 5
      AFNetworking/AFURLSessionManager.m

+ 2 - 5
AFNetworking/AFURLSessionManager.m

@@ -38,9 +38,8 @@ static dispatch_queue_t url_session_manager_creation_queue() {
     return af_url_session_manager_creation_queue;
     return af_url_session_manager_creation_queue;
 }
 }
 
 
-static void url_session_manager_create_task_safely(dispatch_block_t block) {
-    
-    if(block != nil) {
+static void url_session_manager_create_task_safely(dispatch_block_t _Nonnull block) {
+    if (block != NULL) {
         if (NSFoundationVersionNumber < NSFoundationVersionNumber_With_Fixed_5871104061079552_bug) {
         if (NSFoundationVersionNumber < NSFoundationVersionNumber_With_Fixed_5871104061079552_bug) {
             // Fix of bug
             // Fix of bug
             // Open Radar:http://openradar.appspot.com/radar?id=5871104061079552 (status: Fixed in iOS8)
             // Open Radar:http://openradar.appspot.com/radar?id=5871104061079552 (status: Fixed in iOS8)
@@ -49,8 +48,6 @@ static void url_session_manager_create_task_safely(dispatch_block_t block) {
         } else {
         } else {
             block();
             block();
         }
         }
-    } else {
-        return;
     }
     }
 }
 }