Skip to content

Commit

Permalink
Cast away const.
Browse files Browse the repository at this point in the history
  • Loading branch information
nolan-veed committed Oct 15, 2023
1 parent fd76ec5 commit 03af55f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internal_modules/roc_core/hashmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Hashmap : public NonCopyable<> {
template <class Key> Pointer find(const Key& key) const {
const hashsum_t hash = T::key_hash(key);
HashmapNode::HashmapNodeData* node = impl_.find_node(
hash, (void*)&key,
hash, (void*)&const_cast<Key&>(key),
&Hashmap<T, EmbeddedCapacity, OwnershipPolicy>::key_equals<Key>);
if (!node) {
return NULL;
Expand Down Expand Up @@ -293,7 +293,7 @@ class Hashmap : public NonCopyable<> {
template <class Key>
void insert_(const Key& key, HashmapNode::HashmapNodeData* node) {
const hashsum_t hash = T::key_hash(key);
impl_.insert(node, hash, (void*)&key,
impl_.insert(node, hash, (void*)&const_cast<Key&>(key),
&Hashmap<T, EmbeddedCapacity, OwnershipPolicy>::key_equals<Key>);
}

Expand Down

0 comments on commit 03af55f

Please sign in to comment.