Differences From Artifact [86943d9b76]:
- File src/OFSet_hashtable.m — part of check-in [e40729d406] at 2013-02-12 18:22:15 on branch trunk — Prefix all ivars with an underscore. (user: js, size: 5955) [annotate] [blame] [check-ins using]
To Artifact [a6ac6bcbd5]:
- File
src/OFSet_hashtable.m
— part of check-in
[c5ef582958]
at
2013-03-04 17:20:15
on branch trunk
— Replace BOOL with bool.
The only places where BOOL is left are those where they are required by
the ABI. (user: js, size: 5958) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
43 44 45 46 47 48 49 | static uint32_t hash(void *value) { return [(id)value hash]; } | | | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | static uint32_t hash(void *value) { return [(id)value hash]; } static bool equal(void *value1, void *value2) { return [(id)value1 isEqual: (id)value2]; } static of_map_table_functions_t keyFunctions = { .retain = retain, |
︙ | ︙ | |||
250 251 252 253 254 255 256 | } - (size_t)count { return [_mapTable count]; } | | | | | 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | } - (size_t)count { return [_mapTable count]; } - (bool)containsObject: (id)object { if (object == nil) return false; return ([_mapTable valueForKey: object] != nil); } - (bool)isEqual: (id)object { OFSet_hashtable *set; if (![object isKindOfClass: [OFSet_hashtable class]] && ![object isKindOfClass: [OFMutableSet_hashtable class]] && ![object isKindOfClass: [OFCountedSet_hashtable class]]) return [super isEqual: object]; |
︙ | ︙ | |||
293 294 295 296 297 298 299 | } #ifdef OF_HAVE_BLOCKS - (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block { @try { [_mapTable enumerateKeysAndValuesUsingBlock: | | | 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | } #ifdef OF_HAVE_BLOCKS - (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block { @try { [_mapTable enumerateKeysAndValuesUsingBlock: ^ (void *key, void *value, bool *stop) { block(key, stop); }]; } @catch (OFEnumerationMutationException *e) { @throw [OFEnumerationMutationException exceptionWithClass: [self class] object: self]; } } #endif @end |