From d5032657edd365ded8b98500536ecdbe1b54df5a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 6 Jun 2012 22:38:39 +0000 Subject: style cleanup --- source/blender/blenkernel/BKE_cloth.h | 27 ++++++++-------------- source/blender/blenkernel/BKE_collision.h | 3 +-- source/blender/blenkernel/BKE_node.h | 3 +-- source/blender/blenkernel/BKE_sketch.h | 6 ++--- source/blender/blenkernel/intern/implicit.c | 3 +-- source/blender/blenkernel/intern/particle_system.c | 10 ++++---- source/blender/blenkernel/intern/seqcache.c | 3 +-- source/blender/bmesh/intern/bmesh_marking.h | 5 ++-- .../editors/armature/editarmature_retarget.c | 9 +++----- source/blender/editors/include/ED_transform.h | 3 +-- source/blender/editors/space_file/filelist.c | 6 ++--- source/blender/editors/space_file/filelist.h | 3 +-- source/blender/editors/space_node/node_intern.h | 3 +-- .../editors/transform/transform_conversions.c | 2 +- source/blender/editors/transform/transform_ops.c | 3 +-- .../blender/gpu/shaders/gpu_shader_material.glsl | 4 ++-- .../blender/imbuf/intern/openexr/openexr_api.cpp | 3 +-- source/blender/makesdna/DNA_actuator_types.h | 3 +-- source/blender/makesdna/DNA_cloth_types.h | 6 ++--- source/blender/makesdna/DNA_listBase.h | 9 +++----- source/blender/makesdna/DNA_particle_types.h | 4 ++-- .../blender/render/extern/include/RE_shader_ext.h | 6 ++--- .../blender/render/intern/include/render_types.h | 24 +++++++------------ source/blender/render/intern/include/rendercore.h | 6 ++--- source/blender/render/intern/include/sunsky.h | 3 +-- source/blender/render/intern/include/voxeldata.h | 3 +-- source/blender/render/intern/include/zbuf.h | 3 +-- .../render/intern/raytrace/rayobject_instance.cpp | 3 +-- .../blender/render/intern/source/convertblender.c | 6 ++--- source/blender/render/intern/source/pointdensity.c | 3 +-- source/blender/windowmanager/WM_types.h | 2 +- source/blender/windowmanager/intern/wm_window.c | 11 ++++----- source/gameengine/Converter/BL_ArmatureObject.cpp | 2 +- .../Converter/BL_BlenderDataConversion.cpp | 7 +++--- .../Converter/BL_DeformableGameObject.cpp | 2 +- .../Converter/BL_ShapeActionActuator.cpp | 4 ++-- source/gameengine/Expressions/PyObjectPlus.h | 2 +- source/gameengine/Expressions/Value.h | 2 +- .../gameengine/GameLogic/Joystick/SCA_Joystick.h | 14 +++++------ source/gameengine/GameLogic/SCA_JoystickSensor.cpp | 12 ++++++---- source/gameengine/GameLogic/SCA_JoystickSensor.h | 2 +- source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 3 +-- .../gameengine/Ketsji/KX_BulletPhysicsController.h | 2 +- source/gameengine/Ketsji/KX_Dome.cpp | 19 +++++++++------ source/gameengine/Ketsji/KX_GameObject.h | 2 +- source/gameengine/Ketsji/KX_IpoActuator.cpp | 2 +- source/gameengine/Ketsji/KX_KetsjiEngine.h | 3 +-- source/gameengine/Ketsji/KX_LightIpoSGController.h | 2 +- .../gameengine/Ketsji/KX_MaterialIpoController.h | 2 +- .../gameengine/Ketsji/KX_ObColorIpoSGController.h | 2 +- source/gameengine/Ketsji/KX_SoundActuator.h | 3 +-- source/gameengine/Ketsji/KX_WorldIpoController.h | 2 +- source/gameengine/Rasterizer/RAS_LightObject.h | 2 +- source/gameengine/SceneGraph/SG_ParentRelation.h | 3 +-- 54 files changed, 116 insertions(+), 166 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 3475ef532da..bcda970e60c 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -69,8 +69,7 @@ struct CollisionTree; * own connectivity of the mesh based on the actual edges in the mesh. * */ -typedef struct Cloth -{ +typedef struct Cloth { struct ClothVertex *verts; /* The vertices that represent this cloth. */ struct LinkNode *springs; /* The springs connecting the mesh. */ unsigned int numverts; /* The number of verts == m * n. */ @@ -91,8 +90,7 @@ typedef struct Cloth /** * The definition of a cloth vertex. */ -typedef struct ClothVertex -{ +typedef struct ClothVertex { int flags; /* General flags per vertex. */ float v[3]; /* The velocity of the point. */ float xconst[3]; /* constrained position */ @@ -117,8 +115,7 @@ ClothVertex; /** * The definition of a spring. */ -typedef struct ClothSpring -{ +typedef struct ClothSpring { int ij; /* Pij from the paper, one end of the spring. */ int kl; /* Pkl from the paper, one end of the spring. */ float restlen; /* The original length of the spring. */ @@ -149,8 +146,7 @@ ClothSpring; /* SIMULATION FLAGS: goal flags,.. */ /* These are the bits used in SimSettings.flags. */ -typedef enum -{ +typedef enum { CLOTH_SIMSETTINGS_FLAG_COLLOBJ = ( 1 << 2 ),// object is only collision object, no cloth simulation is done CLOTH_SIMSETTINGS_FLAG_GOAL = ( 1 << 3 ), // we have goals enabled CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ),// true if tearing is enabled @@ -160,15 +156,13 @@ typedef enum } CLOTH_SIMSETTINGS_FLAGS; /* COLLISION FLAGS */ -typedef enum -{ +typedef enum { CLOTH_COLLSETTINGS_FLAG_ENABLED = ( 1 << 1 ), /* enables cloth - object collisions */ CLOTH_COLLSETTINGS_FLAG_SELF = ( 1 << 2 ), /* enables selfcollisions */ } CLOTH_COLLISIONSETTINGS_FLAGS; /* Spring types as defined in the paper.*/ -typedef enum -{ +typedef enum { CLOTH_SPRING_TYPE_STRUCTURAL = (1 << 1), CLOTH_SPRING_TYPE_SHEAR = (1 << 2), CLOTH_SPRING_TYPE_BENDING = (1 << 3), @@ -176,8 +170,7 @@ typedef enum } CLOTH_SPRING_TYPES; /* SPRING FLAGS */ -typedef enum -{ +typedef enum { CLOTH_SPRING_FLAG_DEACTIVATE = ( 1 << 1 ), CLOTH_SPRING_FLAG_NEEDED = ( 1 << 2 ), // springs has values to be applied } CLOTH_SPRINGS_FLAGS; @@ -230,16 +223,14 @@ int cloth_add_spring (struct ClothModifierData *clmd, unsigned int indexA, unsig /* This enum provides the IDs for our solvers. */ // only one available in the moment -typedef enum -{ +typedef enum { CM_IMPLICIT = 0, } CM_SOLVER_ID; /* This structure defines how to call the solver. */ -typedef struct -{ +typedef struct { const char *name; CM_SOLVER_ID id; int ( *init ) (struct Object *ob, struct ClothModifierData *clmd ); diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h index 191056571c0..ec257a2f394 100644 --- a/source/blender/blenkernel/BKE_collision.h +++ b/source/blender/blenkernel/BKE_collision.h @@ -59,8 +59,7 @@ struct LinkNode; //////////////////////////////////////// /* COLLISION FLAGS */ -typedef enum -{ +typedef enum { COLLISION_IN_FUTURE = (1 << 1), #ifdef WITH_ELTOPO COLLISION_USE_COLLFACE = (1 << 2), diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index b9d0076c7c8..5fbd58e26a5 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -266,8 +266,7 @@ struct bNodeTreeExec; typedef void (*bNodeTreeCallback)(void *calldata, struct ID *owner_id, struct bNodeTree *ntree); typedef void (*bNodeClassCallback)(void *calldata, int nclass, const char *name); -typedef struct bNodeTreeType -{ +typedef struct bNodeTreeType { int type; /* type identifier */ char idname[64]; /* id name for RNA identification */ diff --git a/source/blender/blenkernel/BKE_sketch.h b/source/blender/blenkernel/BKE_sketch.h index 50ee1184b3e..ed7ce05506d 100644 --- a/source/blender/blenkernel/BKE_sketch.h +++ b/source/blender/blenkernel/BKE_sketch.h @@ -26,14 +26,12 @@ * \ingroup bke */ -typedef enum SK_PType -{ +typedef enum SK_PType { PT_CONTINUOUS, PT_EXACT, } SK_PType; -typedef enum SK_PMode -{ +typedef enum SK_PMode { PT_SNAP, PT_PROJECT, } SK_PMode; diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index d4861a27057..4aef47159df 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -695,8 +695,7 @@ DO_INLINE void subadd_bfmatrixS_bfmatrixS( fmatrix3x3 *to, fmatrix3x3 *from, flo /////////////////////////////////////////////////////////////////// // simulator start /////////////////////////////////////////////////////////////////// -typedef struct Implicit_Data -{ +typedef struct Implicit_Data { lfVector *X, *V, *Xnew, *Vnew, *olddV, *F, *B, *dV, *z; fmatrix3x3 *A, *dFdV, *dFdX, *S, *P, *Pinv, *bigI, *M; } Implicit_Data; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index f19dfe74a36..6c7336958b5 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -2363,13 +2363,12 @@ static EdgeHash *sph_springhash_build(ParticleSystem *psys) } #define SPH_NEIGHBORS 512 -typedef struct SPHNeighbor -{ +typedef struct SPHNeighbor { ParticleSystem *psys; int index; } SPHNeighbor; -typedef struct SPHRangeData -{ + +typedef struct SPHRangeData { SPHNeighbor neighbors[SPH_NEIGHBORS]; int tot_neighbors; @@ -2641,8 +2640,7 @@ static void sph_integrate(ParticleSimulationData *sim, ParticleData *pa, float d /************************************************/ /* Basic physics */ /************************************************/ -typedef struct EfData -{ +typedef struct EfData { ParticleTexture ptex; ParticleSimulationData *sim; ParticleData *pa; diff --git a/source/blender/blenkernel/intern/seqcache.c b/source/blender/blenkernel/intern/seqcache.c index f1f3dd47d8b..ea4699f8495 100644 --- a/source/blender/blenkernel/intern/seqcache.c +++ b/source/blender/blenkernel/intern/seqcache.c @@ -38,8 +38,7 @@ #include "IMB_moviecache.h" -typedef struct seqCacheKey -{ +typedef struct seqCacheKey { struct Sequence * seq; SeqRenderData context; float cfra; diff --git a/source/blender/bmesh/intern/bmesh_marking.h b/source/blender/bmesh/intern/bmesh_marking.h index 12ebaedac60..406971652dc 100644 --- a/source/blender/bmesh/intern/bmesh_marking.h +++ b/source/blender/bmesh/intern/bmesh_marking.h @@ -27,8 +27,7 @@ * \ingroup bmesh */ -typedef struct BMEditSelection -{ +typedef struct BMEditSelection { struct BMEditSelection *next, *prev; BMElem *ele; char htype; @@ -82,7 +81,7 @@ void BM_editselection_plane(BMEditSelection *ese, float r_plane[3]); #define BM_select_history_store_notest(bm, ele) _bm_select_history_store_notest(bm, &(ele)->head) #define BM_select_history_store(bm, ele) _bm_select_history_store(bm, &(ele)->head) -int _bm_select_history_check(BMesh *bm, const BMHeader *ele); +int _bm_select_history_check(BMesh *bm, const BMHeader *ele); int _bm_select_history_remove(BMesh *bm, BMHeader *ele); void _bm_select_history_store_notest(BMesh *bm, BMHeader *ele); void _bm_select_history_store(BMesh *bm, BMHeader *ele); diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index d90bd96a6f1..91c342ec070 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -81,20 +81,17 @@ typedef struct RetargetParam { bContext *context; } RetargetParam; -typedef enum -{ +typedef enum { RETARGET_LENGTH, RETARGET_AGGRESSIVE } RetargetMode; -typedef enum -{ +typedef enum { METHOD_BRUTE_FORCE = 0, METHOD_MEMOIZE = 1 } RetargetMethod; -typedef enum -{ +typedef enum { ARC_FREE = 0, ARC_TAKEN = 1, ARC_USED = 2 diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index c4d7197bfa1..42036d1ea17 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -168,8 +168,7 @@ typedef struct DepthPeel { struct ListBase; -typedef enum SnapMode -{ +typedef enum SnapMode { SNAP_ALL = 0, SNAP_NOT_SELECTED = 1, SNAP_NOT_OBEDIT = 2 diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index d84214413da..a535e888156 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -102,8 +102,7 @@ typedef struct ThumbnailJob { ReportList reports; } ThumbnailJob; -typedef struct FileList -{ +typedef struct FileList { struct direntry *filelist; int *fidx; int numfiles; @@ -124,8 +123,7 @@ typedef struct FileList } FileList; -typedef struct FolderList -{ +typedef struct FolderList { struct FolderList *next, *prev; char *foldername; } FolderList; diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h index fac6a387b9f..7a37c5fb3c5 100644 --- a/source/blender/editors/space_file/filelist.h +++ b/source/blender/editors/space_file/filelist.h @@ -53,8 +53,7 @@ typedef enum FileSelType { FILE_SEL_TOGGLE = 2 } FileSelType; -typedef enum FileCheckType -{ +typedef enum FileCheckType { CHECK_DIRS = 1, CHECK_FILES = 2, CHECK_ALL = 3 diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 35b1583b24e..9e873799f1c 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -50,8 +50,7 @@ struct bNodeLink; struct Main; /* temp data to pass on to modal */ -typedef struct bNodeLinkDrag -{ +typedef struct bNodeLinkDrag { struct bNodeLinkDrag *next, *prev; /* List of links dragged by the operator. diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 0391afdc188..61dff466387 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -5847,7 +5847,7 @@ void flushTransTracking(TransInfo *t) /* * masking * */ -typedef struct TransDataMasking{ +typedef struct TransDataMasking { int is_handle; float handle[2], orig_handle[2]; diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 9d2a104d8e9..e4c85309081 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -51,8 +51,7 @@ #include "transform.h" -typedef struct TransformModeItem -{ +typedef struct TransformModeItem { char *idname; int mode; void (*opfunc)(wmOperatorType*); diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index b9bd7e961f8..fb248f1b016 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -1261,8 +1261,8 @@ void mtex_bump_bicubic( vec3 texco, sampler2D ima, float hScale, mat4 H; - for(int i = 0; i < 4; i++){ - for(int j = 0; j < 4; j++){ + for(int i = 0; i < 4; i++) { + for(int j = 0; j < 4; j++) { ivec2 iTexTmp = iTexLocMod + ivec2(i,j); // wrap texture coordinates manually for texelFetch to work on uvs oitside the 0,1 range. diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 93a5f8eca7c..baea18d4898 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -904,8 +904,7 @@ static ExrHandle *imb_exr_begin_read_mem(InputFile *file, int width, int height) /* ********************************************************* */ -typedef struct RGBA -{ +typedef struct RGBA { float r; float g; float b; diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index f4e06455c63..4a5ad69cb91 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -62,8 +62,7 @@ typedef struct bActionActuator { float layer_weight; /* How much of the previous layer to use for blending. (<0 = disable, 0 = add mode) */ } bActionActuator; -typedef struct Sound3D -{ +typedef struct Sound3D { float min_gain; float max_gain; float reference_distance; diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index b214186fee6..4928a88b33e 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -44,8 +44,7 @@ * variables with different names to minimize confusion. */ -typedef struct ClothSimSettings -{ +typedef struct ClothSimSettings { struct LinkNode *cache; /* UNUSED atm */ float mingoal; /* see SB */ float Cdis; /* Mechanical damping of springs. */ @@ -89,8 +88,7 @@ typedef struct ClothSimSettings } ClothSimSettings; -typedef struct ClothCollSettings -{ +typedef struct ClothCollSettings { struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ float epsilon; /* min distance for collisions. */ float self_friction; /* Fiction/damping with self contact. */ diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h index 35549aee3d2..333e414278d 100644 --- a/source/blender/makesdna/DNA_listBase.h +++ b/source/blender/makesdna/DNA_listBase.h @@ -41,22 +41,19 @@ extern "C" { #endif /* generic - all structs which are used in linked-lists used this */ -typedef struct Link -{ +typedef struct Link { struct Link *next, *prev; } Link; /* use this when it is not worth defining a custom one... */ -typedef struct LinkData -{ +typedef struct LinkData { struct LinkData *next, *prev; void *data; } LinkData; /* never change the size of this! genfile.c detects pointerlen with it */ -typedef struct ListBase -{ +typedef struct ListBase { void *first, *last; } ListBase; diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index f5d525d47b5..0853df87a35 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -234,8 +234,8 @@ typedef struct ParticleSettings { struct PartDeflect *pd2; } ParticleSettings; -typedef struct ParticleSystem -{ /* note1: make sure all (runtime) are NULL's in 'copy_particlesystem' XXX, this function is no more! - need to invstigate */ +typedef struct ParticleSystem { + /* note1: make sure all (runtime) are NULL's in 'copy_particlesystem' XXX, this function is no more! - need to invstigate */ /* note2: make sure any uses of this struct in DNA are accounted for in 'BKE_object_copy_particlesystems' */ struct ParticleSystem *next, *prev; diff --git a/source/blender/render/extern/include/RE_shader_ext.h b/source/blender/render/extern/include/RE_shader_ext.h index cf9e6f7966f..26a1b9908b3 100644 --- a/source/blender/render/extern/include/RE_shader_ext.h +++ b/source/blender/render/extern/include/RE_shader_ext.h @@ -45,8 +45,7 @@ typedef struct TexResult { } TexResult; /* localized shade result data */ -typedef struct ShadeResult -{ +typedef struct ShadeResult { float combined[4]; float col[4]; float alpha, mist, z; @@ -95,8 +94,7 @@ typedef struct ShadeInputCol { } ShadeInputCol; /* localized renderloop data */ -typedef struct ShadeInput -{ +typedef struct ShadeInput { /* copy from face, also to extract tria from quad */ /* note it mirrors a struct above for quick copy */ diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h index f84b00451a6..e5af51cf2d7 100644 --- a/source/blender/render/intern/include/render_types.h +++ b/source/blender/render/intern/include/render_types.h @@ -65,16 +65,14 @@ struct Main; #define TABLEINITSIZE 1024 #define LAMPINITSIZE 256 -typedef struct SampleTables -{ +typedef struct SampleTables { float centLut[16]; float *fmask1[9], *fmask2[9]; char cmask[256], *centmask; } SampleTables; -typedef struct QMCSampler -{ +typedef struct QMCSampler { struct QMCSampler *next, *prev; int type; int tot; @@ -88,8 +86,7 @@ typedef struct QMCSampler #define SAMP_TYPE_HAMMERSLEY 2 /* this is handed over to threaded hiding/passes/shading engine */ -typedef struct RenderPart -{ +typedef struct RenderPart { struct RenderPart *next, *prev; RenderResult *result; /* result of part rendering */ @@ -347,8 +344,7 @@ typedef struct ObjectInstanceRen { /* ------------------------------------------------------------------------- */ -typedef struct VertRen -{ +typedef struct VertRen { float co[3]; float n[3]; float *orco; @@ -384,8 +380,7 @@ typedef struct VlakRen { int index; } VlakRen; -typedef struct HaloRen -{ +typedef struct HaloRen { short miny, maxy; float alfa, xs, ys, rad, radsq, sin, cos, co[3], no[3]; float hard, b, g, r; @@ -456,8 +451,7 @@ typedef struct StrandRen { /* ------------------------------------------------------------------------- */ -typedef struct VolumeOb -{ +typedef struct VolumeOb { struct VolumeOb *next, *prev; struct Material *ma; struct ObjectRen *obr; @@ -469,8 +463,7 @@ typedef struct MatInside { struct ObjectInstanceRen *obi; } MatInside; -typedef struct VolPrecachePart -{ +typedef struct VolPrecachePart { struct VolPrecachePart *next, *prev; struct RayObject *tree; struct ShadeInput *shi; @@ -486,8 +479,7 @@ typedef struct VolPrecachePart struct Render *re; } VolPrecachePart; -typedef struct VolumePrecache -{ +typedef struct VolumePrecache { int res[3]; float *bbmin, *bbmax; float *data_r; diff --git a/source/blender/render/intern/include/rendercore.h b/source/blender/render/intern/include/rendercore.h index 284b386ca33..0fbbf52e613 100644 --- a/source/blender/render/intern/include/rendercore.h +++ b/source/blender/render/intern/include/rendercore.h @@ -46,16 +46,14 @@ struct RayObject; /* ------------------------------------------------------------------------- */ -typedef struct PixStr -{ +typedef struct PixStr { struct PixStr *next; int obi, facenr, z, maskz; unsigned short mask; short shadfac; } PixStr; -typedef struct PixStrMain -{ +typedef struct PixStrMain { struct PixStrMain *next, *prev; struct PixStr *ps; int counter; diff --git a/source/blender/render/intern/include/sunsky.h b/source/blender/render/intern/include/sunsky.h index 0afd9246150..4bb7d99ba16 100644 --- a/source/blender/render/intern/include/sunsky.h +++ b/source/blender/render/intern/include/sunsky.h @@ -31,8 +31,7 @@ #define SPECTRUM_START 350.0 #define SPECTRUM_END 800.0 -typedef struct SunSky -{ +typedef struct SunSky { short effect_type, skyblendtype, sky_colorspace; float turbidity; float theta, phi; diff --git a/source/blender/render/intern/include/voxeldata.h b/source/blender/render/intern/include/voxeldata.h index 63620331c85..dd2262e0357 100644 --- a/source/blender/render/intern/include/voxeldata.h +++ b/source/blender/render/intern/include/voxeldata.h @@ -35,8 +35,7 @@ struct Render; struct TexResult; -typedef struct VoxelDataHeader -{ +typedef struct VoxelDataHeader { int resolX, resolY, resolZ; int frames; } VoxelDataHeader; diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h index 77cee59a83a..cdf171443d7 100644 --- a/source/blender/render/intern/include/zbuf.h +++ b/source/blender/render/intern/include/zbuf.h @@ -80,8 +80,7 @@ typedef struct APixstrand { struct APixstrand *next; } APixstrand; -typedef struct APixstrMain -{ +typedef struct APixstrMain { struct APixstrMain *next, *prev; void *ps; } APixstrMain; diff --git a/source/blender/render/intern/raytrace/rayobject_instance.cpp b/source/blender/render/intern/raytrace/rayobject_instance.cpp index ce88bac1587..92a412103ba 100644 --- a/source/blender/render/intern/raytrace/rayobject_instance.cpp +++ b/source/blender/render/intern/raytrace/rayobject_instance.cpp @@ -62,8 +62,7 @@ static RayObjectAPI instance_api = RE_rayobject_instance_hint_bb }; -typedef struct InstanceRayObject -{ +typedef struct InstanceRayObject { RayObject rayobj; RayObject *target; diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index a2b911911d0..a48a6b75049 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -520,8 +520,7 @@ static void calc_tangent_vector(ObjectRen *obr, VertexTangent **vtangents, MemAr ************ tangent space generation interface **************** ****************************************************************/ -typedef struct -{ +typedef struct { ObjectRen *obr; } SRenderMeshToTangent; @@ -1011,8 +1010,7 @@ static Material *give_render_material(Render *re, Object *ob, short nr) /* ------------------------------------------------------------------------- */ /* Particles */ /* ------------------------------------------------------------------------- */ -typedef struct ParticleStrandData -{ +typedef struct ParticleStrandData { struct MCol *mcol; float *orco, *uvco, *surfnor; float time, adapt_angle, adapt_pix, size; diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c index 96a1a13b75f..3c1a18316ca 100644 --- a/source/blender/render/intern/source/pointdensity.c +++ b/source/blender/render/intern/source/pointdensity.c @@ -325,8 +325,7 @@ void free_pointdensities(Render *re) } } -typedef struct PointDensityRangeData -{ +typedef struct PointDensityRangeData { float *density; float squared_radius; float *point_data; diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 25abc171057..a15d020c230 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -385,7 +385,7 @@ typedef struct wmTabletData { float Ytilt; /* as above */ } wmTabletData; -typedef enum { // motion progress, for modal handlers +typedef enum { /* motion progress, for modal handlers */ P_NOT_STARTED, P_STARTING, // <-- P_IN_PROGRESS, // <-- only these are sent for NDOF motion diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 7361e74755e..265a3c11377 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -577,12 +577,11 @@ int wm_window_fullscreen_toggle_exec(bContext *C, wmOperator *UNUSED(op)) /* ************ events *************** */ -typedef enum -{ - SHIFT = 's', - CONTROL = 'c', - ALT = 'a', - OS = 'C' +typedef enum { + SHIFT = 's', + CONTROL = 'c', + ALT = 'a', + OS = 'C' } modifierKeyType; /* check if specified modifier key type is pressed */ diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index f38782a9405..7174a563efa 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -529,7 +529,7 @@ bool BL_ArmatureObject::SetActiveAction(BL_ActionActuator *act, short priority, return true; } - else{ + else { act->SetBlendTime(0.0); return false; } diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 3d73ca66c92..927a0535870 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -488,11 +488,10 @@ static void GetRGB(short type, } } -typedef struct MTF_localLayer -{ +typedef struct MTF_localLayer { MTFace *face; const char *name; -}MTF_localLayer; +} MTF_localLayer; // ------------------------------------ bool ConvertMaterial( @@ -1193,7 +1192,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene, twoside = ((ma->game.flag & GEMAT_BACKCULL)==0); collider = ((ma->game.flag & GEMAT_NOPHYSICS)==0); } - else{ + else { visible = true; twoside = false; collider = true; diff --git a/source/gameengine/Converter/BL_DeformableGameObject.cpp b/source/gameengine/Converter/BL_DeformableGameObject.cpp index dd4c51b5403..4967401f279 100644 --- a/source/gameengine/Converter/BL_DeformableGameObject.cpp +++ b/source/gameengine/Converter/BL_DeformableGameObject.cpp @@ -76,7 +76,7 @@ bool BL_DeformableGameObject::SetActiveAction(BL_ShapeActionActuator *act, short return true; } - else{ + else { act->SetBlendTime(0.0f); return false; } diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp index 13e79b13304..c339e10f673 100644 --- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp +++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp @@ -316,7 +316,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) m_localtime += (length/m_stridelength) * deltapos.length(); m_lastpos = newpos; } - else{ + else { SetLocalTime(curtime); } } @@ -466,7 +466,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) BLI_freelistN(&tchanbase); } } - else{ + else { m_blendframe = 0.0f; } } diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index 278febee4ac..c50e42446a5 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -527,7 +527,7 @@ typedef struct KX_PYATTRIBUTE_DEF { /*------------------------------ * PyObjectPlus ------------------------------*/ -typedef PyTypeObject * PyParentObject; // Define the PyParent Object +typedef PyTypeObject *PyParentObject; /* Define the PyParent Object */ #else // WITH_PYTHON diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h index 00320ff9ed2..261f5244f21 100644 --- a/source/gameengine/Expressions/Value.h +++ b/source/gameengine/Expressions/Value.h @@ -158,7 +158,7 @@ class CAction public: CAction() { }; - virtual ~CAction(){ + virtual ~CAction() { }; virtual void Execute() const =0; diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h index a6809716e32..685cc3fcc48 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h +++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h @@ -99,7 +99,7 @@ class SCA_Joystick void OnButtonDown(SDL_Event *sdl_event); void OnNothing(SDL_Event *sdl_event); #if 0 /* not used yet */ - void OnBallMotion(SDL_Event *sdl_event){} + void OnBallMotion(SDL_Event *sdl_event) {} #endif #endif /* WITH_SDL */ @@ -156,27 +156,27 @@ public: void cSetPrecision(int val); - int GetAxisPosition(int index){ + int GetAxisPosition(int index) { return m_axis_array[index]; } - int GetHat(int index){ + int GetHat(int index) { return m_hat_array[index]; } - int GetThreshold(void){ + int GetThreshold(void) { return m_prec; } - bool IsTrigAxis(void){ + bool IsTrigAxis(void) { return m_istrig_axis; } - bool IsTrigButton(void){ + bool IsTrigButton(void) { return m_istrig_button; } - bool IsTrigHat(void){ + bool IsTrigHat(void) { return m_istrig_hat; } diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp index 07fad3bfe37..c82e015919d 100644 --- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp +++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp @@ -137,7 +137,8 @@ bool SCA_JoystickSensor::Evaluate() if (js->aAxisPairIsPositive(m_axis-1)) { /* use zero based axis index internally */ m_istrig = 1; result = true; - }else{ + } + else { if (m_istrig) { m_istrig = 0; result = true; @@ -148,7 +149,8 @@ bool SCA_JoystickSensor::Evaluate() if (js->aAxisPairDirectionIsPositive(m_axis-1, m_axisf)) { /* use zero based axis index internally */ m_istrig = 1; result = true; - }else{ + } + else { if (m_istrig) { m_istrig = 0; result = true; @@ -168,7 +170,8 @@ bool SCA_JoystickSensor::Evaluate() if (js->aAxisIsPositive(m_axis-1)) { /* use zero based axis index internally */ m_istrig = 1; result = true; - }else{ + } + else { if (m_istrig) { m_istrig = 0; result = true; @@ -209,7 +212,8 @@ bool SCA_JoystickSensor::Evaluate() if ((m_bAllEvents && js->GetHat(m_hat-1)) || js->aHatIsPositive(m_hat-1, m_hatf)) { m_istrig = 1; result = true; - }else{ + } + else { if (m_istrig) { m_istrig = 0; result = true; diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.h b/source/gameengine/GameLogic/SCA_JoystickSensor.h index eecbf2c4183..5dc35faf244 100644 --- a/source/gameengine/GameLogic/SCA_JoystickSensor.h +++ b/source/gameengine/GameLogic/SCA_JoystickSensor.h @@ -117,7 +117,7 @@ public: virtual bool IsPositiveTrigger(); virtual void Init(); - short int GetJoyIndex(void){ + short int GetJoyIndex(void) { return m_joyindex; } diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index 1e16cbd51f2..26cfc560b6d 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -118,8 +118,7 @@ static void mem_error_cb(const char *errorStr) } #ifdef WIN32 -typedef enum -{ +typedef enum { SCREEN_SAVER_MODE_NONE = 0, SCREEN_SAVER_MODE_PREVIEW, SCREEN_SAVER_MODE_SAVER, diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.h b/source/gameengine/Ketsji/KX_BulletPhysicsController.h index 4ced21aa2d8..3b3a1f5cbfb 100644 --- a/source/gameengine/Ketsji/KX_BulletPhysicsController.h +++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.h @@ -86,7 +86,7 @@ public: SetOption( int option, int value - ){ + ) { // intentionally empty }; diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp index eaabbdd8233..6d57b6950f1 100644 --- a/source/gameengine/Ketsji/KX_Dome.cpp +++ b/source/gameengine/Ketsji/KX_Dome.cpp @@ -445,7 +445,8 @@ void KX_Dome::GLDrawWarpQuads(void) } } glEnd(); - } else{ + } + else { printf("Dome Error: Warp Mode %d unsupported. Try 1 for Polar Mesh or 2 for Fisheye.\n", warp.mode); } } @@ -502,7 +503,8 @@ bool KX_Dome::ParseWarpMesh(STR_String text) if ((int)lines.size() < 2 + (warp.n_width * warp.n_height)) { printf("Dome Error: Warp Mesh File with insufficient data!\n"); return false; - }else{ + } + else { warp.nodes = vector > (warp.n_height, vector(warp.n_width)); for (i=2; i-2 < (warp.n_width*warp.n_height); i++) { @@ -520,7 +522,7 @@ bool KX_Dome::ParseWarpMesh(STR_String text) warp.nodes[nodeY][nodeX].v = atof(columns[3]); warp.nodes[nodeY][nodeX].i = atof(columns[4]); } - else{ + else { warp.nodes.clear(); printf("Dome Error: Warp Mesh File with wrong number of fields. You should use 5: x y u v i.\n"); return false; @@ -1671,7 +1673,8 @@ void KX_Dome::DrawEnvMap(void) if (can_width/3 <= can_height/2) { ortho_width = 1.0; ortho_height = (float)can_height/can_width; - }else{ + } + else { ortho_height = 2.0f / 3; ortho_width = (float)can_width/can_height * ortho_height; } @@ -1801,7 +1804,8 @@ void KX_Dome::DrawDomeFisheye(void) if (can_width < can_height) { ortho_width = 1.0; ortho_height = (float)can_height/can_width; - }else{ + } + else { ortho_width = (float)can_width/can_height; ortho_height = 1.0; } @@ -1897,7 +1901,8 @@ void KX_Dome::DrawPanorama(void) if ((can_width / 2) <= (can_height)) { ortho_width = 1.0; ortho_height = (float)can_height/can_width; - }else{ + } + else { ortho_width = (float)can_width/can_height * 0.5; ortho_height = 0.5; } @@ -1995,7 +2000,7 @@ void KX_Dome::DrawDomeWarped(void) glBindTexture(GL_TEXTURE_2D, domefacesId[m_numfaces]); glCallList(dlistId + m_numfaces); } - else{ + else { glBindTexture(GL_TEXTURE_2D, domefacesId[m_numfaces]); GLDrawWarpQuads(); } diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index a173ef1ed8f..2b0d13ff2f7 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -712,7 +712,7 @@ public: void AddMesh( RAS_MeshObject* mesh - ){ + ) { m_meshes.push_back(mesh); } diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp index 9777eaf333e..7e7e7f8cef2 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.cpp +++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp @@ -297,7 +297,7 @@ bool KX_IpoActuator::Update(double curtime, bool frame) { SetLocalTime(curtime); } - else{ + else { if (!m_bNegativeEvent) { /* Perform wraparound */ SetLocalTime(curtime); diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h index 0a50ab0a43a..f9c6d59b668 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.h +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h @@ -150,8 +150,7 @@ private: int m_curreye; /** Categories for profiling display. */ - typedef enum - { + typedef enum { tc_first = 0, tc_physics = 0, tc_logic, diff --git a/source/gameengine/Ketsji/KX_LightIpoSGController.h b/source/gameengine/Ketsji/KX_LightIpoSGController.h index 78466e822e7..15591bfa981 100644 --- a/source/gameengine/Ketsji/KX_LightIpoSGController.h +++ b/source/gameengine/Ketsji/KX_LightIpoSGController.h @@ -90,7 +90,7 @@ public: SetOption( int option, int value - ){ + ) { // intentionally empty }; diff --git a/source/gameengine/Ketsji/KX_MaterialIpoController.h b/source/gameengine/Ketsji/KX_MaterialIpoController.h index 85b2a971fbe..11d92925a02 100644 --- a/source/gameengine/Ketsji/KX_MaterialIpoController.h +++ b/source/gameengine/Ketsji/KX_MaterialIpoController.h @@ -49,7 +49,7 @@ public: SetOption( int option, int value - ){ + ) { // intentionally empty }; diff --git a/source/gameengine/Ketsji/KX_ObColorIpoSGController.h b/source/gameengine/Ketsji/KX_ObColorIpoSGController.h index d2d69d6db12..d2f4c69bf47 100644 --- a/source/gameengine/Ketsji/KX_ObColorIpoSGController.h +++ b/source/gameengine/Ketsji/KX_ObColorIpoSGController.h @@ -64,7 +64,7 @@ public: SetOption( int option, int value - ){ + ) { // intentionally empty }; diff --git a/source/gameengine/Ketsji/KX_SoundActuator.h b/source/gameengine/Ketsji/KX_SoundActuator.h index 71ec3ae2f59..dbdb17d0da5 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.h +++ b/source/gameengine/Ketsji/KX_SoundActuator.h @@ -43,8 +43,7 @@ #include "BKE_sound.h" -typedef struct KX_3DSoundSettings -{ +typedef struct KX_3DSoundSettings { float min_gain; float max_gain; float reference_distance; diff --git a/source/gameengine/Ketsji/KX_WorldIpoController.h b/source/gameengine/Ketsji/KX_WorldIpoController.h index 1f60280e355..9578130b51e 100644 --- a/source/gameengine/Ketsji/KX_WorldIpoController.h +++ b/source/gameengine/Ketsji/KX_WorldIpoController.h @@ -88,7 +88,7 @@ public: SetOption( int option, int value - ){ + ) { // intentionally empty }; diff --git a/source/gameengine/Rasterizer/RAS_LightObject.h b/source/gameengine/Rasterizer/RAS_LightObject.h index c378a9ea0c2..ddf360683cd 100644 --- a/source/gameengine/Rasterizer/RAS_LightObject.h +++ b/source/gameengine/Rasterizer/RAS_LightObject.h @@ -36,7 +36,7 @@ struct RAS_LightObject { - enum LightType{ + enum LightType { LIGHT_SPOT, LIGHT_SUN, LIGHT_NORMAL diff --git a/source/gameengine/SceneGraph/SG_ParentRelation.h b/source/gameengine/SceneGraph/SG_ParentRelation.h index 689ada84edd..4140563828f 100644 --- a/source/gameengine/SceneGraph/SG_ParentRelation.h +++ b/source/gameengine/SceneGraph/SG_ParentRelation.h @@ -76,8 +76,7 @@ public : virtual ~SG_ParentRelation( - ){ - }; + ) {}; /** * You must provide a way of duplicating an -- cgit v1.2.3