Code Cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Mon, 20 Jan 2014 14:19:51 +0000 (01:19 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 21 Jan 2014 01:05:27 +0000 (12:05 +1100)
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/intern/sort.c
source/blender/bmesh/tools/bmesh_bevel.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/transform/transform_conversions.c
source/blender/makesdna/DNA_userdef_types.h

index ff4300c34e995577bb0710ae34bbcda393e81141..713f970f1e580aa24c221e3677ee2a9d9f068013 100644 (file)
@@ -606,9 +606,11 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
        }
 
        if ((of->oformat->flags & AVFMT_GLOBALHEADER)
-//             || !strcmp(of->oformat->name, "mp4")
-//         || !strcmp(of->oformat->name, "mov")
-//         || !strcmp(of->oformat->name, "3gp")
+#if 0
+           || !strcmp(of->oformat->name, "mp4")
+           || !strcmp(of->oformat->name, "mov")
+           || !strcmp(of->oformat->name, "3gp")
+#endif
            )
        {
                PRINT("Using global header\n");
index 441105649485871a95347278d34cb7c15a53c0d4..a1b7296feb6845a5612d4c1e7bc3124169ca9bda 100644 (file)
@@ -76,9 +76,9 @@ BLI_INLINE void swapfunc(char *a, char *b, int n, int swaptype)
 
 BLI_INLINE char *med3(char *a, char *b, char *c, BLI_sort_cmp_t cmp, void *thunk)
 {
-       return CMP(thunk, a, b) < 0 ?
-               (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
-               :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
+       return  CMP(thunk, a, b) < 0 ?
+              (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) :
+              (CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
 }
 
 /**
index 8ae71c24c677808015a80492bb3e88bdbd1820ae..3f71a6aa8a9dcc596a4a373d27f4196fbc301fd1 100644 (file)
@@ -2984,12 +2984,17 @@ static void build_vmesh(BevelParams *bp, BMesh *bm, BevVert *bv)
                         * just use the boundary point of the other */
                        if (weld1->profile.super_r == PRO_LINE_R &&
                            weld2->profile.super_r != PRO_LINE_R)
+                       {
                                copy_v3_v3(co, vb);
+                       }
                        else if (weld2->profile.super_r == PRO_LINE_R &&
-                                weld1->profile.super_r != PRO_LINE_R)
+                                weld1->profile.super_r != PRO_LINE_R)
+                       {
                                copy_v3_v3(co, va);
-                       else
+                       }
+                       else {
                                mid_v3_v3v3(co, va, vb);
+                       }
                        copy_v3_v3(mesh_vert(vm, weld1->index, 0, k)->co, co);
                        create_mesh_bmvert(bm, vm, weld1->index, 0, k, bv->v);
                }
index b4d98b0d829fe38881f761e845288b454745bfd7..c7a898115730ef8974caacc0810db8ceebcfd679 100644 (file)
@@ -972,7 +972,7 @@ static void image_sequence_get_frames(PointerRNA *ptr, ListBase *frames, char *p
 
                        /* still in the same sequence */
                        if ((STREQLEN(base_head, head, FILE_MAX)) &&
-                               (STREQLEN(base_tail, tail, FILE_MAX)))
+                           (STREQLEN(base_tail, tail, FILE_MAX)))
                        {
                                BLI_addtail(frames, frame);
                        }
index ee18f945316a578908aa26e98b9923b6fe8c6f15..a1d5a1b9b81e5f9dd1e72512037039224d64a34d 100644 (file)
@@ -655,7 +655,8 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node)
                                nodeClearActiveID(ntree, ID_TE);
                        
                        if (ELEM4(node->type, SH_NODE_OUTPUT, SH_NODE_OUTPUT_MATERIAL,
-                                     SH_NODE_OUTPUT_WORLD, SH_NODE_OUTPUT_LAMP)) {
+                                 SH_NODE_OUTPUT_WORLD, SH_NODE_OUTPUT_LAMP))
+                       {
                                bNode *tnode;
                                
                                for (tnode = ntree->nodes.first; tnode; tnode = tnode->next)
index 0eddb68d8a49f65953e8f98160f58a635efb9a03..1c7ecbc95e7f3cad7bb2b1254f25ca312333e9bd 100644 (file)
@@ -2395,14 +2395,15 @@ void flushTransNodes(TransInfo *t)
                node->locy = td2d->loc[1] / dpi_fac;
 #endif
                /* update node hidden state with transform data TD_HIDDEN + transformInfo T_TOGGLE_HIDDEN */
-               hidden_state = (td->flag & TD_HIDDEN) > 0;
+               hidden_state = (td->flag & TD_HIDDEN) != 0;
                if (t->state != TRANS_CANCEL) {
                        hidden_state ^= (t->flag & T_TOGGLE_HIDDEN) > 0;
                }
 
                if (hidden_state) {
                        node->flag |= NODE_HIDDEN;
-               } else {
+               }
+               else {
                        node->flag &= ~NODE_HIDDEN;
                }
        }
@@ -5999,7 +6000,7 @@ static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node, const
        td->ext = NULL; td->val = NULL;
 
        td->flag |= TD_SELECTED;
-       if(node->flag & NODE_HIDDEN){
+       if (node->flag & NODE_HIDDEN) {
                td->flag |= TD_HIDDEN;
        }
        td->dist = 0.0;
index 8f0adc7d39ed7ede46eefc2405ce607123ef7e4d..864cc8170d69e244325b7d86892791e07b334d36 100644 (file)
@@ -251,7 +251,7 @@ typedef struct ThemeSpace {
        char ds_channel[4], ds_subchannel[4]; /* dopesheet */
        char keytype_keyframe[4], keytype_extreme[4], keytype_breakdown[4], keytype_jitter[4]; /* keytypes */
        char keytype_keyframe_select[4], keytype_extreme_select[4], keytype_breakdown_select[4], keytype_jitter_select[4]; /* keytypes */
-       char keyborder[4],keyborder_select[4];
+       char keyborder[4], keyborder_select[4];
        
        char console_output[4], console_input[4], console_info[4], console_error[4];
        char console_cursor[4], console_select[4], pad1[4];