summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cqueue.h
diff options
context:
space:
mode:
authortylov <[email protected]>2023-07-12 19:39:59 +0200
committertylov <[email protected]>2023-07-12 21:01:46 +0200
commitebe5abc29d51c643520301e42124365477f44957 (patch)
treef1188f5c649f4244c384484ae584894280396272 /include/stc/cqueue.h
parent715a02ba8155de2f7d446e8d7d2ae305c27996b9 (diff)
downloadSTC-modified-ebe5abc29d51c643520301e42124365477f44957.tar.gz
STC-modified-ebe5abc29d51c643520301e42124365477f44957.zip
Changed docs and examples to use i_key* template parameters instead of i_val* for all non-maps.
Renamed c_ASSERT() to c_assert() and added optional message parameter to c_static_assert().
Diffstat (limited to 'include/stc/cqueue.h')
-rw-r--r--include/stc/cqueue.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/cqueue.h b/include/stc/cqueue.h
index e9f1b877..5d38ca89 100644
--- a/include/stc/cqueue.h
+++ b/include/stc/cqueue.h
@@ -88,13 +88,13 @@ STC_INLINE _cx_value* _cx_MEMB(_back)(const _cx_Self* self)
{ return self->data + ((self->end - 1) & self->capmask); }
STC_INLINE void _cx_MEMB(_pop)(_cx_Self* self) { // pop_front
- assert(!_cx_MEMB(_empty)(self));
+ c_assert(!_cx_MEMB(_empty)(self));
i_keydrop((self->data + self->start));
self->start = (self->start + 1) & self->capmask;
}
STC_INLINE _cx_value _cx_MEMB(_pull)(_cx_Self* self) { // move front out of queue
- assert(!_cx_MEMB(_empty)(self));
+ c_assert(!_cx_MEMB(_empty)(self));
intptr_t s = self->start;
self->start = (s + 1) & self->capmask;
return self->data[s];