MCPcopy Create free account
hub / github.com/IoLanguage/io / UArray_removeEvenIndexes

Function UArray_removeEvenIndexes

libs/basekit/source/UArray_math.c:624–640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622}
623
624void UArray_removeEvenIndexes(UArray *self) {
625 size_t itemSize = self->itemSize;
626 size_t di = 0;
627 size_t si = 1;
628 size_t max = self->size;
629 uint8_t *b = self->data;
630
631 while (si < max) {
632 uint8_t *src = b + (si * itemSize);
633 uint8_t *dest = b + (di * itemSize);
634 memcpy(dest, src, itemSize);
635 si = si + 2;
636 di = di + 1;
637 }
638
639 UArray_setSize_(self, di);
640}
641
642void UArray_reverseItemByteOrders(UArray *self) {
643 size_t itemSize = self->itemSize;

Callers

nothing calls this directly

Calls 1

UArray_setSize_Function · 0.85

Tested by

no test coverage detected