code cleanup: remove unused var for windows and style edit (remove spaces between...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 12 Apr 2012 00:15:02 +0000 (00:15 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 12 Apr 2012 00:15:02 +0000 (00:15 +0000)
source/blender/blenkernel/BKE_cloth.h
source/blender/blenkernel/intern/cloth.c
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/fileops.c
source/gameengine/Converter/BL_ArmatureChannel.cpp
source/gameengine/Ketsji/KX_Dome.h

index 435832f8c87fe1ac06d0269795ad836a925e74de..623dbd9c7accbf5ac33591fe29fee52743b792ab 100644 (file)
@@ -94,12 +94,12 @@ typedef struct Cloth
 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                        */
index 0dd7687f998c390262b60bcaf3ea31d7eddc4d57..7dedd71b2e04a6c3d5fc68d4a6832013e5506d29 100644 (file)
@@ -114,9 +114,9 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm );
 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;
index cc05a8a2628b9404b47a20b481a571fcedd7a908..d43f8ae735bdf2d0f1893de0d10724cc6ac654b1 100644 (file)
@@ -599,13 +599,13 @@ static void verify_tree(BVHTree *tree)
 //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;
 
index 90ced266e7f210ec568e5a8dc5d7cab72be976fb..576af23ed1b4771abc61b074df3cb4af211fa9ab 100644 (file)
@@ -202,7 +202,7 @@ int BLI_file_touch(const char *file)
 
 #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 @@ FILE *BLI_fopen(const char *filename, const char *mode)
 gzFile BLI_gzopen(const char *filename, const char *mode)
 {
        gzFile gzfile;
-       int fi;
 
-       if (!filename || !mode) {return 0;}
-       else
-
-       {
-                       
-               wchar_t short_name_16 [256];
-               char short_name [256];
-               int i=0;
+       if (!filename || !mode) {
+               return 0;
+       }
+       else {
+               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);
-
-               for (i=0;i<256;i++) {short_name[i]=short_name_16[i];};
+               GetShortPathNameW(filename_16,short_name_16, 256);
 
+               for (i = 0; i < 256; i++) {
+                       short_name[i] = short_name_16[i];
+               }
 
                gzfile = gzopen(short_name,mode);
 
                UTF16_UN_ENCODE(filename);
-
        }
+
        return gzfile;
 }
 
index 80a9db4db83b8a1ddd816294f5578def8a389037..f464d6c4b597df55ba435c732feada55a80b03eb 100644 (file)
@@ -307,7 +307,7 @@ int BL_ArmatureChannel::py_attr_set_joint_rotation(void *self_v, const struct KX
        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 @@ int BL_ArmatureChannel::py_attr_set_joint_rotation(void *self_v, const struct KX
                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;
                }
        }
index 921e55806dd2b2634fb6040e65a04c8d83c02023..313d6fd1535d90e8c37469f5a58c26619ed67339 100644 (file)
@@ -174,7 +174,7 @@ protected:
 
        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;