mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Use Span for String.sprintf, to accelerate vformat not needing to allocate an Array.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/templates/span.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/variant/variant_deep_duplicate.h"
|
||||
|
||||
@@ -201,6 +202,11 @@ public:
|
||||
bool is_read_only() const;
|
||||
static Array create_read_only();
|
||||
|
||||
Span<Variant> span() const;
|
||||
operator Span<Variant>() const {
|
||||
return this->span();
|
||||
}
|
||||
|
||||
Array(const Array &p_base, uint32_t p_type, const StringName &p_class_name, const Variant &p_script);
|
||||
Array(const Array &p_from);
|
||||
Array(std::initializer_list<Variant> p_init);
|
||||
|
||||
Reference in New Issue
Block a user