MCPcopy Create free account
hub / github.com/AprilRobotics/apriltag / zarray_add

Function zarray_add

common/zarray.h:179–188  ·  view source on GitHub ↗

* Adds a new element to the end of the supplied array, and sets its value * (by copying) from the data pointed to by the supplied pointer 'p'. * Automatically ensures that enough storage space is available for the new element. */

Source from the content-addressed store, hash-verified

177 * Automatically ensures that enough storage space is available for the new element.
178 */
179static inline void zarray_add(zarray_t *za, const void *p)
180{
181 assert(za != NULL);
182 assert(p != NULL);
183
184 zarray_ensure_capacity(za, za->size + 1);
185
186 memcpy(&za->data[za->size*za->el_sz], p, za->el_sz);
187 za->size++;
188}
189
190/**
191 * Retrieves the element from the supplied array located at the zero-based

Callers 15

do_quad_taskFunction · 0.85
do_gradient_clustersFunction · 0.85
merge_clustersFunction · 0.85
gradient_clustersFunction · 0.85
quad_decode_taskFunction · 0.85
zhash_keysFunction · 0.85
zhash_valuesFunction · 0.85
getopt_parseFunction · 0.85
getopt_add_spacerFunction · 0.85
getopt_add_boolFunction · 0.85

Calls 1

zarray_ensure_capacityFunction · 0.85

Tested by

no test coverage detected