Skip to content

Commit

Permalink
Removed NSCopying and NSString cast from objectForKeyedSubscript:
Browse files Browse the repository at this point in the history
  • Loading branch information
premedios committed Dec 4, 2013
1 parent 8bd5870 commit ef08d67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions TFHppleElement.h
Expand Up @@ -99,8 +99,8 @@
// Returns elements searched with xpath
- (NSArray *) searchWithXPathQuery:(NSString *)xPathOrCSS;

// Custom Keyed Subscripting
- (id)objectForKeyedSubscript:(id <NSCopying>)key;
// Custom keyed subscripting
- (id)objectForKeyedSubscript:(id)key;


@end
5 changes: 3 additions & 2 deletions TFHppleElement.m
Expand Up @@ -234,9 +234,10 @@ - (NSArray *) searchWithXPathQuery:(NSString *)xPathOrCSS
return hppleElements;
}

- (id)objectForKeyedSubscript:(id <NSCopying>)key
// Custom keyed subscripting
- (id)objectForKeyedSubscript:(id)key
{
return [self objectForKey:(NSString *)key];
return [self objectForKey:key];
}

@end

0 comments on commit ef08d67

Please sign in to comment.