Skip to content
Browse files

Made assignments in if() explicit, by more parens.

For clean builds at higher warning levels.
  • Loading branch information...
1 parent 19657ed commit 149aa9908b6830719ef2e16849c1ab7c514842b1 @richardbuckle richardbuckle committed Mar 25, 2010
Showing with 5 additions and 5 deletions.
  1. +2 −2 MGTwitterEngine.m
  2. +1 −1 MGTwitterHTTPURLConnection.m
  3. +1 −1 MGTwitterLibXMLParser.m
  4. +1 −1 MGTwitterXMLParser.m
View
4 MGTwitterEngine.m
@@ -115,7 +115,7 @@ + (MGTwitterEngine *)twitterEngineWithDelegate:(NSObject *)theDelegate
- (MGTwitterEngine *)initWithDelegate:(NSObject *)newDelegate
{
- if (self = [super init]) {
+ if ((self = [super init])) {
_delegate = newDelegate; // deliberately weak reference
_connections = [[NSMutableDictionary alloc] initWithCapacity:0];
_clientName = [DEFAULT_CLIENT_NAME retain];
@@ -208,7 +208,7 @@ - (void)setUsername:(NSString *)newUsername password:(NSString *)newPassword
NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
NSEnumerator *enumerator = [[cookieStorage cookiesForURL:url] objectEnumerator];
NSHTTPCookie *cookie = nil;
- while (cookie = [enumerator nextObject]) {
+ while ((cookie = [enumerator nextObject])) {
[cookieStorage deleteCookie:cookie];
}
}
View
2 MGTwitterHTTPURLConnection.m
@@ -19,7 +19,7 @@ @implementation MGTwitterHTTPURLConnection
- (id)initWithRequest:(NSURLRequest *)request delegate:(id)delegate
requestType:(MGTwitterRequestType)requestType responseType:(MGTwitterResponseType)responseType
{
- if (self = [super initWithRequest:request delegate:delegate]) {
+ if ((self = [super initWithRequest:request delegate:delegate])) {
_data = [[NSMutableData alloc] initWithCapacity:0];
_identifier = [[NSString stringWithNewUUID] retain];
_requestType = requestType;
View
2 MGTwitterLibXMLParser.m
@@ -36,7 +36,7 @@ - (id)initWithXML:(NSData *)theXML delegate:(NSObject *)theDelegate
connectionIdentifier:(NSString *)theIdentifier requestType:(MGTwitterRequestType)reqType
responseType:(MGTwitterResponseType)respType URL:(NSURL *)theURL
{
- if (self = [super init])
+ if ((self = [super init]))
{
xml = [theXML retain];
identifier = [theIdentifier retain];
View
2 MGTwitterXMLParser.m
@@ -32,7 +32,7 @@ - (id)initWithXML:(NSData *)theXML delegate:(NSObject *)theDelegate
connectionIdentifier:(NSString *)theIdentifier requestType:(MGTwitterRequestType)reqType
responseType:(MGTwitterResponseType)respType
{
- if (self = [super init]) {
+ if ((self = [super init])) {
xml = [theXML retain];
identifier = [theIdentifier retain];
requestType = reqType;

0 comments on commit 149aa99

Please sign in to comment.
Something went wrong with that request. Please try again.