diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-03 15:52:51 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-03 15:53:06 +0300 |
commit | 93da09d717ff4502975c506c574faf0c07f010b4 (patch) | |
tree | 5496c001844cf557be525c08a6ef830998368d3d /source/blender/blenlib/BLI_set_slots.hh | |
parent | 9dce2c9d1432d2798854b909e6262fbfb94ce3c7 (diff) |
Cleanup: add const in various places
Diffstat (limited to 'source/blender/blenlib/BLI_set_slots.hh')
-rw-r--r-- | source/blender/blenlib/BLI_set_slots.hh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenlib/BLI_set_slots.hh b/source/blender/blenlib/BLI_set_slots.hh index 379e81b7644..9719f322693 100644 --- a/source/blender/blenlib/BLI_set_slots.hh +++ b/source/blender/blenlib/BLI_set_slots.hh @@ -260,7 +260,7 @@ template<typename Key> class HashedSetSlot { return hash_; } - void relocate_occupied_here(HashedSetSlot &other, uint32_t hash) + void relocate_occupied_here(HashedSetSlot &other, const uint32_t hash) { BLI_assert(!this->is_occupied()); BLI_assert(other.is_occupied()); @@ -271,7 +271,7 @@ template<typename Key> class HashedSetSlot { } template<typename ForwardKey, typename IsEqual> - bool contains(const ForwardKey &key, const IsEqual &is_equal, uint32_t hash) const + bool contains(const ForwardKey &key, const IsEqual &is_equal, const uint32_t hash) const { /* hash_ might be uninitialized here, but that is ok. */ if (hash_ == hash) { @@ -282,7 +282,7 @@ template<typename Key> class HashedSetSlot { return false; } - template<typename ForwardKey> void occupy(ForwardKey &&key, uint32_t hash) + template<typename ForwardKey> void occupy(ForwardKey &&key, const uint32_t hash) { BLI_assert(!this->is_occupied()); state_ = Occupied; @@ -342,7 +342,7 @@ template<typename Key, typename KeyInfo> class IntrusiveSetSlot { return hash(key_); } - void relocate_occupied_here(IntrusiveSetSlot &other, uint32_t UNUSED(hash)) + void relocate_occupied_here(IntrusiveSetSlot &other, const uint32_t UNUSED(hash)) { BLI_assert(!this->is_occupied()); BLI_assert(other.is_occupied()); @@ -351,13 +351,13 @@ template<typename Key, typename KeyInfo> class IntrusiveSetSlot { } template<typename ForwardKey, typename IsEqual> - bool contains(const ForwardKey &key, const IsEqual &is_equal, uint32_t UNUSED(hash)) const + bool contains(const ForwardKey &key, const IsEqual &is_equal, const uint32_t UNUSED(hash)) const { BLI_assert(KeyInfo::is_not_empty_or_removed(key)); return is_equal(key_, key); } - template<typename ForwardKey> void occupy(ForwardKey &&key, uint32_t UNUSED(hash)) + template<typename ForwardKey> void occupy(ForwardKey &&key, const uint32_t UNUSED(hash)) { BLI_assert(!this->is_occupied()); BLI_assert(KeyInfo::is_not_empty_or_removed(key)); |