Differences From Artifact [3bdd110505]:
- File
src/OFMutableSet.m
— part of check-in
[44f45c2e35]
at
2017-01-09 17:36:36
on branch trunk
— Update copyright
Forgot to add 2017, even though I already did quite some changes in
2017. (user: js, size: 3547) [annotate] [blame] [check-ins using]
To Artifact [be0ab30e62]:
- File
src/OFMutableSet.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 3554) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
32 33 34 35 36 37 38 | @implementation OFMutableSet_placeholder - init { return (id)[[OFMutableSet_hashtable alloc] init]; } | | | | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | @implementation OFMutableSet_placeholder - init { return (id)[[OFMutableSet_hashtable alloc] init]; } - initWithSet: (OFSet *)set { return (id)[[OFMutableSet_hashtable alloc] initWithSet: set]; } - initWithArray: (OFArray *)array { return (id)[[OFMutableSet_hashtable alloc] initWithArray: array]; } - initWithObjects: (id)firstObject, ... { id ret; va_list arguments; va_start(arguments, firstObject); ret = [[OFMutableSet_hashtable alloc] initWithObject: firstObject arguments: arguments]; va_end(arguments); return ret; } - initWithObjects: (id const *)objects count: (size_t)count { return (id)[[OFMutableSet_hashtable alloc] initWithObjects: objects count: count]; } - initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFMutableSet_hashtable alloc] initWithObject: firstObject arguments: arguments]; } - initWithSerialization: (OFXMLElement *)element { return (id)[[OFMutableSet_hashtable alloc] initWithSerialization: element]; } - initWithCapacity: (size_t)capacity { |
︙ | ︙ | |||
150 151 152 153 154 155 156 | } - (void)removeObject: (id)object { OF_UNRECOGNIZED_SELECTOR } | | | | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | } - (void)removeObject: (id)object { OF_UNRECOGNIZED_SELECTOR } - (void)minusSet: (OFSet *)set { for (id object in set) [self removeObject: object]; } - (void)intersectSet: (OFSet *)set { void *pool = objc_autoreleasePoolPush(); size_t count = [self count]; id *cArray; cArray = [self allocMemoryWithSize: sizeof(id) count: count]; |
︙ | ︙ | |||
184 185 186 187 188 189 190 | } @finally { [self freeMemory: cArray]; } objc_autoreleasePoolPop(pool); } | | | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | } @finally { [self freeMemory: cArray]; } objc_autoreleasePoolPop(pool); } - (void)unionSet: (OFSet *)set { for (id object in set) [self addObject: object]; } - (void)makeImmutable { } @end |