From 321e448fde1d0fb441063ac05311c35952c2d5ab Mon Sep 17 00:00:00 2001 From: Richard Buckle Date: Thu, 3 Apr 2014 21:29:18 +0100 Subject: [PATCH] Fix "shadowed local variables" warning Otherwise the block to save the parent context will capture the success and error variables from the main context save. --- DCTCoreDataStack/_DCTCDSManagedObjectContext.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DCTCoreDataStack/_DCTCDSManagedObjectContext.m b/DCTCoreDataStack/_DCTCDSManagedObjectContext.m index da210c9..08d9de6 100644 --- a/DCTCoreDataStack/_DCTCDSManagedObjectContext.m +++ b/DCTCoreDataStack/_DCTCDSManagedObjectContext.m @@ -97,9 +97,9 @@ - (void)dct_saveWithCompletionHandler:(void(^)(BOOL success, NSError *error))com } [parent performBlock:^{ - [parent dct_saveWithCompletionHandler:^(BOOL success, NSError *error) { + [parent dct_saveWithCompletionHandler:^(BOOL parentSuccess, NSError *parentError) { [self performBlock:^{ - completion(success, error); + completion(parentSuccess, parentError); }]; }]; }];