From 5aaf3ede76c91a062d09360301083b6f75a6a89f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Apr 2012 00:15:02 +0000 Subject: code cleanup: remove unused var for windows and style edit (remove spaces between 'var[num]') --- source/blender/blenkernel/BKE_cloth.h | 12 ++++----- source/blender/blenkernel/intern/cloth.c | 6 ++--- source/blender/blenlib/intern/BLI_kdopbvh.c | 10 ++++---- source/blender/blenlib/intern/fileops.c | 29 +++++++++++----------- source/gameengine/Converter/BL_ArmatureChannel.cpp | 4 +-- source/gameengine/Ketsji/KX_Dome.h | 2 +- 6 files changed, 31 insertions(+), 32 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 435832f8c87..623dbd9c7ac 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -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 */ diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 0dd7687f998..7dedd71b2e0 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -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; diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index cc05a8a2628..d43f8ae735b 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -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; diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 90ced266e7f..576af23ed1b 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -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; } diff --git a/source/gameengine/Converter/BL_ArmatureChannel.cpp b/source/gameengine/Converter/BL_ArmatureChannel.cpp index 80a9db4db83..f464d6c4b59 100644 --- a/source/gameengine/Converter/BL_ArmatureChannel.cpp +++ b/source/gameengine/Converter/BL_ArmatureChannel.cpp @@ -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; } } diff --git a/source/gameengine/Ketsji/KX_Dome.h b/source/gameengine/Ketsji/KX_Dome.h index 921e55806dd..313d6fd1535 100644 --- a/source/gameengine/Ketsji/KX_Dome.h +++ b/source/gameengine/Ketsji/KX_Dome.h @@ -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; -- cgit v1.2.3