Use Span for String.sprintf, to accelerate vformat not needing to allocate an Array.
This commit is contained in:
parent
8b4b93a82e
commit
a916325e6a
5 changed files with 14 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue