MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / append_array

Method append_array

core/variant/array.cpp:293–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293void Array::append_array(const Array &p_array) {
294 ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state.");
295
296 if (!is_typed() || _p->typed.can_reference(p_array._p->typed)) {
297 _p->array.append_array(p_array._p->array);
298 return;
299 }
300
301 Vector<Variant> validated_array = p_array._p->array;
302 Variant *write = validated_array.ptrw();
303 for (int i = 0; i < validated_array.size(); ++i) {
304 ERR_FAIL_COND(!_p->typed.validate(write[i], "append_array"));
305 }
306
307 _p->array.append_array(validated_array);
308}
309
310Error Array::resize(int p_new_size) {
311 ERR_FAIL_COND_V_MSG(_p->read_only, ERR_LOCKED, "Array is in read-only state.");

Callers 15

create_convex_shapeMethod · 0.45
create_outlineMethod · 0.45
_setMethod · 0.45
_set_dataMethod · 0.45
create_from_imageMethod · 0.45
create_from_meshMethod · 0.45
mergeMethod · 0.45
append_arraysMethod · 0.45
mergeMethod · 0.45
optimize_indicesMethod · 0.45

Calls 4

sizeMethod · 0.65
can_referenceMethod · 0.45
ptrwMethod · 0.45
validateMethod · 0.45

Tested by 3

update_treeMethod · 0.36
get_outputMethod · 0.36