diff options
Diffstat (limited to 'source/blender/blenlib/intern/gsqueue.c')
-rw-r--r-- | source/blender/blenlib/intern/gsqueue.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/gsqueue.c b/source/blender/blenlib/intern/gsqueue.c index fe89786b40d..973898016a4 100644 --- a/source/blender/blenlib/intern/gsqueue.c +++ b/source/blender/blenlib/intern/gsqueue.c @@ -60,6 +60,17 @@ int BLI_gsqueue_is_empty(GSQueue *gq) return (gq->head==NULL); } +int BLI_gsqueue_size(GSQueue *gq) +{ + GSQueueElem *elem; + int size= 0; + + for(elem=gq->head; elem; elem=elem->next) + size++; + + return size; +} + void BLI_gsqueue_peek(GSQueue *gq, void *item_r) { memcpy(item_r, &gq->head[1], gq->elem_size); |