From 945a82e9f0af3023a29367bca28b25909d91a939 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Wed, 27 Aug 2014 19:58:10 -0400 Subject: [PATCH] Prefer string constants to strings. --- Sparkle/SUAppcast.m | 2 +- Sparkle/SUAppcastItem.m | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sparkle/SUAppcast.m b/Sparkle/SUAppcast.m index 86c014b4..d5dfd70f 100644 --- a/Sparkle/SUAppcast.m +++ b/Sparkle/SUAppcast.m @@ -167,7 +167,7 @@ if ([[child name] isEqualToString:@"enclosure"]) [deltas addObject:[(NSXMLElement *)child attributesAsDictionary]]; } - dict[@"deltas"] = deltas; + dict[name] = deltas; } else if ([name isEqualToString:SUAppcastTagsKey]) { NSMutableArray *tags = [NSMutableArray array]; diff --git a/Sparkle/SUAppcastItem.m b/Sparkle/SUAppcastItem.m index 9c24aec3..8dfa3de7 100644 --- a/Sparkle/SUAppcastItem.m +++ b/Sparkle/SUAppcastItem.m @@ -160,12 +160,12 @@ self.releaseNotesURL = nil; } - if (dict[@"deltas"]) { + NSArray *deltaDictionaries = dict[SUAppcastDeltasKey]; + if (deltaDictionaries) { NSMutableDictionary *deltas = [NSMutableDictionary dictionary]; - NSArray *deltaDictionaries = dict[@"deltas"]; for (NSDictionary *deltaDictionary in deltaDictionaries) { NSMutableDictionary *fakeAppCastDict = [dict mutableCopy]; - [fakeAppCastDict removeObjectForKey:@"deltas"]; + [fakeAppCastDict removeObjectForKey:SUAppcastDeltasKey]; fakeAppCastDict[@"enclosure"] = deltaDictionary; SUAppcastItem *deltaItem = [[[self class] alloc] initWithDictionary:fakeAppCastDict];