[Bf-blender-cvs] [404486e66c6] master: Functions: minor api improvements

Jacques Lucke noreply at git.blender.org
Sun Jul 12 10:01:50 CEST 2020


Commit: 404486e66c6a4ebebb085700d58b396597146add
Author: Jacques Lucke
Date:   Sun Jul 12 10:01:37 2020 +0200
Branches: master
https://developer.blender.org/rB404486e66c6a4ebebb085700d58b396597146add

Functions: minor api improvements

===================================================================

M	source/blender/blenkernel/BKE_node_tree_multi_function.hh
M	source/blender/functions/FN_cpp_type.hh
M	source/blender/functions/FN_spans.hh

===================================================================

diff --git a/source/blender/blenkernel/BKE_node_tree_multi_function.hh b/source/blender/blenkernel/BKE_node_tree_multi_function.hh
index 33810b331dc..dcbd551591f 100644
--- a/source/blender/blenkernel/BKE_node_tree_multi_function.hh
+++ b/source/blender/blenkernel/BKE_node_tree_multi_function.hh
@@ -80,6 +80,11 @@ class MFNetworkTreeMap {
     return network_;
   }
 
+  fn::MFNetwork &network()
+  {
+    return network_;
+  }
+
   void add(const DSocket &dsocket, fn::MFSocket &socket)
   {
     BLI_assert(dsocket.is_input() == socket.is_input());
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<void> {
     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;



More information about the Bf-blender-cvs mailing list