From 2e4f70382b48dc30db628672011a0633a16909e2 Mon Sep 17 00:00:00 2001 From: Nikita Lutsenko Date: Mon, 11 Jan 2016 13:42:50 -0800 Subject: [PATCH] Specify generic type for BFTask.taskForCompletionOfAllTasks*(). --- Bolts/Common/BFTask.h | 4 ++-- Bolts/Common/BFTask.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Bolts/Common/BFTask.h b/Bolts/Common/BFTask.h index 81069ccac..6e9073d73 100644 --- a/Bolts/Common/BFTask.h +++ b/Bolts/Common/BFTask.h @@ -72,7 +72,7 @@ typedef __nullable id(^BFContinuationBlock)(BFTask *task); all of the input tasks have completed. @param tasks An `NSArray` of the tasks to use as an input. */ -+ (instancetype)taskForCompletionOfAllTasks:(nullable NSArray *)tasks; ++ (instancetype)taskForCompletionOfAllTasks:(nullable NSArray *)tasks; /*! Returns a task that will be completed once all of the input tasks have completed. @@ -80,7 +80,7 @@ typedef __nullable id(^BFContinuationBlock)(BFTask *task); an `NSArray` of all task results in the order they were provided. @param tasks An `NSArray` of the tasks to use as an input. */ -+ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray *)tasks; ++ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray *)tasks; /*! Returns a task that will be completed a certain amount of time in the future. diff --git a/Bolts/Common/BFTask.m b/Bolts/Common/BFTask.m index 5752c6d45..9dfa8a322 100644 --- a/Bolts/Common/BFTask.m +++ b/Bolts/Common/BFTask.m @@ -108,7 +108,7 @@ + (instancetype)cancelledTask { return [[self alloc] initCancelled]; } -+ (instancetype)taskForCompletionOfAllTasks:(NSArray *)tasks { ++ (instancetype)taskForCompletionOfAllTasks:(NSArray *)tasks { __block int32_t total = (int32_t)tasks.count; if (total == 0) { return [self taskWithResult:nil]; @@ -166,7 +166,7 @@ + (instancetype)taskForCompletionOfAllTasks:(NSArray *)tasks { return tcs.task; } -+ (instancetype)taskForCompletionOfAllTasksWithResults:(NSArray *)tasks { ++ (instancetype)taskForCompletionOfAllTasksWithResults:(NSArray *)tasks { return [[self taskForCompletionOfAllTasks:tasks] continueWithSuccessBlock:^id(BFTask *task) { return [tasks valueForKey:@"result"]; }];