[Issue #633] Manually casting scalar types in initWithCoder for AFURLConnectionOperation and AFHTTPClient

This commit is contained in:
Mattt Thompson 2012-11-09 07:31:53 -08:00
parent ff8e70a49c
commit 247863cfc2
2 changed files with 3 additions and 3 deletions

View file

@ -657,8 +657,8 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {}
return nil;
}
self.stringEncoding = [aDecoder decodeIntegerForKey:@"stringEncoding"];
self.parameterEncoding = [aDecoder decodeIntegerForKey:@"parameterEncoding"];
self.stringEncoding = (NSStringEncoding)[aDecoder decodeIntegerForKey:@"stringEncoding"];
self.parameterEncoding = (AFHTTPClientParameterEncoding)[aDecoder decodeIntegerForKey:@"parameterEncoding"];
self.registeredHTTPOperationClassNames = [aDecoder decodeObjectForKey:@"registeredHTTPOperationClassNames"];
self.defaultHeaders = [aDecoder decodeObjectForKey:@"defaultHeaders"];

View file

@ -603,7 +603,7 @@ didReceiveResponse:(NSURLResponse *)response
return nil;
}
self.state = [aDecoder decodeIntegerForKey:@"state"];
self.state = (AFOperationState)[aDecoder decodeIntegerForKey:@"state"];
self.cancelled = [aDecoder decodeBoolForKey:@"isCancelled"];
self.response = [aDecoder decodeObjectForKey:@"response"];
self.error = [aDecoder decodeObjectForKey:@"error"];