From a4413d849d59f51421893f9bee9dfada630da362 Mon Sep 17 00:00:00 2001 From: RobinLockyer Date: Tue, 5 May 2026 16:38:51 +0100 Subject: [PATCH] Add `CowData::span()` and `CowData::operator Span()` from upstream Godot --- include/godot_cpp/templates/cowdata.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/godot_cpp/templates/cowdata.hpp b/include/godot_cpp/templates/cowdata.hpp index 39ba5c8e7..cb1fa1a39 100644 --- a/include/godot_cpp/templates/cowdata.hpp +++ b/include/godot_cpp/templates/cowdata.hpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -255,6 +256,9 @@ class CowData { return OK; } + _FORCE_INLINE_ operator Span() const { return Span(ptr(), size()); } + _FORCE_INLINE_ Span span() const { return operator Span(); } + Size find(const T &p_val, Size p_from = 0) const; Size rfind(const T &p_val, Size p_from = -1) const; Size count(const T &p_val) const;