Fixes warning: multiple methods named 'objectForKey:' found [-Wstrict-selector-match]
This commit is contained in:
parent
6b8cdf1581
commit
8558d4d5f0
1 changed files with 3 additions and 2 deletions
|
|
@ -146,10 +146,11 @@ NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) {
|
|||
NSMutableArray *mutableQueryStringComponents = [NSMutableArray array];
|
||||
|
||||
if ([value isKindOfClass:[NSDictionary class]]) {
|
||||
NSDictionary *dictionary = value;
|
||||
// Sort dictionary keys to ensure consistent ordering in query string, which is important when deserializing potentially ambiguous sequences, such as an array of dictionaries
|
||||
NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"description" ascending:YES selector:@selector(caseInsensitiveCompare:)];
|
||||
[[[value allKeys] sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]] enumerateObjectsUsingBlock:^(id nestedKey, __unused NSUInteger idx, __unused BOOL *stop) {
|
||||
id nestedValue = [value objectForKey:nestedKey];
|
||||
[[[dictionary allKeys] sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]] enumerateObjectsUsingBlock:^(id nestedKey, __unused NSUInteger idx, __unused BOOL *stop) {
|
||||
id nestedValue = [dictionary objectForKey:nestedKey];
|
||||
if (nestedValue) {
|
||||
[mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@"%@[%@]", key, nestedKey] : nestedKey), nestedValue)];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue