Differences From Artifact [c4a3756934]:
- File src/OFSet.m — part of check-in [737a82e1a4] at 2013-02-05 22:24:31 on branch trunk — Move abort() to make old GCCs happy. (user: js, size: 8378) [annotate] [blame] [check-ins using]
To Artifact [35aae4e27a]:
- File
src/OFSet.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: 8395) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
247 248 249 250 251 252 253 | - (size_t)count { [self doesNotRecognizeSelector: _cmd]; abort(); } | | | | | | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | - (size_t)count { [self doesNotRecognizeSelector: _cmd]; abort(); } - (bool)containsObject: (id)object { [self doesNotRecognizeSelector: _cmd]; abort(); } - (OFEnumerator*)objectEnumerator { [self doesNotRecognizeSelector: _cmd]; abort(); } - (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state objects: (id*)objects count: (int)count { [self doesNotRecognizeSelector: _cmd]; abort(); } - (bool)isEqual: (id)object { OFSet *otherSet; if (![object isKindOfClass: [OFSet class]]) return false; otherSet = object; if ([otherSet count] != [self count]) return false; return [otherSet isSubsetOfSet: self]; } - (uint32_t)hash { void *pool = objc_autoreleasePoolPush(); |
︙ | ︙ | |||
345 346 347 348 349 350 351 | } - mutableCopy { return [[OFMutableSet alloc] initWithSet: self]; } | | | | | | | | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | } - mutableCopy { return [[OFMutableSet alloc] initWithSet: self]; } - (bool)isSubsetOfSet: (OFSet*)set { void *pool = objc_autoreleasePoolPush(); OFEnumerator *enumerator; id object; enumerator = [self objectEnumerator]; while ((object = [enumerator nextObject]) != nil) { if (![set containsObject: object]) { objc_autoreleasePoolPop(pool); return false; } } objc_autoreleasePoolPop(pool); return true; } - (bool)intersectsSet: (OFSet*)set { void *pool = objc_autoreleasePoolPush(); OFEnumerator *enumerator; id object; enumerator = [self objectEnumerator]; while ((object = [enumerator nextObject]) != nil) { if ([set containsObject: object]) { objc_autoreleasePoolPop(pool); return true; } } objc_autoreleasePoolPop(pool); return false; } - (OFXMLElement*)XMLElementBySerializing { void *pool = objc_autoreleasePoolPush(); OFXMLElement *element; OFEnumerator *enumerator; |
︙ | ︙ | |||
453 454 455 456 457 458 459 | return new; } #if defined(OF_HAVE_BLOCKS) && defined(OF_HAVE_FAST_ENUMERATION) - (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block { | | | | 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 | return new; } #if defined(OF_HAVE_BLOCKS) && defined(OF_HAVE_FAST_ENUMERATION) - (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block { bool stop = false; for (id object in self) { block(object, &stop); if (stop) break; } } #endif #ifdef OF_HAVE_BLOCKS - (OFSet*)filteredSetUsingBlock: (of_set_filter_block_t)block { OFMutableSet *ret = [OFMutableSet set]; [self enumerateObjectsUsingBlock: ^ (id object, bool *stop) { if (block(object)) [ret addObject: object]; }]; [ret makeImmutable]; return ret; } #endif @end |