summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cstack.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-09-08 10:24:45 +0200
committerTyge Løvset <[email protected]>2021-09-08 10:24:45 +0200
commit74a737adf39cf6416195dc9a9c83fd46362416a6 (patch)
tree46b7048f60017eb72442dbf4d9073d53246431a6 /include/stc/cstack.h
parentc40cb13574d0b00da2ff151de81b701e29b80e10 (diff)
downloadSTC-modified-74a737adf39cf6416195dc9a9c83fd46362416a6.tar.gz
STC-modified-74a737adf39cf6416195dc9a9c83fd46362416a6.zip
Improved undocumented iterator method names: fwd, adv => advance, idx => index.
Diffstat (limited to 'include/stc/cstack.h')
-rw-r--r--include/stc/cstack.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/stc/cstack.h b/include/stc/cstack.h
index 448b6c2f..42717ee8 100644
--- a/include/stc/cstack.h
+++ b/include/stc/cstack.h
@@ -90,5 +90,7 @@ STC_INLINE cx_iter_t cx_memb(_begin)(const Self* self)
STC_INLINE cx_iter_t cx_memb(_end)(const Self* self)
{ return c_make(cx_iter_t){self->data + self->size}; }
STC_INLINE void cx_memb(_next)(cx_iter_t* it) { ++it->ref; }
+STC_INLINE cx_iter_t cx_memb(_advance)(cx_iter_t it, intptr_t offs)
+ { it.ref += offs; return it; }
#include "template.h"