Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-06-11 16:36:01 +0300
committerJacques Lucke <jacques@blender.org>2020-06-11 16:37:09 +0300
commite44045745d51622513f5733686f78db65d160263 (patch)
treefbf2f58ccf6243e3b30bd06e31f4e349d7692439 /source/blender/blenlib/BLI_optional.hh
parente22098616c25c00786409fbf4e3229456f6b3807 (diff)
BLI: don't pass const pointers to placement new operator
This resulted in compile errors.
Diffstat (limited to 'source/blender/blenlib/BLI_optional.hh')
-rw-r--r--source/blender/blenlib/BLI_optional.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/BLI_optional.hh b/source/blender/blenlib/BLI_optional.hh
index b5f98d6fa97..2e6b66d0eac 100644
--- a/source/blender/blenlib/BLI_optional.hh
+++ b/source/blender/blenlib/BLI_optional.hh
@@ -121,7 +121,7 @@ template<typename T> class Optional {
this->value() = value;
}
else {
- new (this->value_ptr()) T(value);
+ new ((void *)this->value_ptr()) T(value);
m_set = true;
}
}
@@ -132,7 +132,7 @@ template<typename T> class Optional {
this->value() = std::move(value);
}
else {
- new (this->value_ptr()) T(std::move(value));
+ new ((void *)this->value_ptr()) T(std::move(value));
m_set = true;
}
}
@@ -140,14 +140,14 @@ template<typename T> class Optional {
void set_new(const T &value)
{
BLI_assert(!m_set);
- new (this->value_ptr()) T(value);
+ new ((void *)this->value_ptr()) T(value);
m_set = true;
}
void set_new(T &&value)
{
BLI_assert(!m_set);
- new (this->value_ptr()) T(std::move(value));
+ new ((void *)this->value_ptr()) T(std::move(value));
m_set = true;
}