Commit: 8dc80e9d736a9262947de8fb80df40dc010e37b4
Author: Campbell Barton
Date:   Tue Dec 10 13:44:46 2013 +1100
http://developer.blender.org/rB8dc80e9d736a9262947de8fb80df40dc010e37b4

Style Cleanup

===================================================================

M       source/blender/compositor/intern/COM_MemoryBuffer.cpp
M       source/blender/compositor/operations/COM_DisplaceOperation.cpp
M       source/blender/editors/interface/interface_handlers.c
M       source/blender/editors/screen/screen_ops.c
M       source/blender/editors/space_file/file_ops.c
M       source/blender/editors/space_image/image_ops.c
M       source/blender/makesrna/intern/rna_particle.c
M       source/blender/makesrna/intern/rna_sculpt_paint.c
M       source/blender/nodes/composite/node_composite_tree.c
M       source/blender/windowmanager/intern/wm_dragdrop.c

===================================================================

diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp 
b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
index 8a01056..7d85115 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
@@ -216,10 +216,10 @@ static const float EWA_WTS[EWA_MAXIDX + 1] = {
 
 static void ellipse_bounds(float A, float B, float C, float F, float &xmax, 
float &ymax)
 {
-       float denom = 4.0f*A*C - B*B;
+       float denom = 4.0f * A * C - B * B;
        if (denom > 0.0f && A != 0.0f && C != 0.0f) {
-               xmax = sqrt(F)/(2.0f*A) * (sqrt(F*(4.0f*A - B*B/C)) + 
B*B*sqrt(F/(C*denom)));
-               ymax = sqrt(F)/(2.0f*C) * (sqrt(F*(4.0f*C - B*B/A)) + 
B*B*sqrt(F/(A*denom)));
+               xmax = sqrt(F) / (2.0f * A) * (sqrt(F * (4.0f * A - B * B / C)) 
+ B * B * sqrt(F / (C * denom)));
+               ymax = sqrt(F) / (2.0f * C) * (sqrt(F * (4.0f * C - B * B / A)) 
+ B * B * sqrt(F / (A * denom)));
        }
        else {
                xmax = 0.0f;
@@ -227,18 +227,19 @@ static void ellipse_bounds(float A, float B, float C, 
float F, float &xmax, floa
        }
 }
 
-static void ellipse_params(float Ux, float Uy, float Vx, float Vy, float &A, 
float &B, float &C, float &F, float &umax, float &vmax)
+static void ellipse_params(float Ux, float Uy, float Vx, float Vy,
+                           float &A, float &B, float &C, float &F, float 
&umax, float &vmax)
 {
-       A = Vx*Vx + Vy*Vy;
-       B = -2.0f * (Ux*Vx + Uy*Vy);
-       C = Ux*Ux + Uy*Uy;
-       F = A*C - B*B * 0.25f;
+       A = Vx * Vx + Vy * Vy;
+       B = -2.0f * (Ux * Vx + Uy * Vy);
+       C = Ux * Ux + Uy * Uy;
+       F = A * C - B * B * 0.25f;
 
-       float factor = (F != 0.0f ? (float)(EWA_MAXIDX+1) / F : 0.0f);
+       float factor = (F != 0.0f ? (float)(EWA_MAXIDX + 1) / F : 0.0f);
        A *= factor;
        B *= factor;
        C *= factor;
-       F = (float)(EWA_MAXIDX+1);
+       F = (float)(EWA_MAXIDX + 1);
 
        ellipse_bounds(A, B, C, sqrtf(F), umax, vmax);
 }
@@ -282,31 +283,31 @@ void MemoryBuffer::readEWA(float result[4], const float 
uv[2], const float deriv
        /* note: if eccentricity gets clamped (see above),
         * the ue/ve limits can also be lowered accordingly
         */
-       if (U0-u1 > EWA_MAXIDX) u1 = U0 - EWA_MAXIDX;
-       if (u2-U0 > EWA_MAXIDX) u2 = U0 + EWA_MAXIDX;
-       if (V0-v1 > EWA_MAXIDX) v1 = V0 - EWA_MAXIDX;
-       if (v2-V0 > EWA_MAXIDX) v2 = V0 + EWA_MAXIDX;
+       if (U0 - u1 > EWA_MAXIDX) u1 = U0 - EWA_MAXIDX;
+       if (u2 - U0 > EWA_MAXIDX) u2 = U0 + EWA_MAXIDX;
+       if (V0 - v1 > EWA_MAXIDX) v1 = V0 - EWA_MAXIDX;
+       if (v2 - V0 > EWA_MAXIDX) v2 = V0 + EWA_MAXIDX;
 
-       float DDQ = 2.f * A;
+       float DDQ = 2.0f * A;
        float U = u1 - U0;
-       float ac1 = A * (2.f*U + 1.f);
-       float ac2 = A * U*U;
+       float ac1 = A * (2.0f * U + 1.0f);
+       float ac2 = A * U * U;
        float BU = B * U;
 
        float sum = 0.0f;
        for (int v = v1; v <= v2; ++v) {
                float V = v - V0;
 
-               float DQ = ac1 + B*V;
-               float Q = (C*V + BU)*V + ac2;
+               float DQ = ac1 + B * V;
+               float Q = (C * V + BU) * V + ac2;
                for (int u = u1; u <= u2; ++u) {
                        if (Q < F) {
                                float tc[4];
                                const float wt = EWA_WTS[CLAMPIS((int)Q, 0, 
EWA_MAXIDX)];
                                switch (sampler) {
                                        case COM_PS_NEAREST: read(tc, u, v); 
break;
-                                       case COM_PS_BILINEAR: readBilinear(tc, 
(float)u+ufac, (float)v+vfac); break;
-                                       case COM_PS_BICUBIC: readBilinear(tc, 
(float)u+ufac, (float)v+vfac); break; /* XXX no readBicubic method yet */
+                                       case COM_PS_BILINEAR: readBilinear(tc, 
(float)u + ufac, (float)v + vfac); break;
+                                       case COM_PS_BICUBIC: readBilinear(tc, 
(float)u + ufac, (float)v + vfac); break; /* XXX no readBicubic method yet */
                                        default: zero_v4(tc); break;
                                }
                                madd_v4_v4fl(result, tc, wt);
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cpp 
b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
index 96031e7..2842b47 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
@@ -72,8 +72,8 @@ bool DisplaceOperation::read_displacement(float x, float y, 
float xscale, float
        else {
                float col[4];
                m_inputVectorProgram->readSampled(col, x, y, COM_PS_BILINEAR);
-               r_u = origin[0] - col[0]*xscale + 0.5f;
-               r_v = origin[1] - col[1]*yscale + 0.5f;
+               r_u = origin[0] - col[0] * xscale + 0.5f;
+               r_v = origin[1] - col[1] * yscale + 0.5f;
                return true;
        }
 }
diff --git a/source/blender/editors/interface/interface_handlers.c 
b/source/blender/editors/interface/interface_handlers.c
index 5e17831..f858e58 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -2344,7 +2344,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock 
*block, uiBut *but, uiHandle
                                        int autocomplete = 
ui_textedit_autocomplete(C, but, data);
                                        changed = autocomplete != 
AUTOCOMPLETE_NO_MATCH;
 
-                                       if(autocomplete == 
AUTOCOMPLETE_FULL_MATCH)
+                                       if (autocomplete == 
AUTOCOMPLETE_FULL_MATCH)
                                                button_activate_state(C, but, 
BUTTON_STATE_EXIT);
 
                                        update = true;  /* do live update for 
tab key */
@@ -2595,7 +2595,7 @@ int ui_button_open_menu_direction(uiBut *but)
 }
 
 /* Hack for uiList LISTROW buttons to "give" events to overlaying TEX buttons 
(cltr-clic rename feature & co). */
-static uiBut* ui_but_list_row_text_activate(bContext *C, uiBut *but, 
uiHandleButtonData *data, const wmEvent *event,
+static uiBut *ui_but_list_row_text_activate(bContext *C, uiBut *but, 
uiHandleButtonData *data, const wmEvent *event,
                                             uiButtonActivateType activate_type)
 {
        ARegion *ar = CTX_wm_region(C);
diff --git a/source/blender/editors/screen/screen_ops.c 
b/source/blender/editors/screen/screen_ops.c
index e4b5883..1e16918 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1025,9 +1025,9 @@ static void area_move_set_limits(bScreen *sc, int dir, 
int winsizex, int winsize
                        int x1;
                        areamin = AREAMINX;
                        
-                       if(sa->v1->vec.x > 0)
+                       if (sa->v1->vec.x > 0)
                                areamin += U.pixelsize;
-                       if(sa->v4->vec.x < winsizex - 1)
+                       if (sa->v4->vec.x < winsizex - 1)
                                areamin += U.pixelsize;
                        
                        x1 = sa->v4->vec.x - sa->v1->vec.x + 1 - areamin;
diff --git a/source/blender/editors/space_file/file_ops.c 
b/source/blender/editors/space_file/file_ops.c
index f8f6477..f4cae0c 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1253,7 +1253,7 @@ void file_directory_enter_handle(bContext *C, void 
*UNUSED(arg_unused), void *UN
 void file_filename_enter_handle(bContext *C, void *UNUSED(arg_unused), void 
*arg_but)
 {
        SpaceFile *sfile = CTX_wm_space_file(C);
-       uiBut *but = (uiBut*)arg_but;
+       uiBut *but = arg_but;
        char matched_file[FILE_MAX];
        char filepath[sizeof(sfile->params->dir)];
 
diff --git a/source/blender/editors/space_image/image_ops.c 
b/source/blender/editors/space_image/image_ops.c
index a37b501..2ea77bb 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1880,7 +1880,7 @@ static int image_invert_exec(bContext *C, wmOperator *op)
 
        if (support_undo) {
                ED_undo_paint_push_begin(UNDO_PAINT_IMAGE, op->type->name,
-                                                         
ED_image_undo_restore, ED_image_undo_free);
+                                        ED_image_undo_restore, 
ED_image_undo_free);
                /* not strictly needed, because we only imapaint_dirty_region 
to invalidate all tiles
                 * but better do this right in case someone copies this for a 
tool that uses partial redraw better */
                ED_imapaint_clear_partial_redraw();
diff --git a/source/blender/makesrna/intern/rna_particle.c 
b/source/blender/makesrna/intern/rna_particle.c
index 92c567e..01e7b67 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -402,8 +402,8 @@ static EnumPropertyItem 
*rna_Particule_Material_itemf(bContext *C, PointerRNA *U
        int totitem = 0;
        int i;
 
-       if (ob->totcol > 0){
-               for (i = 1; i<=ob->totcol; i++) {
+       if (ob->totcol > 0) {
+               for (i = 1; i <= ob->totcol; i++) {
                        ma = give_current_material(ob, i);
                        tmp.value = i;
                        tmp.icon = ICON_MATERIAL_DATA;
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c 
b/source/blender/makesrna/intern/rna_sculpt_paint.c
index d72fbcc..6280e08 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -352,7 +352,7 @@ static void rna_def_sculpt(BlenderRNA  *brna)
                 "Subdivide Edges", "Subdivide long edges to add mesh detail 
where needed"},
                {SCULPT_DYNTOPO_COLLAPSE, "COLLAPSE", 0,
                 "Collapse Edges", "Collapse short edges to remove mesh detail 
where possible"},
-               {SCULPT_DYNTOPO_SUBDIVIDE|SCULPT_DYNTOPO_COLLAPSE, 
"SUBDIVIDE_COLLAPSE", 0,
+               {SCULPT_DYNTOPO_SUBDIVIDE | SCULPT_DYNTOPO_COLLAPSE, 
"SUBDIVIDE_COLLAPSE", 0,
                 "Subdivide Collapse", "Both subdivide long edges and collapse 
short edges to refine mesh detail"},
                {0, NULL, 0, NULL, NULL}
        };
diff --git a/source/blender/nodes/composite/node_composite_tree.c 
b/source/blender/nodes/composite/node_composite_tree.c
index 7da3a35..d05a5da 100644
--- a/source/blender/nodes/composite/node_composite_tree.c
+++ b/source/blender/nodes/composite/node_composite_tree.c
@@ -218,7 +218,8 @@ static void update(bNodeTree *ntree)
        }
 }
 
-static void composite_node_add_init(bNodeTree *UNUSED(bnodetree), bNode 
*bnode) {
+static void composite_node_add_init(bNodeTree *UNUSED(bnodetree), bNode *bnode)
+{
        /* Composite node will only show previews for input classes 
         * by default, other will be hidden 
         * but can be made visible with the show_preview option */
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c 
b/source/blender/windowmanager/intern/wm_dragdrop.c
index 53d846b..819ec36 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -367,7 +367,7 @@ void wm_drags_draw(bContext *C, wmWindow *win, rcti *rect)
                                x = cursorx - drag->sx / 2;
 
                                if (cursory + drag->sy / 2 + padding + iconsize 
< winsizey)
-                                       y = cursory + drag->sy / 2 + padding;
+                                       y = cursory + drag->sy / 2 + padding;
                                else
                                        y = cursory - drag->sy / 2 - padding - 
iconsize - padding - iconsize;
                        }
@@ -375,7 +375,7 @

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to