Skip to content

Commit

Permalink
another minor fix in linear_hashmap
Browse files Browse the repository at this point in the history
  • Loading branch information
crocdialer committed Sep 29, 2024
1 parent dad5bb7 commit cb20671
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/vierkant/linear_hashmap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ class linear_hashmap
storage_item_t *item = m_storage.get(), *end = item + m_capacity;
for(; item != end; ++item, ++output_ptr)
{
if(item->key != key_t() && item->value) { *output_ptr = {item->key, *item->value}; }
if(item->key != key_t())
{
output_ptr->key = item->key;
output_ptr->value = item->value ? *item->value : value_t();
}
else { *output_ptr = {}; }
}
}
Expand Down

0 comments on commit cb20671

Please sign in to comment.