felixguendling / cista

Cista is a simple, high-performance, zero-copy C++ serialization & reflection library.
https://cista.rocks
MIT License
1.74k stars 110 forks source link

hash_storage: fix assignment operator #211

Closed freshFruict closed 3 months ago

freshFruict commented 3 months ago

The assignment operator of hash_storage now calls the clear function to ensure proper behavior. Previously, it only cleared the destination hash_storage if the source hash_storage was empty, leading to keys being left in the destination hash_storage that did not exist in the source, and not being copied if they already exist in the destination hash_storage. Now, the assignment operator clears the destination hash_storage every time, preventing this issue.

felixguendling commented 3 months ago

Thank you! :+1: :smiley: