From 404486e66c6a4ebebb085700d58b396597146add Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Sun, 12 Jul 2020 10:01:37 +0200 Subject: Functions: minor api improvements --- source/blender/functions/FN_cpp_type.hh | 3 ++- source/blender/functions/FN_spans.hh | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'source/blender/functions') diff --git a/source/blender/functions/FN_cpp_type.hh b/source/blender/functions/FN_cpp_type.hh index 17976c8acb0..7ec60809194 100644 --- a/source/blender/functions/FN_cpp_type.hh +++ b/source/blender/functions/FN_cpp_type.hh @@ -70,10 +70,11 @@ #include "BLI_index_mask.hh" #include "BLI_math_base.h" #include "BLI_string_ref.hh" +#include "BLI_utility_mixins.hh" namespace blender::fn { -class CPPType { +class CPPType : NonCopyable, NonMovable { public: using ConstructDefaultF = void (*)(void *ptr); using ConstructDefaultNF = void (*)(void *ptr, uint n); diff --git a/source/blender/functions/FN_spans.hh b/source/blender/functions/FN_spans.hh index b2622eab95f..2e3ba94fce3 100644 --- a/source/blender/functions/FN_spans.hh +++ b/source/blender/functions/FN_spans.hh @@ -339,6 +339,11 @@ class GVSpan : public VSpanBase { return ref; } + static GVSpan FromSingleWithMaxSize(const CPPType &type, const void *value) + { + return GVSpan::FromSingle(type, value, UINT32_MAX); + } + static GVSpan FromFullPointerArray(const CPPType &type, const void *const *values, uint size) { GVSpan ref; -- cgit v1.2.3