diff options
author | Hans Goudey <h.goudey@me.com> | 2022-10-04 01:37:25 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-10-04 01:38:16 +0300 |
commit | 97746129d5870beedc40e3c035c7982ce8a6bebc (patch) | |
tree | b819b8e7875e6684aad7ea1f6bb7922d4fa1c8fc /source/blender/blenlib/BLI_set_slots.hh | |
parent | ed7f5713f8f9d605e3cd4cce42e40fb5c6bf4bf5 (diff) |
Cleanup: replace UNUSED macro with commented args in C++ code
This is the conventional way of dealing with unused arguments in C++,
since it works on all compilers.
Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
Diffstat (limited to 'source/blender/blenlib/BLI_set_slots.hh')
-rw-r--r-- | source/blender/blenlib/BLI_set_slots.hh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenlib/BLI_set_slots.hh b/source/blender/blenlib/BLI_set_slots.hh index 805c194ac90..8ef49e0a2d0 100644 --- a/source/blender/blenlib/BLI_set_slots.hh +++ b/source/blender/blenlib/BLI_set_slots.hh @@ -129,7 +129,7 @@ template<typename Key> class SimpleSetSlot { * key. The hash is used by other slot implementations to determine inequality faster. */ template<typename ForwardKey, typename IsEqual> - bool contains(const ForwardKey &key, const IsEqual &is_equal, uint64_t UNUSED(hash)) const + bool contains(const ForwardKey &key, const IsEqual &is_equal, uint64_t /*hash*/) const { if (state_ == Occupied) { return is_equal(key, *key_buffer_); @@ -141,7 +141,7 @@ template<typename Key> class SimpleSetSlot { * Change the state of this slot from empty/removed to occupied. The key has to be constructed * by calling the constructor with the given key as parameter. */ - template<typename ForwardKey> void occupy(ForwardKey &&key, uint64_t UNUSED(hash)) + template<typename ForwardKey> void occupy(ForwardKey &&key, uint64_t /*hash*/) { BLI_assert(!this->is_occupied()); new (&key_buffer_) Key(std::forward<ForwardKey>(key)); @@ -226,7 +226,7 @@ template<typename Key> class HashedSetSlot { return state_ == Empty; } - template<typename Hash> uint64_t get_hash(const Hash &UNUSED(hash)) const + template<typename Hash> uint64_t get_hash(const Hash & /*hash*/) const { BLI_assert(this->is_occupied()); return hash_; @@ -306,13 +306,13 @@ template<typename Key, typename KeyInfo> class IntrusiveSetSlot { } template<typename ForwardKey, typename IsEqual> - bool contains(const ForwardKey &key, const IsEqual &is_equal, const uint64_t UNUSED(hash)) const + bool contains(const ForwardKey &key, const IsEqual &is_equal, const uint64_t /*hash*/) const { BLI_assert(KeyInfo::is_not_empty_or_removed(key)); return is_equal(key_, key); } - template<typename ForwardKey> void occupy(ForwardKey &&key, const uint64_t UNUSED(hash)) + template<typename ForwardKey> void occupy(ForwardKey &&key, const uint64_t /*hash*/) { BLI_assert(!this->is_occupied()); BLI_assert(KeyInfo::is_not_empty_or_removed(key)); |