diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 10:18:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 10:18:31 +0400 |
commit | 69e6894b15271884623ea6f56ead06db83acbe99 (patch) | |
tree | b68200606afaca06cf7552f6b12fc20ebd30d487 /source/blender/blenlib/intern/gsqueue.c | |
parent | 7b99ae0ad3017e373be2a344e30d190b70ca66b4 (diff) |
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
Diffstat (limited to 'source/blender/blenlib/intern/gsqueue.c')
-rw-r--r-- | source/blender/blenlib/intern/gsqueue.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/gsqueue.c b/source/blender/blenlib/intern/gsqueue.c index c0fa81475c0..2aa51387c48 100644 --- a/source/blender/blenlib/intern/gsqueue.c +++ b/source/blender/blenlib/intern/gsqueue.c @@ -64,7 +64,7 @@ int BLI_gsqueue_size(GSQueue *gq) GSQueueElem *elem; int size= 0; - for(elem=gq->head; elem; elem=elem->next) + for (elem=gq->head; elem; elem=elem->next) size++; return size; @@ -79,7 +79,8 @@ void BLI_gsqueue_pop(GSQueue *gq, void *item_r) GSQueueElem *elem= gq->head; if (elem==gq->tail) { gq->head= gq->tail= NULL; - } else { + } + else { gq->head= gq->head->next; } @@ -92,7 +93,7 @@ void BLI_gsqueue_push(GSQueue *gq, void *item) /* compare: prevent events added double in row */ if (!BLI_gsqueue_is_empty(gq)) { - if(0==memcmp(item, &gq->head[1], gq->elem_size)) + if (0==memcmp(item, &gq->head[1], gq->elem_size)) return; } elem= MEM_mallocN(sizeof(*elem)+gq->elem_size, "gqueue_push"); @@ -101,7 +102,8 @@ void BLI_gsqueue_push(GSQueue *gq, void *item) if (BLI_gsqueue_is_empty(gq)) { gq->tail= gq->head= elem; - } else { + } + else { gq->tail= gq->tail->next= elem; } } @@ -113,7 +115,8 @@ void BLI_gsqueue_pushback(GSQueue *gq, void *item) if (BLI_gsqueue_is_empty(gq)) { gq->head= gq->tail= elem; - } else { + } + else { gq->head= elem; } } |