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-29 15:29:05 +0300
committerJacques Lucke <jacques@blender.org>2020-06-29 15:30:06 +0300
commit18bff53c997f5bfac0435b8a03ee967eed8c9e20 (patch)
treeb0d3b788a7e2a64f746ba96e3456f01d7b274ca2 /source/blender/functions
parent4fc5233467b1c273cdb82b221d8faa53249b99c6 (diff)
BLI: remove blender::Optional in favor of std::optional
`std::optional` can be used now, because we switched to C++17.
Diffstat (limited to 'source/blender/functions')
-rw-r--r--source/blender/functions/FN_attributes_ref.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/functions/FN_attributes_ref.hh b/source/blender/functions/FN_attributes_ref.hh
index 1a4c1d2aadc..383b26330bf 100644
--- a/source/blender/functions/FN_attributes_ref.hh
+++ b/source/blender/functions/FN_attributes_ref.hh
@@ -24,6 +24,8 @@
* and index.
*/
+#include <optional>
+
#include "FN_spans.hh"
#include "BLI_linear_allocator.hh"
@@ -204,7 +206,7 @@ class MutableAttributesRef {
return this->get<T>(m_info->index_of(name));
}
- Optional<GMutableSpan> try_get(StringRef name, const CPPType &type) const
+ std::optional<GMutableSpan> try_get(StringRef name, const CPPType &type) const
{
int index = m_info->try_index_of(name, type);
if (index == -1) {
@@ -215,7 +217,7 @@ class MutableAttributesRef {
}
}
- template<typename T> Optional<MutableSpan<T>> try_get(StringRef name) const
+ template<typename T> std::optional<MutableSpan<T>> try_get(StringRef name) const
{
int index = m_info->try_index_of(name);
if (index == -1) {