Differences From Artifact [258a8f4b24]:
- File src/OFMutableDictionary.m — part of check-in [374e1a1bfa] at 2021-01-02 22:04:26 on branch trunk — Update copyright (user: js, size: 4570) [annotate] [blame] [check-ins using] [more...]
To Artifact [6a9ceedcaa]:
- File
src/OFMutableDictionary.m
— part of check-in
[a0fd103a0b]
at
2021-03-07 02:36:04
on branch trunk
— Style change: Allow more than 1 argument per line
This is only migrating some places, others will be migrated as they are
touched. (user: js, size: 4549) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
152 153 154 155 156 157 158 | } - (instancetype)initWithCapacity: (size_t)capacity { OF_INVALID_INIT_METHOD } | | < | < | < | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | } - (instancetype)initWithCapacity: (size_t)capacity { OF_INVALID_INIT_METHOD } - (void)setObject: (id)object forKey: (id)key { OF_UNRECOGNIZED_SELECTOR } - (void)setObject: (id)object forKeyedSubscript: (id)key { if (object != nil) [self setObject: object forKey: key]; else [self removeObjectForKey: key]; } - (void)removeObjectForKey: (id)key { OF_UNRECOGNIZED_SELECTOR |
︙ | ︙ | |||
197 198 199 200 201 202 203 | void *pool = objc_autoreleasePoolPush(); OFEnumerator *keyEnumerator = [dictionary keyEnumerator]; OFEnumerator *objectEnumerator = [dictionary objectEnumerator]; id key, object; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) | | < | < | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | void *pool = objc_autoreleasePoolPush(); OFEnumerator *keyEnumerator = [dictionary keyEnumerator]; OFEnumerator *objectEnumerator = [dictionary objectEnumerator]; id key, object; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) [self setObject: object forKey: key]; objc_autoreleasePoolPop(pool); } #ifdef OF_HAVE_BLOCKS - (void)replaceObjectsUsingBlock: (of_dictionary_replace_block_t)block { [self enumerateKeysAndObjectsUsingBlock: ^ (id key, id object, bool *stop) { id new = block(key, object); if (new != object) { [self setObject: block(key, object) forKey: key]; } }]; } #endif - (void)makeImmutable { } @end |