Skip to content

Commit

Permalink
float to size_t cast
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaldwin committed Nov 25, 2023
1 parent 582b681 commit 3e277ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/cappuccino/lfuda_cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class lfuda_cache
// deleting from and re-inserting into the lfu data structure.
size_t use_count = e.m_lfu_position->first;
m_lfu_list.erase(e.m_lfu_position);
use_count *= m_dynamic_age_ratio;
use_count = (size_t)(use_count * m_dynamic_age_ratio);
e.m_lfu_position = m_lfu_list.emplace(use_count, da_start);

// The last item is now this item! This will maintain the insertion order.
Expand Down

0 comments on commit 3e277ab

Please sign in to comment.