summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cpque.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-09-23 12:32:02 +0200
committerTyge Løvset <[email protected]>2022-09-23 12:32:02 +0200
commit0ec40a5819a619b6b2777f24c555a8953e99ea9b (patch)
tree71849156f92044f14c11ebf14716afde8a46b7e3 /include/stc/cpque.h
parent1d7da47d207c2ce569367cac66f56e22344bab1c (diff)
downloadSTC-modified-0ec40a5819a619b6b2777f24c555a8953e99ea9b.tar.gz
STC-modified-0ec40a5819a619b6b2777f24c555a8953e99ea9b.zip
Added assert() checks in pop-functions.
Diffstat (limited to 'include/stc/cpque.h')
-rw-r--r--include/stc/cpque.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/stc/cpque.h b/include/stc/cpque.h
index 183390c4..532bf710 100644
--- a/include/stc/cpque.h
+++ b/include/stc/cpque.h
@@ -86,7 +86,7 @@ STC_INLINE const _cx_value* _cx_memb(_top)(const _cx_self* self)
{ return &self->data[0]; }
STC_INLINE void _cx_memb(_pop)(_cx_self* self)
- { _cx_memb(_erase_at)(self, 0); }
+ { assert(!_cx_memb(_empty)(self)); _cx_memb(_erase_at)(self, 0); }
#if !defined _i_no_clone
STC_API _cx_self _cx_memb(_clone)(_cx_self q);