More Xcode 4 crap

This commit is contained in:
Blake Watters
2011-02-15 20:25:22 -05:00
parent 07034e3878
commit bf48cf6559
6 changed files with 7 additions and 6 deletions

View File

@@ -41,7 +41,7 @@ NSString* const kRKStringBoundary = @"0xKhTmLbOuNdArY";
}
- (RKParams*)initWithDictionary:(NSDictionary*)dictionary {
if (self = [self init]) {
if ((self = [self init])) {
for (NSString* key in dictionary) {
id value = [dictionary objectForKey:key];
[self setValue:value forParam:key];

View File

@@ -23,7 +23,7 @@ extern NSString* const kRKStringBoundary;
@synthesize fileName = _fileName, MIMEType = _MIMEType, name = _name;
- (id)initWithName:(NSString*)name {
if (self = [self init]) {
if ((self = [self init])) {
_name = [name retain];
}
@@ -31,7 +31,7 @@ extern NSString* const kRKStringBoundary;
}
- (id)initWithName:(NSString*)name value:(id<NSObject>)value {
if (self = [self initWithName:name]) {
if ((self = [self initWithName:name])) {
NSMutableData* body = [NSMutableData data];
if ([value respondsToSelector:@selector(dataUsingEncoding:)]) {
[body appendData:[(NSString*)value dataUsingEncoding:NSUTF8StringEncoding]];
@@ -47,7 +47,7 @@ extern NSString* const kRKStringBoundary;
}
- (id)initWithName:(NSString*)name data:(NSData*)data {
if (self = [self initWithName:name]) {
if ((self = [self initWithName:name])) {
_bodyStream = [[NSInputStream inputStreamWithData:data] retain];
_bodyLength = [data length];
}
@@ -56,7 +56,7 @@ extern NSString* const kRKStringBoundary;
}
- (id)initWithName:(NSString*)name file:(NSString*)filePath {
if (self = [self initWithName:name]) {
if ((self = [self initWithName:name])) {
NSAssert1([[NSFileManager defaultManager] fileExistsAtPath:filePath], @"Expected file to exist at path: %@", filePath);
_fileName = [[filePath lastPathComponent] retain];
_MIMEType = [[self mimeTypeForExtension:[filePath pathExtension]] retain];

View File

@@ -36,7 +36,7 @@ static const NSInteger kMaxConcurrentLoads = 5;
}
- (id)init {
if (self = [super init]) {
if ((self = [super init])) {
_requests = [[NSMutableArray alloc] init];
_suspended = NO;
_totalLoading = 0;