[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45551] trunk/blender/source: code cleanup : remove unused var for windows and style edit (remove spaces between 'var[ num]')

Campbell Barton ideasman42 at gmail.com
Thu Apr 12 02:15:03 CEST 2012


Revision: 45551
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45551
Author:   campbellbarton
Date:     2012-04-12 00:15:02 +0000 (Thu, 12 Apr 2012)
Log Message:
-----------
code cleanup: remove unused var for windows and style edit (remove spaces between 'var[num]')

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/BKE_cloth.h
    trunk/blender/source/blender/blenkernel/intern/cloth.c
    trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c
    trunk/blender/source/blender/blenlib/intern/fileops.c
    trunk/blender/source/gameengine/Converter/BL_ArmatureChannel.cpp
    trunk/blender/source/gameengine/Ketsji/KX_Dome.h

Modified: trunk/blender/source/blender/blenkernel/BKE_cloth.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_cloth.h	2012-04-11 23:23:39 UTC (rev 45550)
+++ trunk/blender/source/blender/blenkernel/BKE_cloth.h	2012-04-12 00:15:02 UTC (rev 45551)
@@ -94,12 +94,12 @@
 typedef struct ClothVertex
 {
 	int	flags;		/* General flags per vertex.		*/
-	float	v [3];		/* The velocity of the point.		*/
-	float	xconst [3];	/* constrained position			*/
-	float	x [3];		/* The current position of this vertex.	*/
-	float 	xold [3];	/* The previous position of this vertex.*/
-	float	tx [3];		/* temporary position */
-	float 	txold [3];	/* temporary old position */
+	float	v[3];		/* The velocity of the point.		*/
+	float	xconst[3];	/* constrained position			*/
+	float	x[3];		/* The current position of this vertex.	*/
+	float 	xold[3];	/* The previous position of this vertex.*/
+	float	tx[3];		/* temporary position */
+	float 	txold[3];	/* temporary old position */
 	float 	tv[3];		/* temporary "velocity", mostly used as tv = tx-txold */
 	float 	mass;		/* mass / weight of the vertex		*/
 	float 	goal;		/* goal, from SB			*/

Modified: trunk/blender/source/blender/blenkernel/intern/cloth.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/cloth.c	2012-04-11 23:23:39 UTC (rev 45550)
+++ trunk/blender/source/blender/blenkernel/intern/cloth.c	2012-04-12 00:15:02 UTC (rev 45551)
@@ -114,9 +114,9 @@
 void cloth_init ( ClothModifierData *clmd )
 {	
 	/* Initialize our new data structure to reasonable values. */
-	clmd->sim_parms->gravity [0] = 0.0;
-	clmd->sim_parms->gravity [1] = 0.0;
-	clmd->sim_parms->gravity [2] = -9.81;
+	clmd->sim_parms->gravity[0] = 0.0;
+	clmd->sim_parms->gravity[1] = 0.0;
+	clmd->sim_parms->gravity[2] = -9.81;
 	clmd->sim_parms->structural = 15.0;
 	clmd->sim_parms->shear = 15.0;
 	clmd->sim_parms->bending = 0.5;

Modified: trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c	2012-04-11 23:23:39 UTC (rev 45550)
+++ trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c	2012-04-12 00:15:02 UTC (rev 45551)
@@ -599,13 +599,13 @@
 //This code can be easily reduced (basicly this is only method to calculate pow(k, n) in O(1).. and stuff like that)
 typedef struct BVHBuildHelper
 {
-	int tree_type;				//
-	int totleafs;				//
+	int tree_type;				/* */
+	int totleafs;				/* */
 
-	int leafs_per_child  [32];	//Min number of leafs that are archievable from a node at depth N
-	int branches_on_level[32];	//Number of nodes at depth N (tree_type^N)
+	int leafs_per_child[32];	/* Min number of leafs that are archievable from a node at depth N */
+	int branches_on_level[32];	/* Number of nodes at depth N (tree_type^N) */
 
-	int remain_leafs;			//Number of leafs that are placed on the level that is not 100% filled
+	int remain_leafs;			/* Number of leafs that are placed on the level that is not 100% filled */
 
 } BVHBuildHelper;
 

Modified: trunk/blender/source/blender/blenlib/intern/fileops.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/fileops.c	2012-04-11 23:23:39 UTC (rev 45550)
+++ trunk/blender/source/blender/blenlib/intern/fileops.c	2012-04-12 00:15:02 UTC (rev 45551)
@@ -202,7 +202,7 @@
 
 #ifdef WIN32
 
-static char str[MAXPATHLEN+12];
+static char str[MAXPATHLEN + 12];
 
 FILE *BLI_fopen(const char *filename, const char *mode)
 {
@@ -212,33 +212,32 @@
 gzFile BLI_gzopen(const char *filename, const char *mode)
 {
 	gzFile gzfile;
-	int fi;
 
-	if (!filename || !mode) {return 0;}
-	else
+	if (!filename || !mode) {
+		return 0;
+	}
+	else {
+		wchar_t short_name_16[256];
+		char short_name[256];
+		int i = 0;
 
-	{
-			
-		wchar_t short_name_16 [256];
-		char short_name [256];
-		int i=0;
-
 		/* xxx Creates file before transcribing the path */
-		if(mode[0]=='w')
+		if(mode[0] == 'w')
 			fclose(ufopen(filename,"a"));
 
 		UTF16_ENCODE(filename);
 
-		GetShortPathNameW(filename_16,short_name_16,256);
+		GetShortPathNameW(filename_16,short_name_16, 256);
 
-		for (i=0;i<256;i++) {short_name[i]=short_name_16[i];};
+		for (i = 0; i < 256; i++) {
+			short_name[i] = short_name_16[i];
+		}
 
-
 		gzfile = gzopen(short_name,mode);
 
 		UTF16_UN_ENCODE(filename);
-
 	}
+
 	return gzfile;
 }
 

Modified: trunk/blender/source/gameengine/Converter/BL_ArmatureChannel.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ArmatureChannel.cpp	2012-04-11 23:23:39 UTC (rev 45550)
+++ trunk/blender/source/gameengine/Converter/BL_ArmatureChannel.cpp	2012-04-12 00:15:02 UTC (rev 45551)
@@ -307,7 +307,7 @@
 	float quat[4];
 
 	if (!PySequence_Check(value) || PySequence_Size(value) != 3) {
-		PyErr_SetString(PyExc_AttributeError, "expected a sequence of [3] floats");
+		PyErr_SetString(PyExc_AttributeError, "expected a sequence of 3 floats");
 		return PY_SET_ATTR_FAIL;
 	}
 	for (int i=0; i<3; i++) {
@@ -315,7 +315,7 @@
 		joints[i] = PyFloat_AsDouble(item);
 		Py_DECREF(item);
 		if (joints[i] == -1.0f && PyErr_Occurred()) {
-			PyErr_SetString(PyExc_AttributeError, "expected a sequence of [3] floats");
+			PyErr_SetString(PyExc_AttributeError, "expected a sequence of 3 floats");
 			return PY_SET_ATTR_FAIL;
 		}
 	}

Modified: trunk/blender/source/gameengine/Ketsji/KX_Dome.h
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_Dome.h	2012-04-11 23:23:39 UTC (rev 45550)
+++ trunk/blender/source/gameengine/Ketsji/KX_Dome.h	2012-04-12 00:15:02 UTC (rev 45551)
@@ -174,7 +174,7 @@
 
 	MT_Matrix4x4 m_projmat;
 
-	MT_Matrix3x3 m_locRot [6];// the rotation matrix
+	MT_Matrix3x3 m_locRot[6]; // the rotation matrix
 
 	/// rendered scene
 	KX_Scene * m_scene;




More information about the Bf-blender-cvs mailing list