Use instancetype in constructors for increased subclassing friendliness

This commit is contained in:
Blake Watters
2012-12-22 14:54:49 -05:00
parent 929cd44bd7
commit b78deb3eed
47 changed files with 102 additions and 106 deletions

View File

@@ -45,8 +45,7 @@ static RKManagedObjectStore *defaultStore = nil;
@implementation RKManagedObjectStore
+ (RKManagedObjectStore *)defaultStore
+ (instancetype)defaultStore
{
return defaultStore;
}
@@ -58,7 +57,7 @@ static RKManagedObjectStore *defaultStore = nil;
}
}
- (id)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel
- (instancetype)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel
{
self = [super init];
if (self) {
@@ -74,7 +73,7 @@ static RKManagedObjectStore *defaultStore = nil;
return self;
}
- (id)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)persistentStoreCoordinator
- (instancetype)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
self = [self initWithManagedObjectModel:persistentStoreCoordinator.managedObjectModel];
if (self) {