Differences From Artifact [fcbd1c81f4]:
- File src/OFSet_hashtable.m — part of check-in [ed4a6f396b] at 2015-05-04 14:30:16 on branch trunk — Add OFKernelEventObserver_epoll (user: js, size: 6132) [annotate] [blame] [check-ins using]
To Artifact [1eaa048921]:
- File
src/OFSet_hashtable.m
— part of check-in
[6b13727ce0]
at
2015-11-29 14:02:11
on branch trunk
— Make use of fast enumeration
Now that we require GCC >= 4.6 anyway, there's no more reason to not use
it anymore. (user: js, size: 5656) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
96 97 98 99 100 101 102 | [self release]; @throw e; } self = [self initWithCapacity: count]; @try { | < < | < < < < < | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | [self release]; @throw e; } self = [self initWithCapacity: count]; @try { for (id object in set) [_mapTable setValue: (void*)1 forKey: object]; } @catch (id e) { [self release]; @throw e; } return self; } |
︙ | ︙ | |||
131 132 133 134 135 136 137 | [self release]; @throw e; } self = [self initWithCapacity: count]; @try { | < < | < < < < < | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | [self release]; @throw e; } self = [self initWithCapacity: count]; @try { for (id object in array) [_mapTable setValue: (void*)1 forKey: object]; } @catch (id e) { [self release]; @throw e; } return self; } |
︙ | ︙ | |||
207 208 209 210 211 212 213 | - initWithSerialization: (OFXMLElement*)element { self = [self init]; @try { void *pool = objc_autoreleasePoolPush(); | < < | | < | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | - initWithSerialization: (OFXMLElement*)element { self = [self init]; @try { void *pool = objc_autoreleasePoolPush(); if ((![[element name] isEqual: @"OFSet"] && ![[element name] isEqual: @"OFMutableSet"]) || ![[element namespace] isEqual: OF_SERIALIZATION_NS]) @throw [OFInvalidArgumentException exception]; for (OFXMLElement *child in [element elementsForNamespace: OF_SERIALIZATION_NS]) { void *pool2 = objc_autoreleasePoolPush(); [_mapTable setValue: (void*)1 forKey: [child objectByDeserializing]]; objc_autoreleasePoolPop(pool2); } |
︙ | ︙ |