[Bf-blender-cvs] [4bddffbeb80] virtual-array-attributes: gspan conversion

Jacques Lucke noreply at git.blender.org
Mon Apr 12 18:27:54 CEST 2021


Commit: 4bddffbeb8054ca6bf8165acbc0dae5c9c14a1b0
Author: Jacques Lucke
Date:   Sat Apr 10 17:52:50 2021 +0200
Branches: virtual-array-attributes
https://developer.blender.org/rB4bddffbeb8054ca6bf8165acbc0dae5c9c14a1b0

gspan conversion

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

M	source/blender/functions/FN_generic_virtual_array.hh

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

diff --git a/source/blender/functions/FN_generic_virtual_array.hh b/source/blender/functions/FN_generic_virtual_array.hh
index afd125d98f4..6a877c622f9 100644
--- a/source/blender/functions/FN_generic_virtual_array.hh
+++ b/source/blender/functions/FN_generic_virtual_array.hh
@@ -533,6 +533,16 @@ class GVArray_As_GSpan final : public GVArray_For_GSpan {
       MEM_freeN(owned_data_);
     }
   }
+
+  GSpan as_span() const
+  {
+    return this->get_span();
+  }
+
+  operator GSpan() const
+  {
+    return this->get_span();
+  }
 };
 
 template<typename T> class GVArray_For_OwnedVArray : public GVArray_For_VArray<T> {



More information about the Bf-blender-cvs mailing list