We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 260190c + 697e0bb commit 2e60d51Copy full SHA for 2e60d51
core/templates/local_vector.h
@@ -59,11 +59,7 @@ class LocalVector {
59
}
60
count = p_size;
61
} else if (p_size > count) {
62
- if (unlikely(p_size > capacity)) {
63
- capacity = tight ? p_size : nearest_power_of_2_templated(p_size);
64
- data = (T *)memrealloc(data, capacity * sizeof(T));
65
- CRASH_COND_MSG(!data, "Out of memory");
66
- }
+ reserve(p_size);
67
if constexpr (p_init) {
68
memnew_arr_placement(data + count, p_size - count);
69
} else {
0 commit comments