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:
Diffstat (limited to 'source/blender/functions/FN_generic_virtual_array.hh')
-rw-r--r--source/blender/functions/FN_generic_virtual_array.hh11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/functions/FN_generic_virtual_array.hh b/source/blender/functions/FN_generic_virtual_array.hh
index 703118ba23e..8aad017e68b 100644
--- a/source/blender/functions/FN_generic_virtual_array.hh
+++ b/source/blender/functions/FN_generic_virtual_array.hh
@@ -27,6 +27,7 @@
#include "BLI_virtual_array.hh"
+#include "FN_generic_array.hh"
#include "FN_generic_span.hh"
namespace blender::fn {
@@ -398,6 +399,16 @@ template<typename T> class GVArray_For_VArray : public GVArray {
}
};
+class GVArray_For_GArray : public GVArray_For_GSpan {
+ protected:
+ GArray<> array_;
+
+ public:
+ GVArray_For_GArray(GArray<> array) : GVArray_For_GSpan(array.as_span()), array_(std::move(array))
+ {
+ }
+};
+
/* Used to convert any generic virtual array into a typed one. */
template<typename T> class VArray_For_GVArray : public VArray<T> {
protected: