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:
authorBrecht Van Lommel <brecht@blender.org>2022-01-21 22:07:20 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-01-21 23:36:00 +0300
commit32ceb0b80710473c9a9b818da23919f184fa3aae (patch)
treee8626097a7fcf87c8d80373009fe58a44fc916e6
parent4f9be46526e5b17f6da2b7548ae7ccc10f84bdb5 (diff)
Fix std::optional value() build error on older macOS SDK
No longer happens on the buildbot, but for users building with an older Xcode we still need to avoid using value().
-rw-r--r--source/blender/blenkernel/intern/idprop_serialize.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/idprop_serialize.cc b/source/blender/blenkernel/intern/idprop_serialize.cc
index 92dce49500c..08a7f13b806 100644
--- a/source/blender/blenkernel/intern/idprop_serialize.cc
+++ b/source/blender/blenkernel/intern/idprop_serialize.cc
@@ -304,7 +304,7 @@ class IDPStringSerializer : public IDPropertySerializer {
std::unique_ptr<IDProperty, IDPropertyDeleter> entry_to_idprop(
DictionaryEntryParser &entry_reader) const override
{
- BLI_assert(entry_reader.get_type().value() == IDP_STRING);
+ BLI_assert(*(entry_reader.get_type()) == IDP_STRING);
std::optional<std::string> name = entry_reader.get_name();
if (!name.has_value()) {
return nullptr;
@@ -344,7 +344,7 @@ class IDPIntSerializer : public IDPropertySerializer {
std::unique_ptr<IDProperty, IDPropertyDeleter> entry_to_idprop(
DictionaryEntryParser &entry_reader) const override
{
- BLI_assert(entry_reader.get_type().value() == IDP_INT);
+ BLI_assert(*(entry_reader.get_type()) == IDP_INT);
std::optional<std::string> name = entry_reader.get_name();
if (!name.has_value()) {
return nullptr;
@@ -384,7 +384,7 @@ class IDPFloatSerializer : public IDPropertySerializer {
std::unique_ptr<IDProperty, IDPropertyDeleter> entry_to_idprop(
DictionaryEntryParser &entry_reader) const override
{
- BLI_assert(entry_reader.get_type().value() == IDP_FLOAT);
+ BLI_assert(*(entry_reader.get_type()) == IDP_FLOAT);
std::optional<std::string> name = entry_reader.get_name();
if (!name.has_value()) {
return nullptr;
@@ -424,7 +424,7 @@ class IDPDoubleSerializer : public IDPropertySerializer {
std::unique_ptr<IDProperty, IDPropertyDeleter> entry_to_idprop(
DictionaryEntryParser &entry_reader) const override
{
- BLI_assert(entry_reader.get_type().value() == IDP_DOUBLE);
+ BLI_assert(*(entry_reader.get_type()) == IDP_DOUBLE);
std::optional<std::string> name = entry_reader.get_name();
if (!name.has_value()) {
return nullptr;
@@ -502,7 +502,7 @@ class IDPArraySerializer : public IDPropertySerializer {
std::unique_ptr<IDProperty, IDPropertyDeleter> entry_to_idprop(
DictionaryEntryParser &entry_reader) const override
{
- BLI_assert(entry_reader.get_type().value() == IDP_ARRAY);
+ BLI_assert(*(entry_reader.get_type()) == IDP_ARRAY);
std::optional<eIDPropertyType> property_subtype = entry_reader.get_subtype();
if (!property_subtype.has_value()) {
return nullptr;
@@ -556,8 +556,8 @@ class IDPArraySerializer : public IDPropertySerializer {
std::unique_ptr<IDProperty, IDPropertyDeleter> idprop_array_int_from_value(
DictionaryEntryParser &entry_reader) const
{
- BLI_assert(entry_reader.get_type().value() == IDP_ARRAY);
- BLI_assert(entry_reader.get_subtype().value() == IDP_INT);
+ BLI_assert(*(entry_reader.get_type()) == IDP_ARRAY);
+ BLI_assert(*(entry_reader.get_subtype()) == IDP_INT);
std::optional<std::string> name = entry_reader.get_name();
if (!name.has_value()) {
return nullptr;
@@ -572,8 +572,8 @@ class IDPArraySerializer : public IDPropertySerializer {
std::unique_ptr<IDProperty, IDPropertyDeleter> idprop_array_float_from_value(
DictionaryEntryParser &entry_reader) const
{
- BLI_assert(entry_reader.get_type().value() == IDP_ARRAY);
- BLI_assert(entry_reader.get_subtype().value() == IDP_FLOAT);
+ BLI_assert(*(entry_reader.get_type()) == IDP_ARRAY);
+ BLI_assert(*(entry_reader.get_subtype()) == IDP_FLOAT);
std::optional<std::string> name = entry_reader.get_name();
if (!name.has_value()) {
return nullptr;
@@ -588,8 +588,8 @@ class IDPArraySerializer : public IDPropertySerializer {
std::unique_ptr<IDProperty, IDPropertyDeleter> idprop_array_double_from_value(
DictionaryEntryParser &entry_reader) const
{
- BLI_assert(entry_reader.get_type().value() == IDP_ARRAY);
- BLI_assert(entry_reader.get_subtype().value() == IDP_DOUBLE);
+ BLI_assert(*(entry_reader.get_type()) == IDP_ARRAY);
+ BLI_assert(*(entry_reader.get_subtype()) == IDP_DOUBLE);
std::optional<std::string> name = entry_reader.get_name();
if (!name.has_value()) {
return nullptr;
@@ -639,7 +639,7 @@ class IDPGroupSerializer : public IDPropertySerializer {
std::unique_ptr<IDProperty, IDPropertyDeleter> entry_to_idprop(
DictionaryEntryParser &entry_reader) const override
{
- BLI_assert(entry_reader.get_type().value() == IDP_GROUP);
+ BLI_assert(*(entry_reader.get_type()) == IDP_GROUP);
std::optional<std::string> name = entry_reader.get_name();
if (!name.has_value()) {
return nullptr;
@@ -796,7 +796,7 @@ static IDProperty *idprop_from_value(const DictionaryValue &value)
return nullptr;
}
- const IDPropertySerializer &serializer = serializer_for(property_type.value());
+ const IDPropertySerializer &serializer = serializer_for(*property_type);
return serializer.entry_to_idprop(entry_reader).release();
}