diff options
-rw-r--r-- | source/blender/blenkernel/intern/pbvh_bmesh.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 3 | ||||
-rw-r--r-- | source/blender/blenlib/intern/BLI_mempool.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/sort.c | 24 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 5 |
5 files changed, 23 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c index 4d68336e66f..154834b476d 100644 --- a/source/blender/blenkernel/intern/pbvh_bmesh.c +++ b/source/blender/blenkernel/intern/pbvh_bmesh.c @@ -429,7 +429,8 @@ static void pbvh_bmesh_face_remove(PBVH *bvh, BMFace *f) if (new_node) { pbvh_bmesh_vert_ownership_transfer(bvh, new_node, v); - } else { + } + else { BLI_ghash_remove(f_node->bm_unique_verts, v, NULL, NULL); BLI_ghash_remove(bvh->bm_vert_to_node, v, NULL, NULL); } diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 95605cd2d2d..8840e08c2a1 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3679,7 +3679,8 @@ bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, Scene *evil_scene) /* Unlike _update_sound_ funcs, these ones take info from audaspace to update sequence length! */ #ifdef WITH_AUDASPACE -static bool sequencer_refresh_sound_length_recursive(Scene *scene, ListBase *seqbase) { +static bool sequencer_refresh_sound_length_recursive(Scene *scene, ListBase *seqbase) +{ Sequence *seq; bool changed = false; diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c index ea63dd81ab2..9a371349a57 100644 --- a/source/blender/blenlib/intern/BLI_mempool.c +++ b/source/blender/blenlib/intern/BLI_mempool.c @@ -263,7 +263,7 @@ void BLI_mempool_free(BLI_mempool *pool, void *addr) BLI_mempool_chunk *chunk; bool found = false; for (chunk = pool->chunks.first; chunk; chunk = chunk->next) { - if ((char*)addr >= (char*)chunk->data && (char*)addr < (char*)chunk->data + pool->csize) { + if (ARRAY_HAS_ITEM((char *)addr, (char *)chunk->data, pool->csize)) { found = true; break; } diff --git a/source/blender/blenlib/intern/sort.c b/source/blender/blenlib/intern/sort.c index 1743a0ba6c8..fdfdf5f67ca 100644 --- a/source/blender/blenlib/intern/sort.c +++ b/source/blender/blenlib/intern/sort.c @@ -55,12 +55,12 @@ BLI_INLINE void swapfunc(char *, char *, int, int); #define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; -BLI_INLINE void swapfunc(char* a, char* b, int n, int swaptype) +BLI_INLINE void swapfunc(char *a, char *b, int n, int swaptype) { - if(swaptype <= 1) + if (swaptype <= 1) swapcode(long, a, b, n) else - swapcode(char, a, b, n) + swapcode(char, a, b, n) } #define swap(a, b) \ @@ -90,11 +90,14 @@ loop: SWAPINIT(a, es); swap_cnt = 0; if (n < 7) { - for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) + for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) { for (pl = pm; - pl > (char *)a && CMP(thunk, pl - es, pl) > 0; - pl -= es) + pl > (char *)a && CMP(thunk, pl - es, pl) > 0; + pl -= es) + { swap(pl, pl - es); + } + } return; } pm = (char *)a + (n / 2) * es; @@ -138,11 +141,14 @@ loop: pc -= es; } if (swap_cnt == 0) { /* Switch to insertion sort */ - for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) + for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) { for (pl = pm; - pl > (char *)a && CMP(thunk, pl - es, pl) > 0; - pl -= es) + pl > (char *)a && CMP(thunk, pl - es, pl) > 0; + pl -= es) + { swap(pl, pl - es); + } + } return; } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 3e82e8da40e..451c38ded2d 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1147,9 +1147,10 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) uiBlockSetEmboss(block, UI_EMBOSSN); uiItemR(row, &ptr, "show_expanded", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); uiBlockSetEmboss(block, UI_EMBOSS); - + /* name */ - uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco + 0.5f*UI_UNIT_X, yco, 5 * UI_UNIT_X, 0.9f*UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, ""); + uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, + xco + 0.5f * UI_UNIT_X, yco, 5 * UI_UNIT_X, 0.9f * UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, ""); if (con->flag & CONSTRAINT_DISABLE) uiLayoutSetRedAlert(row, TRUE); |