diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2019-05-03 21:15:00 -0700 |
|---|---|---|
| committer | Ryan Liptak <squeek502@hotmail.com> | 2019-05-03 21:15:00 -0700 |
| commit | cf8dde2d686199474847c6c4e342dc1ac46a435b (patch) | |
| tree | 5cfe5b3a15d3c396d77acc578408f359bb98799b /src/link.cpp | |
| parent | 13a7b8586a600c117cc2d090a283e5a6344d42c4 (diff) | |
| download | zig-cf8dde2d686199474847c6c4e342dc1ac46a435b.tar.gz zig-cf8dde2d686199474847c6c4e342dc1ac46a435b.zip | |
std.HashMap: cleanup ensureCapacity + add test
- Cleaned up some comments
- Removed the "is power of two" check from optimizedCapacity since the * 5 / 3 is unlikely to end up with a power of two, so it's a wasted check the majority of the time
- Made ensureCapacity/ensureCapacityExact increment the modification count if they resize the hash map so that we can catch resizes while iterating, which would likely break the iterator state
Diffstat (limited to 'src/link.cpp')
0 files changed, 0 insertions, 0 deletions
