diff options
| author | Kai Gunger <kgunger12@gmail.com> | 2026-05-07 02:00:45 -0400 |
|---|---|---|
| committer | Kai Gunger <kgunger12@gmail.com> | 2026-05-07 02:00:45 -0400 |
| commit | b140289c4064d3a813d0d3d8a4ffb65ba684c733 (patch) | |
| tree | 82af71679b15e83511f021249564d8844b653fe8 /tnslc/utils | |
| parent | 8ffb50a4bc61b51952aa78da0c6e1f002f09e1be (diff) | |
[tnslc] fix members in binary operations
Diffstat (limited to 'tnslc/utils')
| -rw-r--r-- | tnslc/utils/vector.tnsl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tnslc/utils/vector.tnsl b/tnslc/utils/vector.tnsl index 38c45fc..b38978f 100644 --- a/tnslc/utils/vector.tnsl +++ b/tnslc/utils/vector.tnsl @@ -56,6 +56,19 @@ uint VECTOR_MAX_GROW = 256 self.count++ ;/ + /; replace (int index, ~void el) + ~uint8 start = self.get(index) + /; if (start == NULL) + return + ;/ + + /; loop (int i = 0; i < self._elsz) [i++] + ~uint8 to = start + i + ~uint8 from = el + i + to` = from` + ;/ + ;/ + /; _shrink(uint i) /; if (i !< self.size) self.size = 1 |