You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Optimize StringBuilder append for static strings, and as_string().
This commit is contained in:
@@ -32,17 +32,17 @@
|
||||
#define STRING_BUILDER_H
|
||||
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/templates/local_vector.h"
|
||||
|
||||
class StringBuilder {
|
||||
uint32_t string_length = 0;
|
||||
|
||||
Vector<String> strings;
|
||||
Vector<const char *> c_strings;
|
||||
LocalVector<String> strings;
|
||||
LocalVector<const char *> c_strings;
|
||||
|
||||
// -1 means it's a Godot String
|
||||
// a natural number means C string.
|
||||
Vector<int32_t> appended_strings;
|
||||
LocalVector<int32_t> appended_strings;
|
||||
|
||||
public:
|
||||
StringBuilder &append(const String &p_string);
|
||||
|
||||
Reference in New Issue
Block a user