Permalink
Browse files

refactoring to adhere to conventions

  • Loading branch information...
1 parent 2d8dbcc commit 62bd4b3e2b6305ff8bc6383d29f50be6a5f2e2c3 @Machx committed Apr 3, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 Source/NSManagedObjectContextAdditions.m
@@ -48,18 +48,18 @@ -(void)cw_setDebugName:(NSString *)cwdebugname {
}
-(void)cw_logObjectsInContext {
- if ([self cw_debugName]) {
+ if (self.cw_debugName) {
NSLog(@"MOC Name: %@",[self cw_debugName]);
} else {
NSLog(@"MOC: %@",[self description]);
}
NSLog(@"Has Changes: %@",(self.hasChanges ? @"YES" : @"NO"));
- if ([self hasChanges]) {
- if ([[self insertedObjects] count] > 0) NSLog(@"%lu Inserted Objects",(long)[[self insertedObjects] count]);
- if ([[self updatedObjects] count] > 0) NSLog(@"%lu Updated Objects",(long)[[self updatedObjects] count]);
- if ([[self deletedObjects] count] > 0) NSLog(@"%lu Deleted Objects",(long)[[self deletedObjects] count]);
+ if (self.hasChanges) {
+ if (self.insertedObjects.count > 0) NSLog(@"%lu Inserted Objects",(long)self.insertedObjects.count);
+ if (self.updatedObjects.count > 0) NSLog(@"%lu Updated Objects",(long)self.updatedObjects.count);
+ if (self.deletedObjects.count > 0) NSLog(@"%lu Deleted Objects",(long)self.deletedObjects.count);
}
}

0 comments on commit 62bd4b3

Please sign in to comment.