style cleanup: also quiet harmless compiler warning.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 29 Oct 2012 15:43:54 +0000 (15:43 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 29 Oct 2012 15:43:54 +0000 (15:43 +0000)
12 files changed:
CMakeLists.txt
intern/ghost/intern/GHOST_SystemCocoa.mm
source/blender/blenkernel/intern/mask_rasterize.c
source/blender/bmesh/intern/bmesh_operators.c
source/blender/bmesh/intern/bmesh_walkers_impl.c
source/blender/bmesh/operators/bmo_smooth_laplacian.c
source/blender/editors/space_logic/space_logic.c
source/blender/editors/transform/transform_generics.c
source/blender/makesrna/intern/rna_gpencil.c
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_mask.c
source/tests/CMakeLists.txt

index 5a06011246fc747b77ee1493b9cfd5796fbfd913..259805446479455ff68d85acaa329f18cf21eb54 100644 (file)
@@ -186,11 +186,11 @@ unset(PLATFORM_DEFAULT)
 
 
 # Modifiers
-option(WITH_MOD_FLUID          "Enable Elbeem Modifier (Fluid Simulation)" ON)
-option(WITH_MOD_SMOKE          "Enable Smoke Modifier (Smoke Simulation)" ON)
-option(WITH_MOD_BOOLEAN                "Enable Boolean Modifier" ON)
-option(WITH_MOD_REMESH         "Enable Remesh Modifier" ON)
-option(WITH_MOD_CLOTH_ELTOPO           "Enable Experimental cloth solver" OFF)
+option(WITH_MOD_FLUID           "Enable Elbeem Modifier (Fluid Simulation)" ON)
+option(WITH_MOD_SMOKE           "Enable Smoke Modifier (Smoke Simulation)" ON)
+option(WITH_MOD_BOOLEAN         "Enable Boolean Modifier" ON)
+option(WITH_MOD_REMESH          "Enable Remesh Modifier" ON)
+option(WITH_MOD_CLOTH_ELTOPO    "Enable Experimental cloth solver" OFF)
 mark_as_advanced(WITH_MOD_CLOTH_ELTOPO)
 option(WITH_MOD_OCEANSIM        "Enable Ocean Modifier" OFF)
 
index 7c3e2f35ac958bca6bf7e81b399bdbbdadf48363..27720a01a3fec2191f5d49b0937e0c1605c5205a 100644 (file)
@@ -1159,7 +1159,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
                                        NSEnumerator *enumerator;
                                        NSImageRep *representation;
                                        
-                                       ibuf = IMB_allocImBuf (imgSize.width , imgSize.height, 32, IB_rect);
+                                       ibuf = IMB_allocImBuf (imgSize.width, imgSize.height, 32, IB_rect);
                                        if (!ibuf) {
                                                [droppedImg release];
                                                return GHOST_kFailure;
index 3561d5db9c0c23dddcc56dfccd4d5816afff9939..086ecadc8de41c722e83b84b8dc3602422c54f96 100644 (file)
 
 /* 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;                             \
index 015052e685df1d7ae17afd16523043d5733a3c76..2413f3a7be0412c78227bfad47fa40b44b6f3de4 100644 (file)
@@ -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;
 
index bb1e599f09736cadc2fa25aa84d7dac8044e0d78..bb013e6428ebcd7c019971e208616d535b8e6dcb 100644 (file)
@@ -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 */
index 9a2a9c022e681dd3e6a821ebfda8338dec37d40f..519a81847689a896bcc6f0011afeab289814b5ac 100644 (file)
@@ -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) 
index c4ec801d6edb1517bdc111c94caa0e82d7347077..f965969504c5b00b7eb7e5db4ca7f491ed14abab 100644 (file)
@@ -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 */
index f550cb05a8b41ab60f5c400fe9c738b2cb35e94e..55663a288446d63af3a7cfacdd114685b33f85d5 100644 (file)
@@ -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;
index 55e7064390dedad41ccf3f03b1fd27f45c6e6034..1fc8e73bb6961064d9a33f37e5070d3162955f2f 100644 (file)
@@ -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");
index 7b699e5633c2349e350764fda8342e1212eb4218..b9dd37ac50c5f4fd8e8ff9e72054399658c9863d 100644 (file)
@@ -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') */
index f845f1d9dc7c71b539eebcb0bc2f155ef0a6756e..23ce8cdeb210b05d982dff10dcef109276d6fc47 100644 (file)
@@ -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");
                
index 2bad58699a8ea084d1947b5bc01d662366d8e986..070d9adeb34946317a1c76af64781862e2ad1dba 100644 (file)
@@ -29,9 +29,9 @@ set(TEST_OUT_DIR ${CMAKE_BINARY_DIR}/tests)
 # ugh, any better way to do this on testing only?
 execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_OUT_DIR}) 
 
-#~ if(NOT IS_DIRECTORY ${TEST_SRC_DIR})
-#~     message(FATAL_ERROR "CMake test directory not found!")
-#~ endif()
+#~     if(NOT IS_DIRECTORY ${TEST_SRC_DIR})
+#~             message(FATAL_ERROR "CMake test directory not found!")
+#~     endif()
 
 # all calls to blender use this
 if(APPLE)