Vector functions used to work woth t_pos2.
More...
Vector functions used to work woth t_pos2.
◆ posvecfree()
Free the vector.
- Parameters
-
| [in,out] | vec | vector pointer |
◆ posvecnew()
Create a vector with an initial starting size.
- Parameters
-
- Returns
- t_posvec* pointer to the new vector
◆ posvecpop()
Pops the last element of the vector if not empty.
- Parameters
-
| [in,out] | vec | vector pointer |
| [in,out] | pos | if non-null, copy the last element to this location |
- Returns
- int 1 OK, 0 otherwise
◆ posvecpush()
Add a new element to the vector.
- Parameters
-
| [in,out] | vec | vector pointer |
| [in] | data | payload to add |
- Returns
- int 1 OK, 0 otherwise
◆ posvecremove()
Removes the element at the specified index from the vector if found.
- Parameters
-
| [in,out] | vec | vector pointer |
| [in] | index | index of the element to define |
| [in,out] | result | if non-null, copy the removed element to this location |
- Returns
- int