Differences From Artifact [8b86adbc94]:
- File
src/OFCountedSet_hashtable.m
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 4640) [annotate] [blame] [check-ins using]
To Artifact [14556b7ee8]:
- File src/OFCountedSet_hashtable.m — part of check-in [e0b9167693] at 2016-02-21 15:37:42 on branch trunk — Make use of C99-style for loops (user: js, size: 4638) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
43 44 45 46 47 48 49 | @try { void *pool = objc_autoreleasePoolPush(); if ([set isKindOfClass: [OFCountedSet class]]) { OFCountedSet *countedSet = (OFCountedSet*)countedSet; for (id object in countedSet) { | | < | | | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | @try { void *pool = objc_autoreleasePoolPush(); if ([set isKindOfClass: [OFCountedSet class]]) { OFCountedSet *countedSet = (OFCountedSet*)countedSet; for (id object in countedSet) { size_t count = [countedSet countForObject: object]; for (size_t i = 0; i < count; i++) [self addObject: object]; } } else for (id object in set) [self addObject: object]; objc_autoreleasePoolPop(pool); |
︙ | ︙ | |||
69 70 71 72 73 74 75 | - initWithArray: (OFArray*)array { self = [self init]; @try { id const *objects = [array objects]; | | | < < | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - initWithArray: (OFArray*)array { self = [self init]; @try { id const *objects = [array objects]; size_t count = [array count]; for (size_t i = 0; i < count; i++) [self addObject: objects[i]]; } @catch (id e) { [self release]; @throw e; } return self; } - initWithObjects: (id const*)objects count: (size_t)count { self = [self init]; @try { for (size_t i = 0; i < count; i++) [self addObject: objects[i]]; } @catch (id e) { [self release]; @throw e; } return self; |
︙ | ︙ |