Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removing GNU-style ?: operators. Thanks for the report, Uli.

  • Loading branch information...
commit a03235851c14125de14873d18a1e58d12753f3f6 1 parent b546304
@andymatuschak andymatuschak authored
Showing with 4 additions and 3 deletions.
  1. +1 −1  SUAppcast.m
  2. +1 −1  SUHost.m
  3. +2 −1  SUUpdater.m
View
2  SUAppcast.m
@@ -223,7 +223,7 @@ - (NSXMLNode *)bestNodeInNodes:(NSArray *)nodes
while ((node = [nodeEnum nextObject]))
{
lang = [[node attributeForName:@"xml:lang"] stringValue];
- [languages addObject:(lang ?: @"")];
+ [languages addObject:(lang ? lang : @"")];
}
lang = [[NSBundle preferredLocalizationsFromArray:languages] objectAtIndex:0];
i = [languages indexOfObject:([languages containsObject:lang] ? lang : @"")];
View
2  SUHost.m
@@ -195,7 +195,7 @@ - (void)setBool:(BOOL)value forUserDefaultsKey:(NSString *)defaultName
}
- (id)objectForKey:(NSString *)key {
- return [self objectForUserDefaultsKey:key] ?: [self objectForInfoDictionaryKey:key];
+ return [self objectForUserDefaultsKey:key] ? [self objectForUserDefaultsKey:key] : [self objectForInfoDictionaryKey:key];
}
- (BOOL)boolForKey:(NSString *)key {
View
3  SUUpdater.m
@@ -313,7 +313,8 @@ - (NSString *)userAgentString
if (customUserAgentString)
return customUserAgentString;
- NSString *userAgent = [NSString stringWithFormat:@"%@/%@ Sparkle/%@", [host name], [host displayVersion], [SPARKLE_BUNDLE objectForInfoDictionaryKey:@"CFBundleVersion"] ?: nil];
+ NSString *version = [SPARKLE_BUNDLE objectForInfoDictionaryKey:@"CFBundleVersion"];
+ NSString *userAgent = [NSString stringWithFormat:@"%@/%@ Sparkle/%@", [host name], [host displayVersion], version ? version : @"?"];
NSData *cleanedAgent = [userAgent dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
return [[[NSString alloc] initWithData:cleanedAgent encoding:NSASCIIStringEncoding] autorelease];
}
Please sign in to comment.
Something went wrong with that request. Please try again.