style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Mon, 31 Dec 2012 02:37:28 +0000 (02:37 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 31 Dec 2012 02:37:28 +0000 (02:37 +0000)
source/blender/blenkernel/BKE_pbvh.h
source/blender/blenkernel/intern/pbvh_bmesh.c
source/blender/bmesh/intern/bmesh_log.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_info/info_stats.c
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_sculpt_paint.c

index 7e34d3a115df6ad1825209c810f6dbe7a2e4065c..63a6100660636ce9dd776732b96591cc3e9a5b38 100644 (file)
@@ -69,7 +69,7 @@ void BKE_pbvh_build_grids(PBVH *bvh, struct CCGElem **grid_elems,
                           struct CCGKey *key, void **gridfaces, struct DMFlagMat *flagmats,
                           unsigned int **grid_hidden);
 void BKE_pbvh_build_bmesh(PBVH *bvh, struct BMesh *bm, int smooth_shading,
-                                                 struct BMLog *log);
+                          struct BMLog *log);
 
 void BKE_pbvh_free(PBVH *bvh);
 
index 30a032229b753647d2f550dbebb0c6c56560e80a..5db79a61e39e2b2a4e180570a01012264ea3ba93 100644 (file)
@@ -252,7 +252,7 @@ static int pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index)
 
        pbvh_bmesh_node_split(bvh, prim_bbc, node_index);
 
-       BLI_ghash_free(prim_bbc, NULL, (void*)MEM_freeN);
+       BLI_ghash_free(prim_bbc, NULL, (void *)MEM_freeN);
 
        return TRUE;
 }
@@ -909,9 +909,11 @@ static int pbvh_bmesh_collapse_short_edges(PBVH *bvh, EdgeQueue *q,
 
                /* Check that the vertices/edge still exist */
                if (BLI_ghash_haskey(deleted_verts, v1) ||
-                       BLI_ghash_haskey(deleted_verts, v2) ||
-                       !(e = BM_edge_exists(v1, v2)))
+                   BLI_ghash_haskey(deleted_verts, v2) ||
+                   !(e = BM_edge_exists(v1, v2)))
+               {
                        continue;
+               }
 
                /* Check that the edge's vertices are still in the PBVH. It's
                 * possible that an edge collapse has deleted adjacent faces
@@ -1153,7 +1155,7 @@ void BKE_pbvh_bmesh_after_stroke(PBVH *bvh)
 void BKE_pbvh_bmesh_detail_size_set(PBVH *bvh, float detail_size)
 {
        bvh->bm_max_edge_len = detail_size;
-       bvh->bm_min_edge_len = bvh->bm_max_edge_len * 0.4;
+       bvh->bm_min_edge_len = bvh->bm_max_edge_len * 0.4f;
 }
 
 void BKE_pbvh_node_mark_topology_update(PBVHNode *node)
index 1e94e81e6d743b9c3e3c0f8a068f4d4695e9e970..b821c9875dbc939747b6592fc53937b9c8a81019 100644 (file)
@@ -540,7 +540,7 @@ void BM_log_mesh_elems_reorder(BMesh *bm, BMLog *log)
                const unsigned id = bm_log_vert_id_get(log, v);
                const void *key = SET_INT_IN_POINTER(id);
                const void *val = BLI_ghash_lookup(id_to_idx, key);
-               ((int*)varr)[i++] = GET_INT_FROM_POINTER(val);
+               ((int *)varr)[i++] = GET_INT_FROM_POINTER(val);
        }
        BLI_ghash_free(id_to_idx, NULL, NULL);
 
@@ -551,7 +551,7 @@ void BM_log_mesh_elems_reorder(BMesh *bm, BMLog *log)
                const unsigned id = bm_log_face_id_get(log, f);
                const void *key = SET_INT_IN_POINTER(id);
                const void *val = BLI_ghash_lookup(id_to_idx, key);
-               ((int*)farr)[i++] = GET_INT_FROM_POINTER(val);
+               ((int *)farr)[i++] = GET_INT_FROM_POINTER(val);
        }
        BLI_ghash_free(id_to_idx, NULL, NULL);
 
index e0c8b39ece992edb995ca744c14e98b998f36e9c..098d8e5006fb443380d5761a629e124486250179 100644 (file)
@@ -2966,7 +2966,7 @@ static void sculpt_topology_update(Sculpt *sd, Object *ob, Brush *brush)
        data.ss = ss;
        data.sd = sd;
 
-       radius = ss->cache->radius * 1.25;
+       radius = ss->cache->radius * 1.25f;
 
        data.radius_squared = radius * radius;
        data.original = ELEM4(brush->sculpt_tool,
index 490d08284d2bf981af8a048732e15cbd88de0541..3f73fc2605a458cebcba8f72fd7e02825158b622 100644 (file)
@@ -315,7 +315,7 @@ static void stats_dupli_object(Base *base, Object *ob, SceneStats *stats)
 static int stats_is_object_dynamic_topology_sculpt(Object *ob)
 {
        return (ob && (ob->mode & OB_MODE_SCULPT) &&
-                       ob->sculpt && ob->sculpt->bm);
+               ob->sculpt && ob->sculpt->bm);
 }
 
 /* Statistics displayed in info header. Called regularly on scene changes. */
index 6dcc74d74e7a2a1fa2ab3cae80f625a6c54029d5..fad539de28478d1a85c1d5e8ea7c01e5bb059909 100644 (file)
@@ -1487,11 +1487,11 @@ typedef enum SculptFlags {
        SCULPT_SHOW_DIFFUSE = (1<<9),
 
        /* If set, the mesh will be drawn with smooth-shading in
-          dynamic-topology mode */
+        * dynamic-topology mode */
        SCULPT_DYNTOPO_SMOOTH_SHADING = (1<<10),
 
        /* If set, dynamic-topology brushes will collapse short edges in
-          addition to subdividing long ones */
+        * addition to subdividing long ones */
        SCULPT_DYNTOPO_COLLAPSE = (1<<11)
 } SculptFlags;
 
index 6e81e866118dd69b0f5bda8e81ebb85e408d4491..80d74c3a9fe7cd7c6e229bf12d4ce77c6ee4aa18 100644 (file)
@@ -1439,7 +1439,7 @@ int rna_DupliObject_index_get(PointerRNA *ptr)
 
 int rna_Object_use_dynamic_topology_sculpting_get(PointerRNA *ptr)
 {
-       SculptSession *ss = ((Object*)ptr->id.data)->sculpt;
+       SculptSession *ss = ((Object *)ptr->id.data)->sculpt;
        return (ss && ss->bm);
 }
 
index fb4295ddb538bcaa282087606867fc974bfe1057..17edf2944aabd787d8589d409d87d6e5df874d73 100644 (file)
@@ -347,15 +347,15 @@ static void rna_def_sculpt(BlenderRNA  *brna)
        prop = RNA_def_property(srna, "use_smooth_shading", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_DYNTOPO_SMOOTH_SHADING);
        RNA_def_property_ui_text(prop, "Smooth Shading",
-                                                        "Show faces in dynamic-topology mode with smooth "
-                                                        "shading rather than flat shaded");
+                                "Show faces in dynamic-topology mode with smooth "
+                                "shading rather than flat shaded");
        RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Sculpt_update");
 
        prop = RNA_def_property(srna, "use_edge_collapse", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_DYNTOPO_COLLAPSE);
        RNA_def_property_ui_text(prop, "Collapse Short Edges",
-                                                        "In dynamic-topology mode, collapse short edges "
-                                                        "in addition to subdividing long ones");
+                                "In dynamic-topology mode, collapse short edges "
+                                "in addition to subdividing long ones");
 
        prop = RNA_def_property(srna, "symmetrize_direction", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_items(prop, symmetrize_direction_items);