Differences From Artifact [212223cd50]:
- File src/OFMapTable.m — part of check-in [e40729d406] at 2013-02-12 18:22:15 on branch trunk — Prefix all ivars with an underscore. (user: js, size: 16041) [annotate] [blame] [check-ins using]
To Artifact [1f61a324ed]:
- File
src/OFMapTable.m
— part of check-in
[4fb0f4bf66]
at
2013-02-18 11:07:29
on branch trunk
— Add -[OFMutableDictionary initWithCapacity:].
This was already implemented in OFDictionary_hashtable for internal
usage and is now publicly available. (user: js, size: 16106) [annotate] [blame] [check-ins using]
︙ | |||
143 144 145 146 147 148 149 | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - - | for (_capacity = 1; _capacity < capacity; _capacity <<= 1); if (capacity * 8 / _capacity >= 6) _capacity <<= 1; if (_capacity < MIN_CAPACITY) _capacity = MIN_CAPACITY; |
︙ | |||
242 243 244 245 246 247 248 | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | - - | hash: OF_ROR(_buckets[i]->hash, _rotate)]; } @catch (id e) { [copy release]; @throw e; } |
︙ | |||
307 308 309 310 311 312 313 | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | + + + + - + | if (fullness >= 6) capacity = _capacity << 1; else if (fullness <= 1) capacity = _capacity >> 1; else return; /* * Don't downsize if we have an initial capacity or if we would fall * below the minimum capacity. */ |
︙ |