Tessil / sparse-map

C++ implementation of a memory efficient hash map and hash set
MIT License
334 stars 36 forks source link

Fix serialization for small hashes #13

Closed sethrj closed 4 years ago

sethrj commented 4 years ago

I identified and believe I've fixed two bugs in deserialization:

Tessil commented 4 years ago

I amended a bit your PR to completely remove the special bucket_count == 0 case from the original code and leave the normal code paths take care of it. This allows us to avoid setting the max load factor in three different places.

Let me know if you see any problem, if everything looks good I will merge the PR

sethrj commented 4 years ago

Looks good, thanks! Sorry about the formatting change -- I have my editor set to remove trailing whitespace on saves, and I apparently forgot to disable it for one of the changesets.

Tessil commented 4 years ago

Sorry about the formatting change -- I have my editor set to remove trailing whitespace on saves, and I apparently forgot to disable it for one of the changesets.

No problem, I really need to pass the code of the library through clang-format as there are some incoherences in the current formatting.

I merged the changes, thank you for the fixes.