[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50163] trunk/blender/source/blender: style cleanup: indentation, also quiet double promotion warnings for despeckle node.

Campbell Barton ideasman42 at gmail.com
Thu Aug 23 18:17:47 CEST 2012


Revision: 50163
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50163
Author:   campbellbarton
Date:     2012-08-23 16:17:47 +0000 (Thu, 23 Aug 2012)
Log Message:
-----------
style cleanup: indentation, also quiet double promotion warnings for despeckle node.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/node.c
    trunk/blender/source/blender/blenkernel/intern/subsurf_ccg.c
    trunk/blender/source/blender/compositor/operations/COM_DespeckleOperation.cpp
    trunk/blender/source/blender/editors/space_view3d/drawobject.c
    trunk/blender/source/blender/imbuf/intern/indexer.c
    trunk/blender/source/blender/imbuf/intern/scaling.c
    trunk/blender/source/blender/modifiers/intern/MOD_boolean.c
    trunk/blender/source/blender/modifiers/intern/MOD_cast.c
    trunk/blender/source/blender/modifiers/intern/MOD_displace.c
    trunk/blender/source/blender/modifiers/intern/MOD_fluidsim.c
    trunk/blender/source/blender/modifiers/intern/MOD_lattice.c
    trunk/blender/source/blender/modifiers/intern/MOD_meshdeform.c
    trunk/blender/source/blender/modifiers/intern/MOD_particlesystem.c

Modified: trunk/blender/source/blender/blenkernel/intern/node.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/node.c	2012-08-23 16:15:37 UTC (rev 50162)
+++ trunk/blender/source/blender/blenkernel/intern/node.c	2012-08-23 16:17:47 UTC (rev 50163)
@@ -1487,10 +1487,10 @@
  * referene other pointers which need validation.
  */
 typedef struct bNodeClipboardExtraInfo {
-    struct bNodeClipboardExtraInfo *next, *prev;
+	struct bNodeClipboardExtraInfo *next, *prev;
 	ID  *id;
-    char id_name[MAX_ID_NAME];
-    char library_name[FILE_MAX];
+	char id_name[MAX_ID_NAME];
+	char library_name[FILE_MAX];
 } bNodeClipboardExtraInfo;
 #endif  /* USE_NODE_CB_VALIDATE */
 
@@ -1499,7 +1499,7 @@
 	ListBase nodes;
 
 #ifdef USE_NODE_CB_VALIDATE
-    ListBase nodes_extra_info;
+	ListBase nodes_extra_info;
 #endif
 
 	ListBase links;
@@ -1531,7 +1531,7 @@
 	node_clipboard.nodes.first = node_clipboard.nodes.last = NULL;
 
 #ifdef USE_NODE_CB_VALIDATE
-    BLI_freelistN(&node_clipboard.nodes_extra_info);
+	BLI_freelistN(&node_clipboard.nodes_extra_info);
 #endif
 }
 
@@ -1582,28 +1582,28 @@
 void BKE_node_clipboard_add_node(bNode *node)
 {
 #ifdef USE_NODE_CB_VALIDATE
-    /* add extra info */
-    bNodeClipboardExtraInfo *node_info = MEM_mallocN(sizeof(bNodeClipboardExtraInfo), STRINGIFY(bNodeClipboardExtraInfo));
+	/* add extra info */
+	bNodeClipboardExtraInfo *node_info = MEM_mallocN(sizeof(bNodeClipboardExtraInfo), STRINGIFY(bNodeClipboardExtraInfo));
 
 	node_info->id = node->id;
-    if (node->id) {
-        BLI_strncpy(node_info->id_name, node->id->name, sizeof(node_info->id_name));
-        if (node->id->lib) {
-            BLI_strncpy(node_info->library_name, node->id->lib->filepath, sizeof(node_info->library_name));
-        }
-        else {
-            node_info->library_name[0] = '\0';
-        }
-    }
-    else {
-        node_info->id_name[0] = '\0';
-        node_info->library_name[0] = '\0';
-    }
-    BLI_addtail(&node_clipboard.nodes_extra_info, node_info);
+	if (node->id) {
+		BLI_strncpy(node_info->id_name, node->id->name, sizeof(node_info->id_name));
+		if (node->id->lib) {
+			BLI_strncpy(node_info->library_name, node->id->lib->filepath, sizeof(node_info->library_name));
+		}
+		else {
+			node_info->library_name[0] = '\0';
+		}
+	}
+	else {
+		node_info->id_name[0] = '\0';
+		node_info->library_name[0] = '\0';
+	}
+	BLI_addtail(&node_clipboard.nodes_extra_info, node_info);
 	/* end extra info */
 #endif  /* USE_NODE_CB_VALIDATE */
 
-    /* add node */
+	/* add node */
 	BLI_addtail(&node_clipboard.nodes, node);
 
 }

Modified: trunk/blender/source/blender/blenkernel/intern/subsurf_ccg.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/subsurf_ccg.c	2012-08-23 16:15:37 UTC (rev 50162)
+++ trunk/blender/source/blender/blenkernel/intern/subsurf_ccg.c	2012-08-23 16:17:47 UTC (rev 50163)
@@ -1468,9 +1468,9 @@
 }
 
 static void ccgDM_foreachMappedVert(
-    DerivedMesh *dm,
-    void (*func)(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3]),
-    void *userData)
+        DerivedMesh *dm,
+        void (*func)(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3]),
+        void *userData)
 {
 	CCGDerivedMesh *ccgdm = (CCGDerivedMesh *) dm;
 	CCGVertIterator *vi;
@@ -1490,9 +1490,9 @@
 }
 
 static void ccgDM_foreachMappedEdge(
-    DerivedMesh *dm,
-    void (*func)(void *userData, int index, const float v0co[3], const float v1co[3]),
-    void *userData)
+        DerivedMesh *dm,
+        void (*func)(void *userData, int index, const float v0co[3], const float v1co[3]),
+        void *userData)
 {
 	CCGDerivedMesh *ccgdm = (CCGDerivedMesh *) dm;
 	CCGSubSurf *ss = ccgdm->ss;
@@ -2492,9 +2492,9 @@
 }
 
 static void ccgDM_foreachMappedFaceCenter(
-    DerivedMesh *dm,
-    void (*func)(void *userData, int index, const float co[3], const float no[3]),
-    void *userData)
+        DerivedMesh *dm,
+        void (*func)(void *userData, int index, const float co[3], const float no[3]),
+        void *userData)
 {
 	CCGDerivedMesh *ccgdm = (CCGDerivedMesh *) dm;
 	CCGSubSurf *ss = ccgdm->ss;

Modified: trunk/blender/source/blender/compositor/operations/COM_DespeckleOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_DespeckleOperation.cpp	2012-08-23 16:15:37 UTC (rev 50162)
+++ trunk/blender/source/blender/compositor/operations/COM_DespeckleOperation.cpp	2012-08-23 16:17:47 UTC (rev 50163)
@@ -78,8 +78,8 @@
 
 	this->m_inputOperation->read(color_org, x2, y2, NULL);
 
-#define TOT_DIV_ONE 1.0
-#define TOT_DIV_CNR M_SQRT1_2
+#define TOT_DIV_ONE 1.0f
+#define TOT_DIV_CNR (float)M_SQRT1_2
 
 #define	WTOT (TOT_DIV_ONE * 4 + TOT_DIV_CNR * 4)
 
@@ -110,7 +110,7 @@
 	this->m_inputOperation->read(in1, x2, y3, NULL); COLOR_ADD(TOT_DIV_ONE)
 	this->m_inputOperation->read(in1, x3, y3, NULL); COLOR_ADD(TOT_DIV_CNR)
 
-	mul_v4_fl(color_mid, 1.0f / (4.0f + (4.0f * M_SQRT1_2)));
+	mul_v4_fl(color_mid, 1.0f / (4.0f + (4.0f * (float)M_SQRT1_2)));
 	//mul_v4_fl(color_mid, 1.0f / w);
 
 	if ((w != 0.0f) &&

Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c	2012-08-23 16:15:37 UTC (rev 50162)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c	2012-08-23 16:17:47 UTC (rev 50163)
@@ -2256,9 +2256,9 @@
 }
 
 void nurbs_foreachScreenVert(
-    ViewContext *vc,
-    void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y),
-    void *userData)
+        ViewContext *vc,
+        void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y),
+        void *userData)
 {
 	Curve *cu = vc->obedit->data;
 	short s[2] = {IS_CLIPPED, 0};

Modified: trunk/blender/source/blender/imbuf/intern/indexer.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/indexer.c	2012-08-23 16:15:37 UTC (rev 50162)
+++ trunk/blender/source/blender/imbuf/intern/indexer.c	2012-08-23 16:17:47 UTC (rev 50163)
@@ -221,7 +221,7 @@
 }
 
 unsigned long long IMB_indexer_get_seek_pos(
-    struct anim_index *idx, int frame_index)
+        struct anim_index *idx, int frame_index)
 {
 	if (frame_index < 0) {
 		frame_index = 0;
@@ -233,7 +233,7 @@
 }
 
 unsigned long long IMB_indexer_get_seek_pos_dts(
-    struct anim_index *idx, int frame_index)
+        struct anim_index *idx, int frame_index)
 {
 	if (frame_index < 0) {
 		frame_index = 0;
@@ -581,7 +581,7 @@
 }
 
 static int add_to_proxy_output_ffmpeg(
-    struct proxy_output_ctx *ctx, AVFrame *frame)
+        struct proxy_output_ctx *ctx, AVFrame *frame)
 {
 	int outsize = 0;
 

Modified: trunk/blender/source/blender/imbuf/intern/scaling.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/scaling.c	2012-08-23 16:15:37 UTC (rev 50162)
+++ trunk/blender/source/blender/imbuf/intern/scaling.c	2012-08-23 16:17:47 UTC (rev 50163)
@@ -294,7 +294,7 @@
 /* result in ibuf2, scaling should be done correctly */
 void imb_onehalf_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1)
 {
-    int x, y;
+	int x, y;
 	const short do_rect = (ibuf1->rect != NULL);
 	const short do_float = (ibuf1->rect_float != NULL) && (ibuf2->rect_float != NULL);
 

Modified: trunk/blender/source/blender/modifiers/intern/MOD_boolean.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_boolean.c	2012-08-23 16:15:37 UTC (rev 50162)
+++ trunk/blender/source/blender/modifiers/intern/MOD_boolean.c	2012-08-23 16:17:47 UTC (rev 50163)
@@ -67,9 +67,9 @@
 }
 
 static void foreachObjectLink(
-    ModifierData *md, Object *ob,
-    void (*walk)(void *userData, Object *ob, Object **obpoin),
-    void *userData)
+        ModifierData *md, Object *ob,
+        void (*walk)(void *userData, Object *ob, Object **obpoin),
+        void *userData)
 {
 	BooleanModifierData *bmd = (BooleanModifierData *) md;
 

Modified: trunk/blender/source/blender/modifiers/intern/MOD_cast.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_cast.c	2012-08-23 16:15:37 UTC (rev 50162)
+++ trunk/blender/source/blender/modifiers/intern/MOD_cast.c	2012-08-23 16:17:47 UTC (rev 50163)
@@ -127,8 +127,8 @@
 }
 
 static void sphere_do(
-    CastModifierData *cmd, Object *ob, DerivedMesh *dm,
-    float (*vertexCos)[3], int numVerts)
+        CastModifierData *cmd, Object *ob, DerivedMesh *dm,
+        float (*vertexCos)[3], int numVerts)
 {
 	MDeformVert *dvert = NULL;
 
@@ -299,8 +299,8 @@
 }
 
 static void cuboid_do(
-    CastModifierData *cmd, Object *ob, DerivedMesh *dm,
-    float (*vertexCos)[3], int numVerts)
+        CastModifierData *cmd, Object *ob, DerivedMesh *dm,
+        float (*vertexCos)[3], int numVerts)
 {
 	MDeformVert *dvert = NULL;
 	Object *ctrl_ob = NULL;
@@ -600,8 +600,8 @@
 }
 
 static void deformVertsEM(
-    ModifierData *md, Object *ob, struct BMEditMesh *editData,
-    DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+        ModifierData *md, Object *ob, struct BMEditMesh *editData,
+        DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
 {
 	DerivedMesh *dm = get_dm(ob, editData, derivedData, NULL, 0);
 	CastModifierData *cmd = (CastModifierData *)md;

Modified: trunk/blender/source/blender/modifiers/intern/MOD_displace.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_displace.c	2012-08-23 16:15:37 UTC (rev 50162)
+++ trunk/blender/source/blender/modifiers/intern/MOD_displace.c	2012-08-23 16:17:47 UTC (rev 50163)
@@ -166,8 +166,8 @@
 
 /* dm must be a CDDerivedMesh */
 static void displaceModifier_do(
-    DisplaceModifierData *dmd, Object *ob,
-    DerivedMesh *dm, float (*vertexCos)[3], int numVerts)
+        DisplaceModifierData *dmd, Object *ob,
+        DerivedMesh *dm, float (*vertexCos)[3], int numVerts)
 {
 	int i;
 	MVert *mvert;

Modified: trunk/blender/source/blender/modifiers/intern/MOD_fluidsim.c
===================================================================

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list