diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-29 19:43:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-29 19:43:54 +0400 |
commit | eb69d1c1ae0e088d86b25c46f9a99d4c08c7ede1 (patch) | |
tree | e6919338ec3c6d8ace44a71ec119bf860294c29d /source/blender | |
parent | 76288fad8cb09567f31804536ba687997898b3e5 (diff) |
style cleanup: also quiet harmless compiler warning.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/mask_rasterize.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_walkers_impl.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_smooth_laplacian.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_logic/space_logic.c | 8 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_array.c | 10 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_mask.c | 2 |
9 files changed, 23 insertions, 19 deletions
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c index 3561d5db9c0..086ecadc8de 100644 --- a/source/blender/blenkernel/intern/mask_rasterize.c +++ b/source/blender/blenkernel/intern/mask_rasterize.c @@ -104,7 +104,7 @@ /* for debugging add... */ #ifndef NDEBUG -/* printf("%u %u %u %u\n", _t[0], _t[1], _t[2], _t[3]); \ */ +/* printf("%u %u %u %u\n", _t[0], _t[1], _t[2], _t[3]); \ */ # define FACE_ASSERT(face, vert_max) \ { \ unsigned int *_t = face; \ diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index 015052e685d..2413f3a7be0 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -1026,7 +1026,7 @@ static void bmo_flag_layer_alloc(BMesh *bm) int i; BMIter iter; - BLI_mempool *oldpool = bm->toolflagpool; /* old flag pool */ + BLI_mempool *oldpool = bm->toolflagpool; /* old flag pool */ BLI_mempool *newpool; void *oldflags; diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c index bb1e599f097..bb013e6428e 100644 --- a/source/blender/bmesh/intern/bmesh_walkers_impl.c +++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c @@ -598,7 +598,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker) } } } - else { /* WIRE EDGE */ + else { /* WIRE EDGE */ BMIter eiter; /* match trunk: mark all connected wire edges */ diff --git a/source/blender/bmesh/operators/bmo_smooth_laplacian.c b/source/blender/bmesh/operators/bmo_smooth_laplacian.c index 9a2a9c022e6..519a8184768 100644 --- a/source/blender/bmesh/operators/bmo_smooth_laplacian.c +++ b/source/blender/bmesh/operators/bmo_smooth_laplacian.c @@ -107,12 +107,12 @@ static void delete_laplacian_system(LaplacianSystem * sys) static void memset_laplacian_system(LaplacianSystem *sys, int val) { - memset(sys->eweights , val, sizeof(float) * sys->numEdges); - memset(sys->fweights , val, sizeof(float) * sys->numFaces * 3); - memset(sys->ring_areas , val, sizeof(float) * sys->numVerts); - memset(sys->vlengths , val, sizeof(float) * sys->numVerts); - memset(sys->vweights , val, sizeof(float) * sys->numVerts); - memset(sys->zerola , val, sizeof(short) * sys->numVerts); + memset(sys->eweights, val, sizeof(float) * sys->numEdges); + memset(sys->fweights, val, sizeof(float) * sys->numFaces * 3); + memset(sys->ring_areas, val, sizeof(float) * sys->numVerts); + memset(sys->vlengths, val, sizeof(float) * sys->numVerts); + memset(sys->vweights, val, sizeof(float) * sys->numVerts); + memset(sys->zerola, val, sizeof(short) * sys->numVerts); } static LaplacianSystem * init_laplacian_system( int a_numEdges, int a_numFaces, int a_numVerts) diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c index c4ec801d6ed..f965969504c 100644 --- a/source/blender/editors/space_logic/space_logic.c +++ b/source/blender/editors/space_logic/space_logic.c @@ -93,10 +93,10 @@ static SpaceLink *logic_new(const bContext *UNUSED(C)) slogic->spacetype= SPACE_LOGIC; /* default options */ - slogic->scaflag = (BUTS_SENS_SEL|BUTS_SENS_ACT|BUTS_SENS_LINK) | - (BUTS_CONT_SEL|BUTS_CONT_ACT|BUTS_CONT_LINK) | - (BUTS_ACT_SEL|BUTS_ACT_ACT|BUTS_ACT_LINK) | - (BUTS_SENS_STATE|BUTS_ACT_STATE); + slogic->scaflag = ((BUTS_SENS_SEL|BUTS_SENS_ACT|BUTS_SENS_LINK) | + (BUTS_CONT_SEL|BUTS_CONT_ACT|BUTS_CONT_LINK) | + (BUTS_ACT_SEL|BUTS_ACT_ACT|BUTS_ACT_LINK) | + (BUTS_SENS_STATE|BUTS_ACT_STATE)); /* header */ diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index f550cb05a8b..55663a28844 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1712,7 +1712,7 @@ void calculatePropRatio(TransInfo *t) /* * The elements are sorted according to their dist member in the array, * that means we can stop when it finds one element outside of the propsize. - * do not set td->flag |= TD_NOACTION , the prop circle is being changed. + * do not set 'td->flag |= TD_NOACTION', the prop circle is being changed. */ td->factor = 0.0f; diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 55e7064390d..1fc8e73bb69 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -558,7 +558,7 @@ static void rna_def_gpencil_layers_api(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "new", "rna_GPencil_layer_new"); RNA_def_function_ui_description(func, "Add a new grease pencil layer"); - parm = RNA_def_string(func, "name", "GPencilLayer", MAX_NAME, "Name", "Name of the layer"); + parm = RNA_def_string(func, "name", "GPencilLayer", MAX_NAME, "Name", "Name of the layer"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_boolean(func, "set_active", 0, "Set Active", "Set the newly created layer to the active layer"); parm = RNA_def_pointer(func, "layer", "GPencilLayer", "", "The newly created layer"); diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 7b699e5633c..b9dd37ac50c 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -314,7 +314,8 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BMesh *bm = DM_to_bmesh(dm); BMOperator first_dupe_op, dupe_op, old_dupe_op, weld_op; BMVert **first_geom = NULL; - int i, j, indexLen; + int i, j; + int index_len = -1; /* initialize to an invalid value */ /* offset matrix */ float offset[4][4]; float final_offset[4][4]; @@ -452,12 +453,15 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, /*calculate merge mapping*/ if (j == 0) { indexMap = find_doubles_index_map(bm, &dupe_op, - amd, &indexLen); + amd, &index_len); } #define _E(s, i) ((BMVert **)(s)->data.buf)[i] - for (i = 0; i < indexLen; i++) { + /* ensure this is set */ + BLI_assert(index_len != -1); + + for (i = 0; i < index_len; i++) { if (!indexMap[i]) continue; /* merge v (from 'newout') into v2 (from old 'geom') */ diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c index f845f1d9dc7..23ce8cdeb21 100644 --- a/source/blender/modifiers/intern/MOD_mask.c +++ b/source/blender/modifiers/intern/MOD_mask.c @@ -179,7 +179,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } /* verthash gives mapping from original vertex indices to the new indices (including selected matches only) - * key=oldindex, value=newindex + * key = oldindex, value = newindex */ vertHash = BLI_ghash_int_new("mask vert gh"); |