Skip to content
Browse files

Shifted the definition of the object counts for the log statements

  • Loading branch information...
1 parent 29c1306 commit fafeae251a2a519d357239cee21d97df75327a62 @ChronicStim committed
View
14 Library/Categories/CoreData/NSManagedObjectContext/NSManagedObjectContext+MagicalSaves.m
@@ -130,6 +130,13 @@ - (void) MR_saveWithOptions:(MRContextSaveOptions)saveOptions completion:(MRSave
NSError *error = nil;
BOOL saved = NO;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-variable"
+ NSUInteger numberOfInsertedObjects = [[self insertedObjects] count];
+ NSUInteger numberOfUpdatedObjects = [[self updatedObjects] count];
+ NSUInteger numberOfDeletedObjects = [[self deletedObjects] count];
+#pragma clang diagnostic pop
+
@try
{
saved = [self save:&error];
@@ -156,13 +163,6 @@ - (void) MR_saveWithOptions:(MRContextSaveOptions)saveOptions completion:(MRSave
else {
MRLogInfo(@"→ Finished saving: %@", [self MR_description]);
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wunused-variable"
- NSUInteger numberOfInsertedObjects = [[self insertedObjects] count];
- NSUInteger numberOfUpdatedObjects = [[self updatedObjects] count];
- NSUInteger numberOfDeletedObjects = [[self deletedObjects] count];
-#pragma clang diagnostic pop
-
MRLogVerbose(@"Objects - Inserted %tu, Updated %tu, Deleted %tu", numberOfInsertedObjects, numberOfUpdatedObjects, numberOfDeletedObjects);
if (completion) {

0 comments on commit fafeae2

Please sign in to comment.
Something went wrong with that request. Please try again.