diff options
author | Jacques Lucke <jacques@blender.org> | 2020-06-11 16:36:01 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-06-11 16:37:09 +0300 |
commit | e44045745d51622513f5733686f78db65d160263 (patch) | |
tree | fbf2f58ccf6243e3b30bd06e31f4e349d7692439 /source/blender/blenlib/BLI_set_slots.hh | |
parent | e22098616c25c00786409fbf4e3229456f6b3807 (diff) |
BLI: don't pass const pointers to placement new operator
This resulted in compile errors.
Diffstat (limited to 'source/blender/blenlib/BLI_set_slots.hh')
-rw-r--r-- | source/blender/blenlib/BLI_set_slots.hh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenlib/BLI_set_slots.hh b/source/blender/blenlib/BLI_set_slots.hh index 15f56f2450e..581e70ce628 100644 --- a/source/blender/blenlib/BLI_set_slots.hh +++ b/source/blender/blenlib/BLI_set_slots.hh @@ -80,7 +80,7 @@ template<typename Key> class SimpleSetSlot { { m_state = other.m_state; if (other.m_state == Occupied) { - new (this->key()) Key(*other.key()); + new ((void *)this->key()) Key(*other.key()); } } @@ -93,7 +93,7 @@ template<typename Key> class SimpleSetSlot { { m_state = other.m_state; if (other.m_state == Occupied) { - new (this->key()) Key(std::move(*other.key())); + new ((void *)this->key()) Key(std::move(*other.key())); } } @@ -148,7 +148,7 @@ template<typename Key> class SimpleSetSlot { BLI_assert(!this->is_occupied()); BLI_assert(other.is_occupied()); m_state = Occupied; - new (this->key()) Key(std::move(*other.key())); + new ((void *)this->key()) Key(std::move(*other.key())); other.key()->~Key(); } @@ -173,7 +173,7 @@ template<typename Key> class SimpleSetSlot { { BLI_assert(!this->is_occupied()); m_state = Occupied; - new (this->key()) Key(std::forward<ForwardKey>(key)); + new ((void *)this->key()) Key(std::forward<ForwardKey>(key)); } /** @@ -221,7 +221,7 @@ template<typename Key> class HashedSetSlot { m_state = other.m_state; if (other.m_state == Occupied) { m_hash = other.m_hash; - new (this->key()) Key(*other.key()); + new ((void *)this->key()) Key(*other.key()); } } @@ -230,7 +230,7 @@ template<typename Key> class HashedSetSlot { m_state = other.m_state; if (other.m_state == Occupied) { m_hash = other.m_hash; - new (this->key()) Key(std::move(*other.key())); + new ((void *)this->key()) Key(std::move(*other.key())); } } @@ -266,7 +266,7 @@ template<typename Key> class HashedSetSlot { BLI_assert(other.is_occupied()); m_state = Occupied; m_hash = hash; - new (this->key()) Key(std::move(*other.key())); + new ((void *)this->key()) Key(std::move(*other.key())); other.key()->~Key(); } @@ -287,7 +287,7 @@ template<typename Key> class HashedSetSlot { BLI_assert(!this->is_occupied()); m_state = Occupied; m_hash = hash; - new (this->key()) Key(std::forward<ForwardKey>(key)); + new ((void *)this->key()) Key(std::forward<ForwardKey>(key)); } void remove() |