style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Sat, 4 Aug 2012 12:30:16 +0000 (12:30 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 4 Aug 2012 12:30:16 +0000 (12:30 +0000)
25 files changed:
source/blender/blenkernel/intern/bmfont.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenlib/intern/string_utf8.c
source/blender/blenloader/intern/undofile.c
source/blender/bmesh/operators/bmo_create.c
source/blender/compositor/nodes/COM_DefocusNode.cpp
source/blender/compositor/operations/COM_BokehBlurOperation.cpp
source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
source/blender/editors/armature/editarmature.c
source/blender/editors/curve/editcurve.c
source/blender/editors/object/object_select.c
source/blender/editors/render/render_preview.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_graph/space_graph.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/gpu/intern/gpu_draw.c
source/blender/python/bmesh/bmesh_py_types.c
source/blender/render/intern/source/convertblender.c
source/blender/windowmanager/intern/wm_init_exit.c

index 722dc1834ddf8a60570d6e6d01dea1c32dbfb170..18161bc6fcbe8674b84abf9243ef9423353b86b7 100644 (file)
@@ -75,7 +75,7 @@ void calcAlpha(ImBuf * ibuf)
        
        if (ibuf) {
                rect = (char *) ibuf->rect;
-               for (i = ibuf->x * ibuf->y ; i > 0 ; i--) {
+               for (i = ibuf->x * ibuf->y; i > 0; i--) {
                        rect[3] = MAX3(rect[0], rect[1], rect[2]);
                        rect += 4;
                }
index e977b9389a3301616c76927558e7f0a1cc76f451..17d48841f957a656a1780d97b23338776d66cfeb 100644 (file)
@@ -851,7 +851,7 @@ makebreak:
                                        /* do nothing */
                                }
 
-//                             if ((mem[j]!='\r') && (mem[j]!='\n') && (mem[j])) {
+//                             if ((mem[j] != '\r') && (mem[j] != '\n') && (mem[j])) {
                                ct->xof += ct->charnr * linedata[ct->linenr];
 //                             }
                                ct++;
index 2900cb55529669b1e15d9eb520db84e02e4d3b48..3b077dd22ef7e21c97937b26b5cd091b3d6784c8 100644 (file)
@@ -2227,7 +2227,7 @@ static ImBuf *seq_render_scene_strip(
                /* for old scened this can be uninitialized,
                 * should probably be added to do_versions at some point if the functionality stays */
                if (context.scene->r.seq_prev_type == 0)
-                       context.scene->r.seq_prev_type = 3 /* ==OB_SOLID */; 
+                       context.scene->r.seq_prev_type = 3 /* == OB_SOLID */;
 
                /* opengl offscreen render */
                BKE_scene_update_for_newframe(context.bmain, scene, scene->lay);
index ff234a971aa315ed74a6125f75af893892137797..8047de2eecaa9481389066eb9e2f1f937daeb4ac 100644 (file)
@@ -261,7 +261,9 @@ size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size
 {
        int len=0;
 
-       if (dst_w==NULL || src_c==NULL) return(0);
+       if (dst_w == NULL || src_c == NULL) {
+               return 0;
+       }
 
        while (*src_c && len < maxcpy) {
                size_t step= 0;
index 21a9290968bb9b1c81e1bb2350d64c66f0ce03ac..38fd6e9d32d9b7f172cb395d5bb92a1d85c47496 100644 (file)
@@ -104,7 +104,7 @@ void add_memfilechunk(MemFile *compare, MemFile *current, const char *buf, unsig
        static MemFileChunk *compchunk = NULL;
        MemFileChunk *curchunk;
        
-       /* this function inits when compare != NULL or when current==NULL */
+       /* this function inits when compare != NULL or when current == NULL  */
        if (compare) {
                compchunk = compare->chunks.first;
                return;
index c17f23eb65877c6c93df9d2bf99f37a251bb0dd2..5fec9f259eeb39df51d549b59c431a32e380c8c7 100644 (file)
@@ -1312,7 +1312,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
         *
         */
 
-       /* Here we check for consistancy and create 2 edges */
+       /* Here we check for consistency and create 2 edges */
        if (totf == 0 && totv >= 4 && totv == tote + 2) {
                /* find a free standing vertex and 2 endpoint verts */
                BMVert *v_free = NULL, *v_a = NULL, *v_b = NULL;
index 65825a60b50f77a41175b154e61e745be2521cca..7354c4fcd65689e872b0e2f19f8960f4311ebc56 100644 (file)
@@ -105,7 +105,8 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
        VariableSizeBokehBlurOperation *operation = new VariableSizeBokehBlurOperation();
        if (data->preview) {
                operation->setQuality(COM_QUALITY_LOW);
-       } else {
+       }
+       else {
                operation->setQuality(context->getQuality());
        }
        operation->setMaxBlur(data->maxblur);
index 7d190332c37de5006ffaf6f316b98df537e8d017..46c27496e9a320929bd80925530cf91110dd4ed4 100644 (file)
@@ -156,7 +156,8 @@ bool BokehBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
                newInput.xmin = input->xmin - (this->m_size * this->getWidth() / 100.0f);
                newInput.ymax = input->ymax + (this->m_size * this->getWidth() / 100.0f);
                newInput.ymin = input->ymin - (this->m_size * this->getWidth() / 100.0f);
-       } else {
+       }
+       else {
                newInput.xmax = input->xmax + (10.0f * this->getWidth() / 100.0f);
                newInput.xmin = input->xmin - (10.0f * this->getWidth() / 100.0f);
                newInput.ymax = input->ymax + (10.0f * this->getWidth() / 100.0f);
index d05040c4c12747f5ee855c15928c706f0f986021..354fe51c068c6572684f6ac0970b81a8162057ee 100644 (file)
@@ -50,7 +50,8 @@ bool CombineChannelsOperation::determineDependingAreaOfInterest(rcti *input, Rea
                                output->xmax = tempOutput.xmax;
                                output->ymax = tempOutput.ymax;
                                first = false;
-                       } else {
+                       }
+                       else {
                                output->xmin = MIN2(output->xmin, tempOutput.xmin);
                                output->ymin = MIN2(output->ymin, tempOutput.ymin);
                                output->xmax = MAX2(output->xmax, tempOutput.xmax);
index f7ad3115f24825506a5d4197d84f53764c481077..74043e187bcb993891db045d6ae20c8e0fdb06cf 100644 (file)
@@ -286,7 +286,8 @@ void GaussianBlurReferenceOperation::executePixel(float *color, int x, int y, vo
 
        if (refradx == 1 && refrady == 1) {
                memorybuffer->readNoCheck(color, x, y);
-       } else {
+       }
+       else {
                int minxr = x - refradx < 0 ? -x : -refradx;
                int maxxr = x + refradx > imgx ? imgx - x : refradx;
                int minyr = y - refrady < 0 ? -y : -refrady;
index dcf9262d6460413db1f960a59cede571b33019ef..00ad319e3b711bffa7803d3c47db6bda2a707e3b 100644 (file)
@@ -78,7 +78,8 @@ bool ProjectorLensDistortionOperation::determineDependingAreaOfInterest(rcti *in
                newInput.ymin = input->ymin;
                newInput.xmin = input->xmin - this->m_kr2 - 2;
                newInput.xmax = input->xmax + this->m_kr2 + 2;
-       } else {
+       }
+       else {
                newInput.xmin = input->xmin - 7;  /* (0.25f * 20 * 1) + 2 == worse case dispersion */
                newInput.ymin = input->ymin;
                newInput.ymax = input->ymax;
index e0aa33d0207faf31128bdb175209d151d03c599c..dd2400ca302d1c327fbace05b0797af9c653f003 100644 (file)
@@ -4775,7 +4775,7 @@ static void envelope_bone_weighting(Object *ob, Mesh *mesh, float (*verts)[3], i
                        distance = distfactor_to_bone(verts[i], root[j], tip[j],
                                                      bone->rad_head * scale, bone->rad_tail * scale, bone->dist * scale);
                        
-                       /* add the vert to the deform group if weight!=0.0 */
+                       /* add the vert to the deform group if (weight != 0.0) */
                        if (distance != 0.0f)
                                ED_vgroup_vert_add(ob, dgroup, i, distance, WEIGHT_REPLACE);
                        else
index a9646aaabf4b732a819cbf534bbc609f933746d3..bc154de9691a1cc2d3b06ee1de07e2d899ff9e19 100644 (file)
@@ -1427,8 +1427,8 @@ void CURVE_OT_separate(wmOperatorType *ot)
 
 static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
 {
-       /* return u!=-1:     1 row in u-direction selected. U has value between 0-pntsv 
-        * return v!=-1: 1 column in v-direction selected. V has value between 0-pntsu
+       /* return (u != -1): 1 row in u-direction selected. U has value between 0-pntsv
+        * return (v != -1): 1 column in v-direction selected. V has value between 0-pntsu
         */
        BPoint *bp;
        int a, b, sel;
index c83331a8eb76039741b2e4f1f1b0eeb72fdfe107..79ee57d3f91bd35b22c4038b0ac2b040974b67b3 100644 (file)
@@ -416,7 +416,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
        
        if (nr == OBJECT_SELECT_LINKED_IPO) {
                // XXX old animation system
-               //if (ob->ipo==0) return OPERATOR_CANCELLED;
+               //if (ob->ipo == 0) return OPERATOR_CANCELLED;
                //object_select_all_by_ipo(C, ob->ipo)
                return OPERATOR_CANCELLED;
        }
index 6357cb48a3d2c85f4ced49bda3fb67299f5421b9..29ebc51df3e118117fd01d8c55e4040de39d6bba 100644 (file)
@@ -705,7 +705,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
        }
        else {
                /* validate owner */
-               //if (ri->rect==NULL)
+               //if (ri->rect == NULL)
                //      ri->rect= MEM_mallocN(sizeof(int)*ri->pr_rectx*ri->pr_recty, "BIF_previewrender");
                //RE_ResultGet32(re, ri->rect);
        }
index f8ca150e28ef89495282d285e0aa8ddc4a34dc3b..47a086a2779d681bec060bba563992ce721e06eb 100644 (file)
@@ -1297,7 +1297,7 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
        if (swap_space == 1) {
                SWAP(ListBase, sa1->spacedata, sa2->spacedata);
                /* exception: ensure preview is reset */
-//             if (sa1->spacetype==SPACE_VIEW3D)
+//             if (sa1->spacetype == SPACE_VIEW3D)
 // XXX                 BIF_view3d_previewrender_free(sa1->spacedata.first);
        }
        else if (swap_space == 2) {
index 48532c83e4ce89d8064525379f0e1bb0e49e508b..dda4bfede9cfeccbbf156305b46fc9eebf201c7e 100644 (file)
@@ -1483,7 +1483,7 @@ void ED_screen_set_scene(bContext *C, bScreen *screen, Scene *scene)
 
                                                if (!v3d->camera || !BKE_scene_base_find(scene, v3d->camera)) {
                                                        v3d->camera = BKE_scene_camera_find(sc->scene);
-                                                       // XXX if (sc==curscreen) handle_view3d_lock();
+                                                       // XXX if (sc == curscreen) handle_view3d_lock();
                                                        if (!v3d->camera) {
                                                                ARegion *ar;
                                                                for (ar = v3d->regionbase.first; ar; ar = ar->next) {
index 789c77f16aeb8f3303c30b3272e3ba766c97e17a..05cc958aa4333eb5f6bf204dc79315922afcdba2 100644 (file)
@@ -1461,7 +1461,7 @@ static float project_paint_uvpixel_mask(
        
        /* This only works when the opacity dosnt change while painting, stylus pressure messes with this
         * so don't use it. */
-       // if (ps->is_airbrush==0) mask *= BKE_brush_alpha_get(ps->brush);
+       // if (ps->is_airbrush == 0) mask *= BKE_brush_alpha_get(ps->brush);
        
        return mask;
 }
index f4cb4ec3d055e7ccb637616ddfcc4d32d5268815..a4611cf14536134577f45765ef2ba22bb9dff591 100644 (file)
@@ -488,7 +488,7 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn)
                        
                        // XXX: restore the case below if not enough updates occur...
                        //default:
-                       //      if (wmn->data==ND_KEYS)
+                       //      if (wmn->data == ND_KEYS)
                        //              ED_area_tag_redraw(sa);
        }
 }
index 0e129cb4dcbe2d85daeb8afc22558efc5c4432e2..67e06b1c33ce788818f25a31ffd4f6f0cc1440d9 100644 (file)
@@ -224,7 +224,7 @@ void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *im
                                        else id_lib_extern(&ima->id);
 
                                        /* we also need to correct the aspect of uvs */
-                                       if(tf->unwrap & TF_CORRECT_ASPECT) {
+                                       if (tf->unwrap & TF_CORRECT_ASPECT) {
                                                BMIter liter;
                                                BMLoop *l;
 
index c6ded2a91cfda4540a72ecaddbc42797d72aaf0b..39a78ea934b13c02a9c69c9412030bfcbc35fa51 100644 (file)
@@ -660,10 +660,11 @@ static void p_flush_uvs(PHandle *handle, PChart *chart)
        }
 
        for (f = chart->faces; f; f = f->nextlink) {
-               if(f->unwrap_flag) {
+               if (f->unwrap_flag) {
                        if (handle->do_aspect) {
                                *f->unwrap_flag |= TF_CORRECT_ASPECT;
-                       } else {
+                       }
+                       else {
                                *f->unwrap_flag &= ~TF_CORRECT_ASPECT;
                        }
                }
index 0ad271e90bd0e7161d8a00ef37b28296ee7f8c8c..3c2d3e11197ae875dbe7d246620353e7b7158c73 100644 (file)
@@ -678,7 +678,8 @@ void GPU_create_gl_tex(unsigned int *bind, unsigned int *pix, float * frect, int
                                glTexImage2D(GL_TEXTURE_2D, 0,  GL_RGBA,  rectw, recth, 0, GL_RGBA, GL_UNSIGNED_BYTE, pix);
 
                        glGenerateMipmapEXT(GL_TEXTURE_2D);
-               } else {
+               }
+               else {
                        if (use_high_bit_depth)
                                gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA16, rectw, recth, GL_RGBA, GL_FLOAT, frect);
                        else
index 2867cba81293f16d171ae95625bcd34f09bbe5df..9270aec8d950750a3908b750e86e0814d85bead1 100644 (file)
@@ -2155,10 +2155,10 @@ static PyObject *bpy_bmelemseq_sort(BPy_BMElemSeq *self, PyObject *args, PyObjec
        BPY_BM_CHECK_OBJ(self);
 
        if (args != NULL) {
-               if(!PyArg_ParseTupleAndKeywords(args, kw,
-                                               "|Oi:BMElemSeq.sort",
-                                               (char **)kwlist,
-                                               &keyfunc, &reverse))
+               if (!PyArg_ParseTupleAndKeywords(args, kw,
+                                                "|Oi:BMElemSeq.sort",
+                                                (char **)kwlist,
+                                                &keyfunc, &reverse))
                        return NULL;
        }
 
index a6f6458392fd614b2993823f5886377915d5bceb..ee7372d9848eea6f7f32bea3e7f7b27c2caa7210 100644 (file)
@@ -232,7 +232,7 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void),
                obr= RE_addRenderObject(re, NULL, NULL, 0, 0, 0);
        
        for (x = sx, fx = sx * stargrid; x <= ex; x++, fx += stargrid) {
-               for (y = sy, fy = sy * stargrid; y <= ey ; y++, fy += stargrid) {
+               for (y = sy, fy = sy * stargrid; y <= ey; y++, fy += stargrid) {
                        for (z = sz, fz = sz * stargrid; z <= ez; z++, fz += stargrid) {
 
                                BLI_srand((hash[z & 0xff] << 24) + (hash[y & 0xff] << 16) + (hash[x & 0xff] << 8));
index 5bf6c34cfb3b33921d609e9551f1651f307835a8..11a4e9ac35b0ca3b76078afc620fd55e960494b9 100644 (file)
@@ -346,7 +346,7 @@ static void wait_for_console_key(void)
        HANDLE hConsoleInput = GetStdHandle(STD_INPUT_HANDLE);
 
        if (!ELEM(hConsoleInput, NULL, INVALID_HANDLE_VALUE) && FlushConsoleInputBuffer(hConsoleInput)) {
-               for(;;) {
+               for (;;) {
                        INPUT_RECORD buffer;
                        DWORD ignored;