1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Use Span for String.sprintf, to accelerate vformat not needing to allocate an Array.

This commit is contained in:
Lukas Tenbrink
2025-03-10 17:56:14 +01:00
parent 8b4b93a82e
commit a916325e6a
5 changed files with 14 additions and 9 deletions

View File

@@ -936,6 +936,10 @@ bool Array::is_read_only() const {
return _p->read_only != nullptr;
}
Span<Variant> Array::span() const {
return _p->array.span();
}
Array::Array(const Array &p_from) {
_p = nullptr;
_ref(p_from);