diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-23 20:17:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-23 20:17:47 +0400 |
commit | 65dbeabdc6a89506df40222c52a1fc1db8c19e39 (patch) | |
tree | 94c6a4d1ff4b0ea0a6f54a4e4a937308a8f53af7 /source/blender | |
parent | c9d5f32270b70f8951f738e63da11b54685f8899 (diff) |
style cleanup: indentation, also quiet double promotion warnings for despeckle node.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 44 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 18 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_DespeckleOperation.cpp | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 6 | ||||
-rw-r--r-- | source/blender/imbuf/intern/indexer.c | 6 | ||||
-rw-r--r-- | source/blender/imbuf/intern/scaling.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_boolean.c | 6 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_cast.c | 12 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_displace.c | 4 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_fluidsim.c | 4 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_lattice.c | 6 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_meshdeform.c | 10 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_particlesystem.c | 4 |
13 files changed, 64 insertions, 64 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 22b0cccf175..bf5fc6449f8 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1487,10 +1487,10 @@ void nodeSocketSetType(bNodeSocket *sock, int type) * 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 @@ typedef struct bNodeClipboard { ListBase nodes; #ifdef USE_NODE_CB_VALIDATE - ListBase nodes_extra_info; + ListBase nodes_extra_info; #endif ListBase links; @@ -1531,7 +1531,7 @@ void BKE_node_clipboard_clear(void) 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 @@ int BKE_node_clipboard_validate(void) 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); } diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index b2762d23ef3..555ed5890c8 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -1468,9 +1468,9 @@ static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3]) } 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_foreachMappedVert( } 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_drawMappedEdgesInterp(DerivedMesh *dm, } 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; diff --git a/source/blender/compositor/operations/COM_DespeckleOperation.cpp b/source/blender/compositor/operations/COM_DespeckleOperation.cpp index 8a18e4e2330..599f54720f2 100644 --- a/source/blender/compositor/operations/COM_DespeckleOperation.cpp +++ b/source/blender/compositor/operations/COM_DespeckleOperation.cpp @@ -78,8 +78,8 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void *data) 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 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void *data) 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) && diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index a1a7bda4800..8e9776e0e17 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -2256,9 +2256,9 @@ void mesh_foreachScreenFace( } 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}; diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index d5ca7da7d93..4108f0d89d7 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -221,7 +221,7 @@ struct anim_index *IMB_indexer_open(const char *name) } 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( } 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 struct proxy_output_ctx *alloc_proxy_output_ffmpeg( } static int add_to_proxy_output_ffmpeg( - struct proxy_output_ctx *ctx, AVFrame *frame) + struct proxy_output_ctx *ctx, AVFrame *frame) { int outsize = 0; diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c index e90269a0986..389c3c42b6d 100644 --- a/source/blender/imbuf/intern/scaling.c +++ b/source/blender/imbuf/intern/scaling.c @@ -294,7 +294,7 @@ struct ImBuf *IMB_double_y(struct ImBuf *ibuf1) /* 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); diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index fb9788fb278..5c78a8efe23 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -67,9 +67,9 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams)) } 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; diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c index c80b4dfa4de..2530a230e0a 100644 --- a/source/blender/modifiers/intern/MOD_cast.c +++ b/source/blender/modifiers/intern/MOD_cast.c @@ -127,8 +127,8 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, } 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 sphere_do( } 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 deformVerts(ModifierData *md, Object *ob, } 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; diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index 1d84dbc78f9..4a6d5ceb10f 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -166,8 +166,8 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, /* 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; diff --git a/source/blender/modifiers/intern/MOD_fluidsim.c b/source/blender/modifiers/intern/MOD_fluidsim.c index 694f4f174e8..c9121010d5d 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim.c +++ b/source/blender/modifiers/intern/MOD_fluidsim.c @@ -98,8 +98,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } static void updateDepgraph( - ModifierData *md, DagForest *forest, Scene *scene, - Object *ob, DagNode *obNode) + ModifierData *md, DagForest *forest, Scene *scene, + Object *ob, DagNode *obNode) { FluidsimModifierData *fluidmd = (FluidsimModifierData *) md; Base *base; diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c index 2c05b164d86..d64ccf750b2 100644 --- a/source/blender/modifiers/intern/MOD_lattice.c +++ b/source/blender/modifiers/intern/MOD_lattice.c @@ -82,9 +82,9 @@ static int isDisabled(ModifierData *md, int UNUSED(userRenderParams)) } 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) { LatticeModifierData *lmd = (LatticeModifierData *) md; diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index aafb21b3c34..f0bdf1bb737 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -104,9 +104,9 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams)) } 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) { MeshDeformModifierData *mmd = (MeshDeformModifierData *) md; @@ -182,8 +182,8 @@ static float meshdeform_dynamic_bind(MeshDeformModifierData *mmd, float (*dco)[3 } static void meshdeformModifier_do( - ModifierData *md, Object *ob, DerivedMesh *dm, - float (*vertexCos)[3], int numVerts) + ModifierData *md, Object *ob, DerivedMesh *dm, + float (*vertexCos)[3], int numVerts) { MeshDeformModifierData *mmd = (MeshDeformModifierData *) md; struct Mesh *me = (mmd->object) ? mmd->object->data : NULL; diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c index ecdc5b53460..890e45f7e80 100644 --- a/source/blender/modifiers/intern/MOD_particlesystem.c +++ b/source/blender/modifiers/intern/MOD_particlesystem.c @@ -199,8 +199,8 @@ static void deformVerts(ModifierData *md, Object *ob, * updates is coded */ #if 0 static void deformVertsEM( - ModifierData *md, Object *ob, EditMesh *editData, - DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts) + ModifierData *md, Object *ob, EditMesh *editData, + DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts) { DerivedMesh *dm = derivedData; |