Skip to content

Vec_Clone

manuel villagran edited this page Oct 2, 2019 · 1 revision

Vec_Clone

Vec_Clone(Vec:vec, bool:readonly = false)

Creates a copy of a vector.

Parameters

  • Vec:vec the vector to make a copy of.
  • bool:readonly = false whether the copy should be read-only or not

Returns

  • INVALID_VECTOR_ID if was unable to allocate memory for the vector.
  • the vector is success.

Notes

  • Due to the way y_malloc works the clone vector's capacity may not be exactly the same capacity as the original, but will never be lower.
  • The cloned vector will only be read-only if the second parameter is true doesn't matter if the original is read-only or not.
Clone this wiki locally