From 513300d52839e7e493bd296ba9786a018ce9dbd8 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Tue, 27 Sep 2022 09:51:52 +0200 Subject: Renamed c_flt_drop() and c_flt_dropwhile() to c_flt_skip() and c_flt_skipwhile() This lines up with Rust namings, and does not conflict with the use of drop as destructor. --- include/stc/ccommon.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/stc/ccommon.h b/include/stc/ccommon.h index c6bf1f72..c6ec4529 100644 --- a/include/stc/ccommon.h +++ b/include/stc/ccommon.h @@ -168,9 +168,9 @@ STC_INLINE char* c_strnstrn(const char *s, const char *needle, #define c_FLT_STACK 14 // 22, 30, .. #endif #define c_flt_take(i, n) (++(i).s1[(i).s1top++] <= (n)) -#define c_flt_drop(i, n) (++(i).s1[(i).s1top++] > (n)) -#define c_flt_dropwhile(i, pred) ((i).s2[(i).s2top++] |= !(pred)) -#define c_flt_takewhile(i, pred) !c_flt_dropwhile(i, pred) +#define c_flt_skip(i, n) (++(i).s1[(i).s1top++] > (n)) +#define c_flt_skipwhile(i, pred) ((i).s2[(i).s2top++] |= !(pred)) +#define c_flt_takewhile(i, pred) !c_flt_skipwhile(i, pred) #define c_forfilter(...) c_MACRO_OVERLOAD(c_forfilter, __VA_ARGS__) #define c_forfilter4(it, C, cnt, filter) \ -- cgit v1.2.3