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

Store current capacity in CowData buffers, and rewrite most of it.

Add `reserve` to `CowData`, `Vector` and `Array`.

# Conflicts:
#	core/os/memory.h
#	core/templates/cowdata.h
This commit is contained in:
Lukas Tenbrink
2025-05-01 23:31:54 +02:00
parent 1f7630f1bf
commit 1bf821c1e1
11 changed files with 441 additions and 201 deletions

View File

@@ -1253,7 +1253,7 @@ Vector<float> String::split_floats_mk(const Vector<String> &p_splitters, bool p_
String buffer = *this;
while (true) {
int idx;
int idx = 0;
int end = findmk(p_splitters, from, &idx);
int spl_len = 1;
if (end < 0) {
@@ -1308,7 +1308,7 @@ Vector<int> String::split_ints_mk(const Vector<String> &p_splitters, bool p_allo
int len = length();
while (true) {
int idx;
int idx = 0;
int end = findmk(p_splitters, from, &idx);
int spl_len = 1;
if (end < 0) {