Skip to content

Commit

Permalink
Merge pull request ccgus#156 from antons/master
Browse files Browse the repository at this point in the history
Changed return type of constructors from id to instancetype
  • Loading branch information
ccgus committed Jun 15, 2013
2 parents 5cf5b92 + 889c40b commit addc7b5
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/FMDatabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
*/

+ (id)databaseWithPath:(NSString*)inPath;
+ (instancetype)databaseWithPath:(NSString*)inPath;

/** Initialize a `FMDatabase` object.
Expand Down Expand Up @@ -177,7 +177,7 @@
*/

- (id)initWithPath:(NSString*)inPath;
- (instancetype)initWithPath:(NSString*)inPath;


///-----------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/FMDatabase.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ @implementation FMDatabase
@synthesize checkedOut=_checkedOut;
@synthesize traceExecution=_traceExecution;

+ (id)databaseWithPath:(NSString*)aPath {
+ (instancetype)databaseWithPath:(NSString*)aPath {
return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath]);
}

Expand All @@ -29,7 +29,7 @@ + (BOOL)isSQLiteThreadSafe {
return sqlite3_threadsafe() != 0;
}

- (id)initWithPath:(NSString*)aPath {
- (instancetype)initWithPath:(NSString*)aPath {

assert(sqlite3_threadsafe()); // whoa there big boy- gotta make sure sqlite it happy with what we're going to do.

Expand Down
4 changes: 2 additions & 2 deletions src/FMDatabasePool.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
@return The `FMDatabasePool` object. `nil` on error.
*/

+ (id)databasePoolWithPath:(NSString*)aPath;
+ (instancetype)databasePoolWithPath:(NSString*)aPath;

/** Create pool using path.
Expand All @@ -66,7 +66,7 @@
@return The `FMDatabasePool` object. `nil` on error.
*/

- (id)initWithPath:(NSString*)aPath;
- (instancetype)initWithPath:(NSString*)aPath;

///------------------------------------------------
/// @name Keeping track of checked in/out databases
Expand Down
4 changes: 2 additions & 2 deletions src/FMDatabasePool.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ @implementation FMDatabasePool
@synthesize maximumNumberOfDatabasesToCreate=_maximumNumberOfDatabasesToCreate;


+ (id)databasePoolWithPath:(NSString*)aPath {
+ (instancetype)databasePoolWithPath:(NSString*)aPath {
return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath]);
}

- (id)initWithPath:(NSString*)aPath {
- (instancetype)initWithPath:(NSString*)aPath {

self = [super init];

Expand Down
4 changes: 2 additions & 2 deletions src/FMDatabaseQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
@return The `FMDatabaseQueue` object. `nil` on error.
*/

+ (id)databaseQueueWithPath:(NSString*)aPath;
+ (instancetype)databaseQueueWithPath:(NSString*)aPath;

/** Create queue using path.
Expand All @@ -89,7 +89,7 @@
@return The `FMDatabaseQueue` object. `nil` on error.
*/

- (id)initWithPath:(NSString*)aPath;
- (instancetype)initWithPath:(NSString*)aPath;

/** Close database used by queue. */

Expand Down
4 changes: 2 additions & 2 deletions src/FMDatabaseQueue.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ @implementation FMDatabaseQueue

@synthesize path = _path;

+ (id)databaseQueueWithPath:(NSString*)aPath {
+ (instancetype)databaseQueueWithPath:(NSString*)aPath {

FMDatabaseQueue *q = [[self alloc] initWithPath:aPath];

Expand All @@ -30,7 +30,7 @@ + (id)databaseQueueWithPath:(NSString*)aPath {
return q;
}

- (id)initWithPath:(NSString*)aPath {
- (instancetype)initWithPath:(NSString*)aPath {

self = [super init];

Expand Down
2 changes: 1 addition & 1 deletion src/FMResultSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
@return A `FMResultSet` on success; `nil` on failure
*/

+ (id)resultSetWithStatement:(FMStatement *)statement usingParentDatabase:(FMDatabase*)aDB;
+ (instancetype)resultSetWithStatement:(FMStatement *)statement usingParentDatabase:(FMDatabase*)aDB;

/** Close result set */

Expand Down
2 changes: 1 addition & 1 deletion src/FMResultSet.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ @implementation FMResultSet
@synthesize query=_query;
@synthesize statement=_statement;

+ (id)resultSetWithStatement:(FMStatement *)statement usingParentDatabase:(FMDatabase*)aDB {
+ (instancetype)resultSetWithStatement:(FMStatement *)statement usingParentDatabase:(FMDatabase*)aDB {

FMResultSet *rs = [[FMResultSet alloc] init];

Expand Down

0 comments on commit addc7b5

Please sign in to comment.