style cleanup: if();
authorCampbell Barton <ideasman42@gmail.com>
Sun, 7 Oct 2012 09:48:59 +0000 (09:48 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 7 Oct 2012 09:48:59 +0000 (09:48 +0000)
47 files changed:
build_files/cmake/cmake_static_check_clang_array.py
build_files/cmake/cmake_static_check_cppcheck.py
build_files/cmake/cmake_static_check_smatch.py
build_files/cmake/cmake_static_check_sparse.py
build_files/cmake/cmake_static_check_splint.py
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/particle.c
source/blender/blenlib/BLI_endian_switch_inline.h
source/blender/editors/armature/editarmature.c
source/blender/editors/curve/editcurve.c
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/mesh/editface.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/render/render_update.c
source/blender/editors/screen/area.c
source/blender/editors/sculpt_paint/paint_undo.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/transform/transform_conversions.c
source/blender/makesdna/intern/makesdna.c
source/blender/nodes/texture/nodes/node_texture_output.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/imagetexture.c
source/blender/render/intern/source/occlusion.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/pointdensity.c
source/blender/render/intern/source/render_texture.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/sss.c
source/blender/render/intern/source/zbuf.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c

index ff15a13..8afaf08 100644 (file)
@@ -30,6 +30,7 @@ import os
 CHECKER_IGNORE_PREFIX = [
     "extern",
     "intern/moto",
+    "blender/intern/opennl",
     ]
 
 CHECKER_BIN = "python2"
index c340ca5..4ea3571 100644 (file)
@@ -30,6 +30,7 @@ import os
 CHECKER_IGNORE_PREFIX = [
     "extern",
     "intern/moto",
+    "blender/intern/opennl",
     ]
 
 CHECKER_BIN = "cppcheck"
index 779945b..eebb2e9 100644 (file)
@@ -25,6 +25,7 @@
 CHECKER_IGNORE_PREFIX = [
     "extern",
     "intern/moto",
+    "blender/intern/opennl",
     ]
 
 CHECKER_BIN = "smatch"
index db1b14e..8862fc7 100644 (file)
@@ -25,6 +25,7 @@
 CHECKER_IGNORE_PREFIX = [
     "extern",
     "intern/moto",
+    "blender/intern/opennl",
     ]
 
 CHECKER_BIN = "sparse"
index f538fa6..b753a61 100644 (file)
@@ -25,6 +25,7 @@
 CHECKER_IGNORE_PREFIX = [
     "extern",
     "intern/moto",
+    "blender/intern/opennl",
     ]
 
 CHECKER_BIN = "splint"
index 99b788e..197e38a 100644 (file)
@@ -621,7 +621,9 @@ void BKE_undo_step(bContext *C, int step)
        }
        else if (step == 1) {
                /* curundo should never be NULL, after restart or load file it should call undo_save */
-               if (curundo == NULL || curundo->prev == NULL) ;  // XXX error("No undo available");
+               if (curundo == NULL || curundo->prev == NULL) {
+                       // XXX error("No undo available");
+               }
                else {
                        if (G.debug & G_DEBUG) printf("undo %s\n", curundo->name);
                        curundo = curundo->prev;
@@ -631,7 +633,9 @@ void BKE_undo_step(bContext *C, int step)
        else {
                /* curundo has to remain current situation! */
                
-               if (curundo == NULL || curundo->next == NULL) ;  // XXX error("No redo available");
+               if (curundo == NULL || curundo->next == NULL) {
+                       // XXX error("No redo available");
+               }
                else {
                        read_undosave(C, curundo->next);
                        curundo = curundo->next;
index de55751..efcc00c 100644 (file)
@@ -2866,7 +2866,9 @@ void CustomData_external_reload(CustomData *data, ID *UNUSED(id), CustomDataMask
                layer = &data->layers[i];
                typeInfo = layerType_getInfo(layer->type);
 
-               if (!(mask & CD_TYPE_AS_MASK(layer->type))) ;
+               if (!(mask & CD_TYPE_AS_MASK(layer->type))) {
+                       /* pass */
+               }
                else if ((layer->flag & CD_FLAG_EXTERNAL) && (layer->flag & CD_FLAG_IN_MEMORY)) {
                        if (typeInfo->free)
                                typeInfo->free(layer->data, totelem, typeInfo->size);
@@ -2892,10 +2894,15 @@ void CustomData_external_read(CustomData *data, ID *id, CustomDataMask mask, int
                layer = &data->layers[i];
                typeInfo = layerType_getInfo(layer->type);
 
-               if (!(mask & CD_TYPE_AS_MASK(layer->type))) ;
-               else if (layer->flag & CD_FLAG_IN_MEMORY) ;
-               else if ((layer->flag & CD_FLAG_EXTERNAL) && typeInfo->read)
+               if (!(mask & CD_TYPE_AS_MASK(layer->type))) {
+                       /* pass */
+               }
+               else if (layer->flag & CD_FLAG_IN_MEMORY) {
+                       /* pass */
+               }
+               else if ((layer->flag & CD_FLAG_EXTERNAL) && typeInfo->read) {
                        update = 1;
+               }
        }
 
        if (!update)
@@ -2913,15 +2920,23 @@ void CustomData_external_read(CustomData *data, ID *id, CustomDataMask mask, int
                layer = &data->layers[i];
                typeInfo = layerType_getInfo(layer->type);
 
-               if (!(mask & CD_TYPE_AS_MASK(layer->type))) ;
-               else if (layer->flag & CD_FLAG_IN_MEMORY) ;
+               if (!(mask & CD_TYPE_AS_MASK(layer->type))) {
+                       /* pass */
+               }
+               else if (layer->flag & CD_FLAG_IN_MEMORY) {
+                       /* pass */
+               }
                else if ((layer->flag & CD_FLAG_EXTERNAL) && typeInfo->read) {
                        blay = cdf_layer_find(cdf, layer->type, layer->name);
 
                        if (blay) {
                                if (cdf_read_layer(cdf, blay)) {
-                                       if (typeInfo->read(cdf, layer->data, totelem)) ;
-                                       else break;
+                                       if (typeInfo->read(cdf, layer->data, totelem)) {
+                                               /* pass */
+                                       }
+                                       else {
+                                               break;
+                                       }
                                        layer->flag |= CD_FLAG_IN_MEMORY;
                                }
                                else
@@ -2952,9 +2967,12 @@ void CustomData_external_write(CustomData *data, ID *id, CustomDataMask mask, in
                layer = &data->layers[i];
                typeInfo = layerType_getInfo(layer->type);
 
-               if (!(mask & CD_TYPE_AS_MASK(layer->type))) ;
-               else if ((layer->flag & CD_FLAG_EXTERNAL) && typeInfo->write)
+               if (!(mask & CD_TYPE_AS_MASK(layer->type))) {
+                       /* pass */
+               }
+               else if ((layer->flag & CD_FLAG_EXTERNAL) && typeInfo->write) {
                        update = 1;
+               }
        }
 
        if (!update)
@@ -2995,11 +3013,16 @@ void CustomData_external_write(CustomData *data, ID *id, CustomDataMask mask, in
                        blay = cdf_layer_find(cdf, layer->type, layer->name);
 
                        if (cdf_write_layer(cdf, blay)) {
-                               if (typeInfo->write(cdf, layer->data, totelem)) ;
-                               else break;
+                               if (typeInfo->write(cdf, layer->data, totelem)) {
+                                       /* pass */
+                               }
+                               else {
+                                       break;
+                               }
                        }
-                       else
+                       else {
                                break;
+                       }
                }
        }
 
index 64959fd..10c9f30 100644 (file)
@@ -299,7 +299,9 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase, i
                        else
                                resolu = nu->resolu;
 
-                       if (!BKE_nurb_check_valid_u(nu)) ;
+                       if (!BKE_nurb_check_valid_u(nu)) {
+                               /* pass */
+                       }
                        else if (nu->type == CU_BEZIER) {
                                /* count */
                                len = 0;
index 8b35974..06b21fb 100644 (file)
@@ -928,8 +928,12 @@ makebreak:
                 * 3: curs down */
                ct = chartransdata + cu->pos;
                
-               if ((mode == FO_CURSUP || mode == FO_PAGEUP) && ct->linenr == 0) ;
-               else if ((mode == FO_CURSDOWN || mode == FO_PAGEDOWN) && ct->linenr == lnr) ;
+               if ((mode == FO_CURSUP || mode == FO_PAGEUP) && ct->linenr == 0) {
+                       /* pass */
+               }
+               else if ((mode == FO_CURSDOWN || mode == FO_PAGEDOWN) && ct->linenr == lnr) {
+                       /* pass */
+               }
                else {
                        switch (mode) {
                                case FO_CURSUP:     lnr = ct->linenr - 1; break;
index 17e4103..bb871f0 100644 (file)
@@ -879,9 +879,10 @@ void outside_lattice(Lattice *lt)
                        for (v = 0; v < lt->pntsv; v++) {
                        
                                for (u = 0; u < lt->pntsu; u++, bp++) {
-                                       if (u == 0 || v == 0 || w == 0 || u == lt->pntsu - 1 || v == lt->pntsv - 1 || w == lt->pntsw - 1) ;
+                                       if (u == 0 || v == 0 || w == 0 || u == lt->pntsu - 1 || v == lt->pntsv - 1 || w == lt->pntsw - 1) {
+                                               /* pass */
+                                       }
                                        else {
-                                       
                                                bp->hide = 1;
                                                bp->f1 &= ~SELECT;
                                                
index 28de80a..f072ed4 100644 (file)
@@ -574,10 +574,12 @@ int modifiers_isCorrectableDeformed(Object *ob)
        ModifierData *md = modifiers_getVirtualModifierList(ob);
        
        for (; md; md = md->next) {
-               if (ob->mode == OB_MODE_EDIT && (md->mode & eModifierMode_Editmode) == 0) ;
-               else 
-               if (modifier_isCorrectableDeformed(md))
+               if (ob->mode == OB_MODE_EDIT && (md->mode & eModifierMode_Editmode) == 0) {
+                       /* pass */
+               }
+               else if (modifier_isCorrectableDeformed(md)) {
                        return 1;
+               }
        }
        return 0;
 }
index e8af794..89dadcd 100644 (file)
@@ -97,8 +97,8 @@ int count_particles(ParticleSystem *psys)
        int tot = 0;
 
        LOOP_SHOWN_PARTICLES {
-               if (pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN) == 0) ;
-               else if (pa->alive == PARS_DEAD && (part->flag & PART_DIED) == 0) ;
+               if (pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN) == 0) {}
+               else if (pa->alive == PARS_DEAD && (part->flag & PART_DIED) == 0) {}
                else tot++;
        }
        return tot;
@@ -110,8 +110,8 @@ int count_particles_mod(ParticleSystem *psys, int totgr, int cur)
        int tot = 0;
 
        LOOP_SHOWN_PARTICLES {
-               if (pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN) == 0) ;
-               else if (pa->alive == PARS_DEAD && (part->flag & PART_DIED) == 0) ;
+               if (pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN) == 0) {}
+               else if (pa->alive == PARS_DEAD && (part->flag & PART_DIED) == 0) {}
                else if (p % totgr == cur) tot++;
        }
        return tot;
index 948d462..6aa0405 100644 (file)
@@ -74,12 +74,12 @@ BLI_INLINE void BLI_endian_switch_int64(int64_t *val)
 {
        int64_t tval = *val;
        *val = ((tval >> 56)) |
-              ((tval << 40) & 0x00ff000000000000) |
-              ((tval << 24) & 0x0000ff0000000000) |
-              ((tval <<  8) & 0x000000ff00000000) |
-              ((tval >>  8) & 0x00000000ff000000) |
-              ((tval >> 24) & 0x0000000000ff0000) |
-              ((tval >> 40) & 0x000000000000ff00) |
+              ((tval << 40) & 0x00ff000000000000l) |
+              ((tval << 24) & 0x0000ff0000000000l) |
+              ((tval <<  8) & 0x000000ff00000000l) |
+              ((tval >>  8) & 0x00000000ff000000l) |
+              ((tval >> 24) & 0x0000000000ff0000l) |
+              ((tval >> 40) & 0x000000000000ff00l) |
               ((tval << 56));
 }
 BLI_INLINE void BLI_endian_switch_uint64(uint64_t *val)
index 707594f..46bbf6f 100644 (file)
@@ -3357,12 +3357,17 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
                if (EBONE_VISIBLE(arm, ebone)) {
                        /* we extrude per definition the tip */
                        do_extrude = FALSE;
-                       if (ebone->flag & (BONE_TIPSEL | BONE_SELECTED))
+                       if (ebone->flag & (BONE_TIPSEL | BONE_SELECTED)) {
                                do_extrude = TRUE;
+                       }
                        else if (ebone->flag & BONE_ROOTSEL) {
                                /* but, a bone with parent deselected we do the root... */
-                               if (ebone->parent && (ebone->parent->flag & BONE_TIPSEL)) ;
-                               else do_extrude = 2;
+                               if (ebone->parent && (ebone->parent->flag & BONE_TIPSEL)) {
+                                       /* pass */
+                               }
+                               else {
+                                       do_extrude = 2;
+                               }
                        }
                        
                        if (do_extrude) {
index afd6bc4..d22b9f2 100644 (file)
@@ -1579,8 +1579,9 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
        BPoint *bp, *bpn, *newbp;
        int a, b, newu, newv, sel;
 
-       if (obedit->type == OB_SURF) ;
-       else return OPERATOR_CANCELLED;
+       if (obedit->type != OB_SURF) {
+               return OPERATOR_CANCELLED;
+       }
 
        cu->lastsel = NULL;
 
@@ -1593,8 +1594,12 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
                a = nu->pntsu * nu->pntsv;
                while (a) {
                        a--;
-                       if (bp->f1 & flag) ;
-                       else break;
+                       if (bp->f1 & flag) {
+                               /* pass */
+                       }
+                       else {
+                               break;
+                       }
                        bp++;
                }
                if (a == 0) {
@@ -1715,8 +1720,12 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
                        bp = nu->bp;
                        a = nu->pntsu;
                        while (a) {
-                               if (bp->f1 & flag) ;
-                               else break;
+                               if (bp->f1 & flag) {
+                                       /* pass */
+                               }
+                               else {
+                                       break;
+                               }
                                bp++;
                                a--;
                        }
@@ -3762,20 +3771,28 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
 
        /* first nurbs: u = resolu-1 selected */
        
-       if (is_u_selected(nu1, nu1->pntsu - 1) ) ;
+       if (is_u_selected(nu1, nu1->pntsu - 1) ) {
+               /* pass */
+       }
        else {
                /* For 2D curves blender uses (orderv = 0). It doesn't make any sense mathematically. */
                /* but after rotating (orderu = 0) will be confusing. */
                if (nu1->orderv == 0) nu1->orderv = 1;
 
                rotate_direction_nurb(nu1);
-               if (is_u_selected(nu1, nu1->pntsu - 1)) ;
+               if (is_u_selected(nu1, nu1->pntsu - 1)) {
+                       /* pass */
+               }
                else {
                        rotate_direction_nurb(nu1);
-                       if (is_u_selected(nu1, nu1->pntsu - 1)) ;
+                       if (is_u_selected(nu1, nu1->pntsu - 1)) {
+                               /* pass */
+                       }
                        else {
                                rotate_direction_nurb(nu1);
-                               if (is_u_selected(nu1, nu1->pntsu - 1)) ;
+                               if (is_u_selected(nu1, nu1->pntsu - 1)) {
+                                       /* pass */
+                               }
                                else {
                                        /* rotate again, now its OK! */
                                        if (nu1->pntsv != 1) rotate_direction_nurb(nu1);
@@ -3786,17 +3803,25 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
        }
        
        /* 2nd nurbs: u = 0 selected */
-       if (is_u_selected(nu2, 0) ) ;
+       if (is_u_selected(nu2, 0) ) {
+               /* pass */
+       }
        else {
                if (nu2->orderv == 0) nu2->orderv = 1;
                rotate_direction_nurb(nu2);
-               if (is_u_selected(nu2, 0)) ;
+               if (is_u_selected(nu2, 0)) {
+                       /* pass */
+               }
                else {
                        rotate_direction_nurb(nu2);
-                       if (is_u_selected(nu2, 0)) ;
+                       if (is_u_selected(nu2, 0)) {
+                               /* pass */
+                       }
                        else {
                                rotate_direction_nurb(nu2);
-                               if (is_u_selected(nu2, 0)) ;
+                               if (is_u_selected(nu2, 0)) {
+                                       /* pass */
+                               }
                                else {
                                        /* rotate again, now its OK! */
                                        if (nu1->pntsu == 1) rotate_direction_nurb(nu1);
@@ -3892,15 +3917,27 @@ static int merge_nurb(bContext *C, wmOperator *op)
 
        /* resolution match, to avoid uv rotations */
        if (nus1->nu->pntsv == 1) {
-               if (nus1->nu->pntsu == nus2->nu->pntsu || nus1->nu->pntsu == nus2->nu->pntsv) ;
-               else ok = 0;
+               if (nus1->nu->pntsu == nus2->nu->pntsu || nus1->nu->pntsu == nus2->nu->pntsv) {
+                       /* pass */
+               }
+               else {
+                       ok = 0;
+               }
        }
        else if (nus2->nu->pntsv == 1) {
-               if (nus2->nu->pntsu == nus1->nu->pntsu || nus2->nu->pntsu == nus1->nu->pntsv) ;
-               else ok = 0;
+               if (nus2->nu->pntsu == nus1->nu->pntsu || nus2->nu->pntsu == nus1->nu->pntsv) {
+                       /* pass */
+               }
+               else {
+                       ok = 0;
+               }
+       }
+       else if (nus1->nu->pntsu == nus2->nu->pntsu || nus1->nu->pntsv == nus2->nu->pntsv) {
+               /* pass */
+       }
+       else if (nus1->nu->pntsu == nus2->nu->pntsv || nus1->nu->pntsv == nus2->nu->pntsu) {
+               /* pass */
        }
-       else if (nus1->nu->pntsu == nus2->nu->pntsu || nus1->nu->pntsv == nus2->nu->pntsv) ;
-       else if (nus1->nu->pntsu == nus2->nu->pntsv || nus1->nu->pntsv == nus2->nu->pntsu) ;
        else {
                ok = 0;
        }
@@ -3949,8 +3986,12 @@ static int make_segment_exec(bContext *C, wmOperator *op)
                        if (isNurbsel_count(cu, nu) == 1) {
                                /* only 1 selected, not first or last, a little complex, but intuitive */
                                if (nu->pntsv == 1) {
-                                       if ( (nu->bp->f1 & SELECT) || (nu->bp[nu->pntsu - 1].f1 & SELECT)) ;
-                                       else break;
+                                       if ( (nu->bp->f1 & SELECT) || (nu->bp[nu->pntsu - 1].f1 & SELECT)) {
+                                               /* pass */
+                                       }
+                                       else {
+                                               break;
+                                       }
                                }
                        }
                }
@@ -5684,8 +5725,12 @@ static int delete_exec(bContext *C, wmOperator *op)
                                a = nu->pntsu;
                                if (a) {
                                        while (a) {
-                                               if (BEZSELECTED_HIDDENHANDLES(cu, bezt) ) ;
-                                               else break;
+                                               if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
+                                                       /* pass */
+                                               }
+                                               else {
+                                                       break;
+                                               }
                                                a--;
                                                bezt++;
                                        }
@@ -5704,8 +5749,12 @@ static int delete_exec(bContext *C, wmOperator *op)
                                a = nu->pntsu * nu->pntsv;
                                if (a) {
                                        while (a) {
-                                               if (bp->f1 & SELECT) ;
-                                               else break;
+                                               if (bp->f1 & SELECT) {
+                                                       /* pass */
+                                               }
+                                               else {
+                                                       break;
+                                               }
                                                a--;
                                                bp++;
                                        }
index 2c00e39..df18498 100644 (file)
@@ -1152,9 +1152,15 @@ static void ui_is_but_sel(uiBut *but, double *value)
                }
        }
        
-       if (is_push == 2) ;
-       else if (is_push == 1) but->flag |= UI_SELECT;
-       else but->flag &= ~UI_SELECT;
+       if (is_push == 2) {
+               /* pass */
+       }
+       else if (is_push == 1) {
+               but->flag |= UI_SELECT;
+       }
+       else {
+               but->flag &= ~UI_SELECT;
+       }
 }
 
 static uiBut *ui_find_inlink(uiBlock *block, void *poin)
index 60e4c2a..f798f0b 100644 (file)
@@ -704,7 +704,9 @@ static int ui_but_mouse_inside_icon(uiBut *but, ARegion *ar, wmEvent *event)
        
        BLI_rcti_rctf_copy(&rect, &but->rect);
        
-       if (but->imb) ;  /* use button size itself */
+       if (but->imb) { 
+               /* use button size itself */
+       }
        else if (but->flag & UI_ICON_LEFT) {
                rect.xmax = rect.xmin + (BLI_rcti_size_y(&rect));
        }
@@ -1184,7 +1186,9 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
        /* numeric value */
        if (ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI)) {
                
-               if (but->poin == NULL && but->rnapoin.data == NULL) ;
+               if (but->poin == NULL && but->rnapoin.data == NULL) {
+                       /* pass */
+               }
                else if (mode == 'c') {
                        ui_get_but_string(but, buf, sizeof(buf));
                        WM_clipboard_text_set(buf, 0);
@@ -1205,7 +1209,9 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
        else if (but->type == COLOR) {
                float rgb[3];
                
-               if (but->poin == NULL && but->rnapoin.data == NULL) ;
+               if (but->poin == NULL && but->rnapoin.data == NULL) {
+                       /* pass */
+               }
                else if (mode == 'c') {
 
                        ui_get_but_vectorf(but, rgb);
@@ -1234,7 +1240,9 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
        else if (ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
                uiHandleButtonData *active_data = but->active;
 
-               if (but->poin == NULL && but->rnapoin.data == NULL) ;
+               if (but->poin == NULL && but->rnapoin.data == NULL) {
+                       /* pass */
+               }
                else if (mode == 'c') {
                        button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
                        BLI_strncpy(buf, active_data->str, UI_MAX_DRAW_STR);
@@ -2297,7 +2305,9 @@ static int ui_do_but_TEX(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
 {
        if (data->state == BUTTON_STATE_HIGHLIGHT) {
                if (ELEM(event->type, LEFTMOUSE, EVT_BUT_OPEN) && event->val == KM_PRESS) {
-                       if (but->dt == UI_EMBOSSN && !event->ctrl) ;
+                       if (but->dt == UI_EMBOSSN && !event->ctrl) {
+                               /* pass */
+                       }
                        else {
                                button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
                                return WM_UI_HANDLER_BREAK;
index d692bf8..8e30b31 100644 (file)
@@ -2516,8 +2516,12 @@ static void ui_item_align(uiLayout *litem, short nr)
                                if (!bitem->but->alignnr)
                                        bitem->but->alignnr = nr;
                }
-               else if (item->type == ITEM_LAYOUT_ABSOLUTE) ;
-               else if (item->type == ITEM_LAYOUT_OVERLAP) ;
+               else if (item->type == ITEM_LAYOUT_ABSOLUTE) {
+                       /* pass */
+               }
+               else if (item->type == ITEM_LAYOUT_OVERLAP) {
+                       /* pass */
+               }
                else if (item->type == ITEM_LAYOUT_BOX) {
                        box = (uiLayoutItemBx *)item;
                        box->roundbox->alignnr = nr;
index 3fc2030..0e1fd87 100644 (file)
@@ -891,8 +891,8 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect
        
        /* calculate blend color */
        if (ELEM4(but->type, TOG, ROW, TOGN, LISTROW)) {
-               if (but->flag & UI_SELECT) ;
-               else if (but->flag & UI_ACTIVE) ;
+               if (but->flag & UI_SELECT) {}
+               else if (but->flag & UI_ACTIVE) {}
                else alpha = 0.5f;
        }
        
index 5fd848c..429b214 100644 (file)
@@ -214,7 +214,9 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind
                /* fill array by selection */
                mp = me->mpoly;
                for (a = 0; a < me->totpoly; a++, mp++) {
-                       if (mp->flag & ME_HIDE) ;
+                       if (mp->flag & ME_HIDE) {
+                               /* pass */
+                       }
                        else if (mp->flag & ME_FACE_SEL) {
                                hash_add_face(ehash, mp, me->mloop + mp->loopstart);
                                linkflag[a] = 1;
@@ -572,7 +574,9 @@ int do_paintface_box_select(ViewContext *vc, rcti *rect, int select, int extend)
        mpoly = me->mpoly;
        for (a = 1; a <= me->totpoly; a++, mpoly++) {
                if (selar[a]) {
-                       if (mpoly->flag & ME_HIDE) ;
+                       if (mpoly->flag & ME_HIDE) {
+                               /* pass */
+                       }
                        else {
                                if (select) mpoly->flag |= ME_FACE_SEL;
                                else mpoly->flag &= ~ME_FACE_SEL;
index ee2b5e0..dc490c9 100644 (file)
@@ -3989,7 +3989,9 @@ void PE_undo_step(Scene *scene, int step)
        }
        else if (step==1) {
                
-               if (edit->curundo==NULL || edit->curundo->prev==NULL);
+               if (edit->curundo==NULL || edit->curundo->prev==NULL) {
+                       /* pass */
+               }
                else {
                        if (G.debug & G_DEBUG) printf("undo %s\n", edit->curundo->name);
                        edit->curundo= edit->curundo->prev;
@@ -3999,7 +4001,9 @@ void PE_undo_step(Scene *scene, int step)
        else {
                /* curundo has to remain current situation! */
                
-               if (edit->curundo==NULL || edit->curundo->next==NULL);
+               if (edit->curundo==NULL || edit->curundo->next==NULL) {
+                       /* pass */
+               }
                else {
                        get_PTCacheUndo(edit, edit->curundo->next);
                        edit->curundo= edit->curundo->next;
index 08ccf37..cd55b91 100644 (file)
@@ -224,8 +224,12 @@ static void material_changed(Main *bmain, Material *ma)
 
        /* find node materials using this */
        for (parent = bmain->mat.first; parent; parent = parent->id.next) {
-               if (parent->use_nodes && parent->nodetree && nodes_use_material(parent->nodetree, ma)) ;
-               else continue;
+               if (parent->use_nodes && parent->nodetree && nodes_use_material(parent->nodetree, ma)) {
+                       /* pass */
+               }
+               else {
+                       continue;
+               }
 
                BKE_icon_changed(BKE_icon_getid(&parent->id));
 
@@ -247,9 +251,15 @@ static void texture_changed(Main *bmain, Tex *tex)
 
        /* find materials */
        for (ma = bmain->mat.first; ma; ma = ma->id.next) {
-               if (mtex_use_tex(ma->mtex, MAX_MTEX, tex)) ;
-               else if (ma->use_nodes && ma->nodetree && nodes_use_tex(ma->nodetree, tex)) ;
-               else continue;
+               if (mtex_use_tex(ma->mtex, MAX_MTEX, tex)) {
+                       /* pass */
+               }
+               else if (ma->use_nodes && ma->nodetree && nodes_use_tex(ma->nodetree, tex)) {
+                       /* pass */
+               }
+               else {
+                       continue;
+               }
 
                BKE_icon_changed(BKE_icon_getid(&ma->id));
 
@@ -259,18 +269,30 @@ static void texture_changed(Main *bmain, Tex *tex)
 
        /* find lamps */
        for (la = bmain->lamp.first; la; la = la->id.next) {
-               if (mtex_use_tex(la->mtex, MAX_MTEX, tex)) ;
-               else if (la->nodetree && nodes_use_tex(la->nodetree, tex)) ;
-               else continue;
+               if (mtex_use_tex(la->mtex, MAX_MTEX, tex)) {
+                       /* pass */
+               }
+               else if (la->nodetree && nodes_use_tex(la->nodetree, tex)) {
+                       /* pass */
+               }
+               else {
+                       continue;
+               }
 
                BKE_icon_changed(BKE_icon_getid(&la->id));
        }
 
        /* find worlds */
        for (wo = bmain->world.first; wo; wo = wo->id.next) {
-               if (mtex_use_tex(wo->mtex, MAX_MTEX, tex)) ;
-               else if (wo->nodetree && nodes_use_tex(wo->nodetree, tex)) ;
-               else continue;
+               if (mtex_use_tex(wo->mtex, MAX_MTEX, tex)) {
+                       /* pass */
+               }
+               else if (wo->nodetree && nodes_use_tex(wo->nodetree, tex)) {
+                       /* pass */
+               }
+               else {
+                       continue;
+               }
 
                BKE_icon_changed(BKE_icon_getid(&wo->id));
        }
index 01a5304..7c377a0 100644 (file)
@@ -407,8 +407,12 @@ void region_scissor_winrct(ARegion *ar, rcti *winrct)
                ar = ar->prev;
                
                if (BLI_rcti_isect(winrct, &ar->winrct, NULL)) {
-                       if (ar->flag & RGN_FLAG_HIDDEN) ;
-                       else if (ar->alignment & RGN_SPLIT_PREV) ;
+                       if (ar->flag & RGN_FLAG_HIDDEN) {
+                               /* pass */
+                       }
+                       else if (ar->alignment & RGN_SPLIT_PREV) {
+                               /* pass */
+                       }
                        else if (ar->alignment == RGN_OVERLAP_LEFT) {
                                winrct->xmin = ar->winrct.xmax + 1;
                        }
@@ -935,20 +939,25 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
        
        /* prefsize, for header we stick to exception */
        prefsizex = ar->sizex ? ar->sizex : ar->type->prefsizex;
-       if (ar->regiontype == RGN_TYPE_HEADER)
+       if (ar->regiontype == RGN_TYPE_HEADER) {
                prefsizey = ar->type->prefsizey;
+       }
        else if (ar->regiontype == RGN_TYPE_UI && sa->spacetype == SPACE_FILE) {
                prefsizey = UI_UNIT_Y * 2 + (UI_UNIT_Y / 2);
        }
-       else
+       else {
                prefsizey = ar->sizey ? ar->sizey : ar->type->prefsizey;
-       
-       /* hidden is user flag */
-       if (ar->flag & RGN_FLAG_HIDDEN) ;
-       /* XXX floating area region, not handled yet here */
-       else if (alignment == RGN_ALIGN_FLOAT) ;
-       /* remainder is too small for any usage */
+       }
+
+
+       if (ar->flag & RGN_FLAG_HIDDEN) {
+               /* hidden is user flag */
+       }
+       else if (alignment == RGN_ALIGN_FLOAT) {
+               /* XXX floating area region, not handled yet here */
+       }
        else if (rct_fits(remainder, 'v', 1) < 0 || rct_fits(remainder, 'h', 1) < 0) {
+               /* remainder is too small for any usage */
                ar->flag |= RGN_FLAG_TOO_SMALL;
        }
        else if (alignment == RGN_ALIGN_NONE) {
index f5b9aa7..e406d4f 100644 (file)
@@ -152,7 +152,9 @@ static int undo_stack_step(bContext *C, UndoStack *stack, int step, const char *
        UndoElem *undo;
 
        if (step == 1) {
-               if (stack->current == NULL) ;
+               if (stack->current == NULL) {
+                       /* pass */
+               }
                else {
                        if (!name || strcmp(stack->current->name, name) == 0) {
                                if (G.debug & G_DEBUG_WM) {
@@ -165,7 +167,9 @@ static int undo_stack_step(bContext *C, UndoStack *stack, int step, const char *
                }
        }
        else if (step == -1) {
-               if ((stack->current != NULL && stack->current->next == NULL) || stack->elems.first == NULL) ;
+               if ((stack->current != NULL && stack->current->next == NULL) || stack->elems.first == NULL) {
+                       /* pass */
+               }
                else {
                        if (!name || strcmp(stack->current->name, name) == 0) {
                                undo = (stack->current && stack->current->next) ? stack->current->next : stack->elems.first;
@@ -254,7 +258,9 @@ int ED_undo_paint_valid(int type, const char *name)
        else 
                return 0;
        
-       if (stack->current == NULL) ;
+       if (stack->current == NULL) {
+               /* pass */
+       }
        else {
                if (name && strcmp(stack->current->name, name) == 0)
                        return 1;
index d3b4df0..ce522ec 100644 (file)
@@ -748,7 +748,9 @@ static int file_is_blend_backup(const char *str)
        a = strlen(str);
        b = 7;
        
-       if (a == 0 || b >= a) ;
+       if (a == 0 || b >= a) {
+               /* pass */
+       }
        else {
                char *loc;
                
index 31cb6d9..7f53f37 100644 (file)
@@ -414,8 +414,9 @@ static void image_refresh(const bContext *C, ScrArea *sa)
                                        /* don't need to check for pin here, see above */
                                        sima->image = tf->tpage;
                                        
-                                       if (sima->flag & SI_EDITTILE) ;
-                                       else sima->curtile = tf->tile;
+                                       if ((sima->flag & SI_EDITTILE) == 0) {
+                                               sima->curtile = tf->tile;
+                                       }
                                }
                        }
                }
index a055884..e8aa01a 100644 (file)
@@ -783,7 +783,9 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo
                                wmKeyMapItem *kmi = te->directdata;
                                
                                /* modal map? */
-                               if (kmi->propvalue) ;
+                               if (kmi->propvalue) {
+                                       /* pass */
+                               }
                                else {
                                        uiDefBlockBut(block, operator_search_menu, kmi, "", xstart, (int)te->ys + 1, butw1, UI_UNIT_Y - 1, "Assign new Operator");
                                }
@@ -1409,11 +1411,15 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
                /* closed item, we draw the icons, not when it's a scene, or master-server list though */
                if (!TSELEM_OPEN(tselem, soops)) {
                        if (te->subtree.first) {
-                               if (tselem->type == 0 && te->idcode == ID_SCE) ;
-                               else if (tselem->type != TSE_R_LAYER) { /* this tree element always has same amount of branches, so don't draw */
+                               if (tselem->type == 0 && te->idcode == ID_SCE) {
+                                       /* pass */
+                               }
+                               else if (tselem->type != TSE_R_LAYER) {
+                                       /* this tree element always has same amount of branches, so don't draw */
+
                                        int tempx = startx + offsx;
                                        
-                                       // divider
+                                       /* divider */
                                        UI_ThemeColorShade(TH_BACK, -40);
                                        glRecti(tempx - 10, *starty + 4, tempx - 8, *starty + UI_UNIT_Y - 4);
                                        
index 3e1ce1f..ef05421 100644 (file)
@@ -769,7 +769,9 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
                        else {
                                /* do not extend Armature when we have posemode */
                                tselem = TREESTORE(te->parent);
-                               if (GS(tselem->id->name) == ID_OB && ((Object *)tselem->id)->mode & OB_MODE_POSE) ;
+                               if (GS(tselem->id->name) == ID_OB && ((Object *)tselem->id)->mode & OB_MODE_POSE) {
+                                       /* pass */
+                               }
                                else {
                                        Bone *curBone;
                                        for (curBone = arm->bonebase.first; curBone; curBone = curBone->next) {
@@ -811,9 +813,15 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
        
        te->parent = parent;
        te->index = index;   // for data arays
-       if (ELEM3(type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP)) ;
-       else if (ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) ;
-       else if (type == TSE_ANIM_DATA) ;
+       if (ELEM3(type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP)) {
+               /* pass */
+       }
+       else if (ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
+               /* pass */
+       }
+       else if (type == TSE_ANIM_DATA) {
+               /* pass */
+       }
        else {
                te->name = id->name + 2; // default, can be overridden by Library or non-ID data
                te->idcode = GS(id->name);
@@ -1055,8 +1063,12 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
                                if (key[0]) {
                                        wmOperatorType *ot = NULL;
                                        
-                                       if (kmi->propvalue) ;
-                                       else ot = WM_operatortype_find(kmi->idname, 0);
+                                       if (kmi->propvalue) {
+                                               /* pass */
+                                       }
+                                       else {
+                                               ot = WM_operatortype_find(kmi->idname, 0);
+                                       }
                                        
                                        if (ot || kmi->propvalue) {
                                                TreeElement *ten = outliner_add_element(soops, &te->subtree, kmi, te, TSE_KEYMAP_ITEM, a);
index 204930e..459a8d5 100644 (file)
@@ -579,7 +579,9 @@ static Sequence *del_seq_find_replace_recurs(Scene *scene, Sequence *seq)
                seq2 = del_seq_find_replace_recurs(scene, seq->seq2);
                seq3 = del_seq_find_replace_recurs(scene, seq->seq3);
 
-               if (seq1 == seq->seq1 && seq2 == seq->seq2 && seq3 == seq->seq3) ;
+               if (seq1 == seq->seq1 && seq2 == seq->seq2 && seq3 == seq->seq3) {
+                       /* pass */
+               }
                else if (seq1 || seq2 || seq3) {
                        seq->seq1 = (seq1) ? seq1 : (seq2) ? seq2 : seq3;
                        seq->seq2 = (seq2) ? seq2 : (seq1) ? seq1 : seq3;
index ecce12b..31df133 100644 (file)
@@ -2226,9 +2226,16 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt)
        }
        
        /* restore */
-       if (index != -1) glLoadName(-1);
-       if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) ;
-       else if (dt > OB_WIRE) bglPolygonOffset(rv3d->dist, 0.0f);
+       if (index != -1) {
+               glLoadName(-1);
+       }
+
+       if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) {
+               /* pass */
+       }
+       else if (dt > OB_WIRE) {
+               bglPolygonOffset(rv3d->dist, 0.0f);
+       }
        
        /* finally names and axes */
        if (arm->flag & (ARM_DRAWNAMES | ARM_DRAWAXES)) {
index ca768f2..00d35a5 100644 (file)
@@ -355,7 +355,9 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char **
                                if (dx < GRID_MIN_PX_D) {
                                        rv3d->gridview *= sublines;
                                        dx *= sublines;
-                                       if (dx < GRID_MIN_PX_D) ;
+                                       if (dx < GRID_MIN_PX_D) {
+                                               /* pass */
+                                       }
                                        else {
                                                UI_ThemeColor(TH_GRID);
                                                drawgrid_draw(ar, wx, wy, x, y, dx);
index 39a5da9..2e9d1ee 100644 (file)
@@ -3986,13 +3986,13 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
                        *flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL | SEQ_RIGHTSEL);
 
                        if (t->frame_side == 'R') {
-                               if      (right <= cfra) *count = *flag = 0;  /* ignore */
-                               else if (left   > cfra) ;                  /* keep the selection */
+                               if      (right <= cfra) { *count = *flag = 0; }  /* ignore */
+                               else if (left   > cfra) {                     }  /* keep the selection */
                                else *flag |= SEQ_RIGHTSEL;
                        }
                        else {
-                               if      (left >= cfra) *count = *flag = 0;  /* ignore */
-                               else if (right < cfra) ;                   /* keep the selection */
+                               if      (left >= cfra) { *count = *flag = 0; }  /* ignore */
+                               else if (right < cfra) {                     }  /* keep the selection */
                                else *flag |= SEQ_LEFTSEL;
                        }
                }
index 494cb87..079f276 100644 (file)
@@ -485,11 +485,15 @@ static int preprocess_include(char *maindata, int len)
                }
 
                /* do not copy when: */
-               if (comment) ;
-               else if (cp[0] == ' ' && cp[1] == ' ') ;
-               else if (cp[-1] == '*' && cp[0] == ' ') ;  /* pointers with a space */
-
-               /* skip special keywords */
+               if (comment) {
+                       /* pass */
+               }
+               else if (cp[0] == ' ' && cp[1] == ' ') {
+                       /* pass */
+               }
+               else if (cp[-1] == '*' && cp[0] == ' ') {
+                       /* pointers with a space */
+               }       /* skip special keywords */
                else if (strncmp("DNA_DEPRECATED", cp, 14) == 0) {
                        /* single values are skipped already, so decrement 1 less */
                        a -= 13;
@@ -1028,7 +1032,9 @@ static int make_structDNA(char *baseDirectory, FILE *file)
 
        if (debugSDNA > -1) printf("Writing file ... ");
                
-       if (nr_names == 0 || nr_structs == 0) ;
+       if (nr_names == 0 || nr_structs == 0) {
+               /* pass */
+       }
        else {
                strcpy(str, "SDNA");
                dna_write(file, str, 4);
index ce22bc0..fdd3b97 100644 (file)
@@ -65,7 +65,7 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(o
                        tex_input_rgba(&target->tr, in[0], &params, cdata->thread);
                
                        target->tin = (target->tr + target->tg + target->tb) / 3.0f;
-                       target->talpha = 1;
+                       target->talpha = TRUE;
                
                        if (target->nor) {
                                if (in[1] && in[1]->hasinput)
index b394856..46ab3ae 100644 (file)
@@ -4106,8 +4106,12 @@ static void set_fullsample_trace_flag(Render *re, ObjectRen *obr)
                                vlr->flag |= R_FULL_OSA;
                        }
                        else if (trace) {
-                               if (mode & MA_SHLESS);
-                               else if (vlr->mat->material_type == MA_TYPE_VOLUME);
+                               if (mode & MA_SHLESS) {
+                                       /* pass */
+                               }
+                               else if (vlr->mat->material_type == MA_TYPE_VOLUME) {
+                                       /* pass */
+                               }
                                else if ((mode & MA_RAYMIRROR) || ((mode & MA_TRANSP) && (mode & MA_RAYTRANSP))) {
                                        /* for blurry reflect/refract, better to take more samples 
                                         * inside the raytrace than as OSA samples */
index 6c86f2a..154292a 100644 (file)
@@ -150,8 +150,13 @@ int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], TexResul
                fx-= xs;
                fy-= ys;
 
-               if ( (tex->flag & TEX_CHECKER_ODD)==0) {
-                       if ((xs+ys) & 1);else return retval;
+               if ( (tex->flag & TEX_CHECKER_ODD) == 0) {
+                       if ((xs + ys) & 1) {
+                               /* pass */
+                       }
+                       else {
+                               return retval;
+                       }
                }
                if ( (tex->flag & TEX_CHECKER_EVEN)==0) {
                        if ((xs+ys) & 1) return retval;
@@ -474,7 +479,9 @@ static void boxsampleclip(struct ImBuf *ibuf, rctf *rf, TexResult *texres)
                        
                        muly= 1.0;
 
-                       if (starty==endy);
+                       if (starty==endy) {
+                               /* pass */
+                       }
                        else {
                                if (y==starty) muly= 1.0f-(rf->ymin - y);
                                if (y==endy) muly= (rf->ymax - y);
@@ -1453,8 +1460,12 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], const
        image_mipmap_test(tex, ibuf);
 
        if (tex->imaflag & TEX_USEALPHA) {
-               if (tex->imaflag & TEX_CALCALPHA);
-               else texres->talpha= 1;
+               if (tex->imaflag & TEX_CALCALPHA) {
+                       /* pass */
+               }
+               else {
+                       texres->talpha = TRUE;
+               }
        }
        
        texr.talpha= texres->talpha;
@@ -1550,11 +1561,17 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], const
 
                        if (boundary==0) {
                                if ( (tex->flag & TEX_CHECKER_ODD)==0) {
-                                       if ((xs+ys) & 1);
-                                       else return retval;
+                                       if ((xs + ys) & 1) {
+                                               /* pass */
+                                       }
+                                       else {
+                                               return retval;
+                                       }
                                }
                                if ( (tex->flag & TEX_CHECKER_EVEN)==0) {
-                                       if ((xs+ys) & 1) return retval;
+                                       if ((xs + ys) & 1) {
+                                               return retval;
+                                       }
                                }
                                fx-= xs;
                                fy-= ys;
index af774c5..895c5d6 100644 (file)
@@ -625,9 +625,12 @@ static void occ_build_sh_normalize(OccNode *node)
                sh_mul(node->sh, 1.0f / node->area);
 
        for (b = 0; b < TOTCHILD; b++) {
-               if (node->childflag & (1 << b)) ;
-               else if (node->child[b].node)
+               if (node->childflag & (1 << b)) {
+                       /* pass */
+               }
+               else if (node->child[b].node) {
                        occ_build_sh_normalize(node->child[b].node);
+               }
        }
 }
 
index b1b88fc..b64a6b8 100644 (file)
@@ -505,7 +505,9 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, SceneRenderLayer *
        BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
 
        if (re->r.scemode & R_PREVIEWBUTS) {
-               if (re->result && re->result->rectx == re->rectx && re->result->recty == re->recty) ;
+               if (re->result && re->result->rectx == re->rectx && re->result->recty == re->recty) {
+                       /* pass */
+               }
                else {
                        render_result_free(re->result);
                        re->result = NULL;
@@ -654,8 +656,12 @@ static void *do_part_thread(void *pa_v)
                }
                else if (render_display_draw_enabled(&R)) {
                        /* on break, don't merge in result for preview renders, looks nicer */
-                       if (R.test_break(R.tbh) && (R.r.scemode & R_PREVIEWBUTS)) ;
-                       else render_result_merge(R.result, pa->result);
+                       if (R.test_break(R.tbh) && (R.r.scemode & R_PREVIEWBUTS)) {
+                               /* pass */
+                       }
+                       else {
+                               render_result_merge(R.result, pa->result);
+                       }
                }
        }
        
index 49c2bf1..a93dde7 100644 (file)
@@ -481,7 +481,7 @@ int pointdensitytex(Tex *tex, float *texvec, TexResult *texres)
                case TEX_PD_COLOR_PARTAGE:
                        if (pd->coba) {
                                if (do_colorband(pd->coba, age, col)) {
-                                       texres->talpha= 1;
+                                       texres->talpha = TRUE;
                                        copy_v3_v3(&texres->tr, col);
                                        texres->tin *= col[3];
                                        texres->ta = texres->tin;
@@ -494,7 +494,7 @@ int pointdensitytex(Tex *tex, float *texvec, TexResult *texres)
                        
                        if (pd->coba) {
                                if (do_colorband(pd->coba, speed, col)) {
-                                       texres->talpha= 1;      
+                                       texres->talpha = TRUE;
                                        copy_v3_v3(&texres->tr, col);
                                        texres->tin *= col[3];
                                        texres->ta = texres->tin;
@@ -503,7 +503,7 @@ int pointdensitytex(Tex *tex, float *texvec, TexResult *texres)
                        break;
                }
                case TEX_PD_COLOR_PARTVEL:
-                       texres->talpha= 1;
+                       texres->talpha = TRUE;
                        mul_v3_fl(vec, pd->speed_scale);
                        copy_v3_v3(&texres->tr, vec);
                        texres->ta = texres->tin;
index 982f7e7..0511b03 100644 (file)
@@ -887,12 +887,12 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, const float n[3],
                        fx = (t[0] + 1.0f) / 2.0f;
                        fy = (t[1] + 1.0f) / 2.0f;
                }
-               else if (wrap==MTEX_TUBE) map_to_tube( &fx, &fy, t[0], t[1], t[2]);
-               else if (wrap==MTEX_SPHERE) map_to_sphere(&fx, &fy, t[0], t[1], t[2]);
+               else if (wrap == MTEX_TUBE)   map_to_tube( &fx, &fy, t[0], t[1], t[2]);
+               else if (wrap == MTEX_SPHERE) map_to_sphere(&fx, &fy, t[0], t[1], t[2]);
                else {
-                       if (texco==TEXCO_OBJECT) cubemap_ob(ob, n, t[0], t[1], t[2], &fx, &fy);
-                       else if (texco==TEXCO_GLOB) cubemap_glob(n, t[0], t[1], t[2], &fx, &fy);
-                       else cubemap(mtex, vlr, n, t[0], t[1], t[2], &fx, &fy);
+                       if      (texco == TEXCO_OBJECT) cubemap_ob(ob, n, t[0], t[1], t[2], &fx, &fy);
+                       else if (texco == TEXCO_GLOB)   cubemap_glob(n, t[0], t[1], t[2], &fx, &fy);
+                       else                            cubemap(mtex, vlr, n, t[0], t[1], t[2], &fx, &fy);
                }
                
                /* repeat */
@@ -953,10 +953,17 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, const float n[3],
                        if (t[1]<=0.0f) {
                                fx= t[0]+dxt[0];
                                fy= t[0]+dyt[0];
-                               if (fx>=0.0f && fy>=0.0f && t[0]>=0.0f);
-                               else if (fx<=0.0f && fy<=0.0f && t[0]<=0.0f);
-                               else ok= 0;
+                               if (fx>=0.0f && fy>=0.0f && t[0]>=0.0f) {
+                                       /* pass */
+                               }
+                               else if (fx<=0.0f && fy<=0.0f && t[0]<=0.0f) {
+                                       /* pass */
+                               }
+                               else {
+                                       ok = 0;
+                               }
                        }
+
                        if (ok) {
                                if (wrap==MTEX_TUBE) {
                                        map_to_tube(area, area+1, t[0], t[1], t[2]);
@@ -1096,7 +1103,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
        float tmpvec[3];
        int retval=0; /* return value, int:0, col:1, nor:2, everything:3 */
 
-       texres->talpha= 0;      /* is set when image texture returns alpha (considered premul) */
+       texres->talpha = FALSE;  /* is set when image texture returns alpha (considered premul) */
        
        if (tex->use_nodes && tex->nodetree) {
                retval = ntreeTexExecTree(tex->nodetree, texres, texvec, dxt, dyt, osatex, thread,
@@ -1193,7 +1200,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
        if (tex->flag & TEX_COLORBAND) {
                float col[4];
                if (do_colorband(tex->coba, texres->tin, col)) {
-                       texres->talpha= 1;
+                       texres->talpha = TRUE;
                        texres->tr= col[0];
                        texres->tg= col[1];
                        texres->tb= col[2];
@@ -2445,7 +2452,9 @@ void do_material_tex(ShadeInput *shi, Render *re)
 
                                                        copy_v3_v3(nor, texres.nor);
 
-                                                       if (mtex->normapspace == MTEX_NSPACE_CAMERA);
+                                                       if (mtex->normapspace == MTEX_NSPACE_CAMERA) {
+                                                               /* pass */
+                                                       }
                                                        else if (mtex->normapspace == MTEX_NSPACE_WORLD) {
                                                                mul_mat3_m4_v3(re->viewmat, nor);
                                                        }
@@ -2922,10 +2931,14 @@ void do_halo_tex(HaloRen *har, float xn, float yn, float col_r[4])
        }
        if (mtex->mapto & MAP_ALPHA) {
                if (rgb) {
-                       if (texres.talpha) texres.tin= texres.ta;
-                       else texres.tin = rgb_to_bw(&texres.tr);
+                       if (texres.talpha) {
+                               texres.tin = texres.ta;
+                       }
+                       else {
+                               texres.tin = rgb_to_bw(&texres.tr);
+                       }
                }
-                               
+
                col_r[3]*= texres.tin;
        }
 }
index 0d89407..285cd02 100644 (file)
@@ -271,16 +271,26 @@ static void halo_tile(RenderPart *pa, RenderLayer *rl)
                har= R.sortedhalos[a];
 
                /* layer test, clip halo with y */
-               if ((har->lay & lay)==0);
-               else if (testrect.ymin > har->maxy);
-               else if (testrect.ymax < har->miny);
+               if ((har->lay & lay) == 0) {
+                       /* pass */
+               }
+               else if (testrect.ymin > har->maxy) {
+                       /* pass */
+               }
+               else if (testrect.ymax < har->miny) {
+                       /* pass */
+               }
                else {
                        
                        minx= floor(har->xs-har->rad);
                        maxx= ceil(har->xs+har->rad);
                        
-                       if (testrect.xmin > maxx);
-                       else if (testrect.xmax < minx);
+                       if (testrect.xmin > maxx) {
+                               /* pass */
+                       }
+                       else if (testrect.xmax < minx) {
+                               /* pass */
+                       }
                        else {
                                
                                minx= MAX2(minx, testrect.xmin);
@@ -980,7 +990,9 @@ static void convert_to_key_alpha(RenderPart *pa, RenderLayer *rl)
                float *rectf= rlpp[sample]->rectf;
                
                for (y= pa->rectx*pa->recty; y>0; y--, rectf+=4) {
-                       if (rectf[3] >= 1.0f);
+                       if (rectf[3] >= 1.0f) {
+                               /* pass */
+                       }
                        else if (rectf[3] > 0.0f) {
                                rectf[0] /= rectf[3];
                                rectf[1] /= rectf[3];
@@ -1833,16 +1845,23 @@ static void renderhalo_post(RenderResult *rr, float *rectf, HaloRen *har)       /* pos
        har->miny= miny= haloys - har->rad/R.ycor;
        har->maxy= maxy= haloys + har->rad/R.ycor;
        
-       if (maxy<0);
-       else if (rr->recty<miny);
+       if (maxy < 0) {
+               /* pass */
+       }
+       else if (rr->recty < miny) {
+               /* pass */
+       }
        else {
-               minx= floor(haloxs-har->rad);
-               maxx= ceil(haloxs+har->rad);
+               minx = floor(haloxs - har->rad);
+               maxx = ceil(haloxs + har->rad);
                        
-               if (maxx<0);
-               else if (rr->rectx<minx);
+               if (maxx < 0) {
+                       /* pass */
+               }
+               else if (rr->rectx < minx) {
+                       /* pass */
+               }
                else {
-               
                        if (minx<0) minx= 0;
                        if (maxx>=rr->rectx) maxx= rr->rectx-1;
                        if (miny<0) miny= 0;
@@ -2099,7 +2118,9 @@ static void bake_shade(void *handle, Object *ob, ShadeInput *shi, int UNUSED(qua
 
                        copy_v3_v3(nor, shi->vn);
 
-                       if (R.r.bake_normal_space == R_BAKE_SPACE_CAMERA);
+                       if (R.r.bake_normal_space == R_BAKE_SPACE_CAMERA) {
+                               /* pass */
+                       }
                        else if (R.r.bake_normal_space == R_BAKE_SPACE_TANGENT) {
                                float mat[3][3], imat[3][3];
 
index 6395a04..172af3a 100644 (file)
@@ -976,10 +976,13 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma,
 
        if (ma->mtex[0]) {
 
-               if ( (ma->mode & MA_HALOTEX) ) har->tex= 1;
-               else if (har->mat->septex & (1<<0));    /* only 1 level textures */
+               if (ma->mode & MA_HALOTEX) {
+                       har->tex = 1;
+               }
+               else if (har->mat->septex & (1 << 0)) {
+                       /* only 1 level textures */
+               }
                else {
-
                        mtex= ma->mtex[0];
                        copy_v3_v3(texvec, vec);
 
index 6883710..873657e 100644 (file)
@@ -123,30 +123,45 @@ float mistfactor(float zcor, float const co[3])
 {
        float fac, hi;
        
-       fac= zcor - R.wrld.miststa;     /* zcor is calculated per pixel */
+       fac = zcor - R.wrld.miststa;    /* zcor is calculated per pixel */
 
        /* fac= -co[2]-R.wrld.miststa; */
 
-       if (fac>0.0f) {
-               if (fac< R.wrld.mistdist) {
+       if (fac > 0.0f) {
+               if (fac < R.wrld.mistdist) {
                        
-                       fac= (fac/(R.wrld.mistdist));
+                       fac = (fac / R.wrld.mistdist);
                        
-                       if (R.wrld.mistype==0) fac*= fac;
-                       else if (R.wrld.mistype==1);
-                       else fac= sqrt(fac);
+                       if (R.wrld.mistype == 0) {
+                               fac *= fac;
+                       }
+                       else if (R.wrld.mistype == 1) {
+                               /* pass */
+                       }
+                       else {
+                               fac = sqrt(fac);
+                       }
+               }
+               else {
+                       fac = 1.0f;
                }
-               else fac= 1.0f;
        }
-       else fac= 0.0f;
+       else {
+               fac = 0.0f;
+       }
        
        /* height switched off mist */
        if (R.wrld.misthi!=0.0f && fac!=0.0f) {
                /* at height misthi the mist is completely gone */
 
-               hi= R.viewinv[0][2]*co[0]+R.viewinv[1][2]*co[1]+R.viewinv[2][2]*co[2]+R.viewinv[3][2];
+               hi = R.viewinv[0][2] * co[0] +
+                    R.viewinv[1][2] * co[1] +
+                    R.viewinv[2][2] * co[2] +
+                    R.viewinv[3][2];
                
-               if (hi>R.wrld.misthi) fac= 0.0f;
+               if (hi > R.wrld.misthi) {
+                       fac = 0.0f;
+               }
                else if (hi>0.0f) {
                        hi= (R.wrld.misthi-hi)/R.wrld.misthi;
                        fac*= hi*hi;
@@ -1351,7 +1366,9 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
        /* this complex construction screams for a nicer implementation! (ton) */
        if (R.r.mode & R_SHADOW) {
                if (ma->mode & MA_SHADOW) {
-                       if (lar->type==LA_HEMI || lar->type==LA_AREA);
+                       if (lar->type == LA_HEMI || lar->type == LA_AREA) {
+                               /* pass */
+                       }
                        else if ((ma->mode & MA_RAYBIAS) && (lar->mode & LA_SHAD_RAY) && (vlr->flag & R_SMOOTH)) {
                                float thresh= shi->obr->ob->smoothresh;
                                if (inp>thresh)
@@ -1466,8 +1483,10 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
                
                if (shadfac[3]>0.0f && shi->spec!=0.0f && !(lar->mode & LA_NO_SPEC) && !(lar->mode & LA_ONLYSHADOW)) {
                        
-                       if (!(passflag & (SCE_PASS_COMBINED|SCE_PASS_SPEC)));
-                       else if (lar->type==LA_HEMI) {
+                       if (!(passflag & (SCE_PASS_COMBINED | SCE_PASS_SPEC))) {
+                               /* pass */
+                       }
+                       else if (lar->type == LA_HEMI) {
                                float t;
                                /* hemi uses no spec shaders (yet) */
                                
index 69e738e..9b7a521 100644 (file)
@@ -238,7 +238,9 @@ static void approximate_Rd_rgb(ScatterSettings **ss, float rr, float *rd)
        float indexf, t, idxf;
        int index;
 
-       if (rr > (RD_TABLE_RANGE_2*RD_TABLE_RANGE_2));
+       if (rr > (RD_TABLE_RANGE_2 * RD_TABLE_RANGE_2)) {
+               /* pass */
+       }
        else if (rr > RD_TABLE_RANGE) {
                rr= sqrt(rr);
                indexf= rr*(RD_TABLE_SIZE/RD_TABLE_RANGE_2);
index bf6962d..ba62baa 100644 (file)
@@ -2038,7 +2038,9 @@ static void zmask_rect(int *rectz, int *rectp, int xs, int ys, int neg)
 
        MEM_freeN(temprectp);
        
-       if (neg); /* z values for negative are already correct */
+       if (neg) {
+               /* z values for negative are already correct */
+       }
        else {
                /* clear not filled z values */
                for (len= xs*ys -1; len>=0; len--) {
index 2f238cd..ef9e25e 100644 (file)
@@ -255,8 +255,12 @@ void wm_event_do_notifiers(bContext *C)
                for (win = wm->windows.first; win; win = win->next) {
                        
                        /* filter out notifiers */
-                       if (note->category == NC_SCREEN && note->reference && note->reference != win->screen) ;
-                       else if (note->category == NC_SCENE && note->reference && note->reference != win->screen->scene) ;
+                       if (note->category == NC_SCREEN && note->reference && note->reference != win->screen) {
+                               /* pass */
+                       }
+                       else if (note->category == NC_SCENE && note->reference && note->reference != win->screen->scene) {
+                               /* pass */
+                       }
                        else {
                                ScrArea *sa;
                                ARegion *ar;
index 7b78dbe..c6bd912 100644 (file)
@@ -190,9 +190,12 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist)
        
        /* cases 1 and 2 */
        if (oldwmlist->first == NULL) {
-               if (G.main->wm.first) ;  /* nothing todo */
-               else
+               if (G.main->wm.first) {
+                       /* nothing todo */
+               }
+               else {
                        wm_add_default(C);
+               }
        }
        else {
                /* cases 3 and 4 */