[Bf-blender-cvs] [acebfbb] master: Cleanup: unnecessary comma use
Campbell Barton
noreply at git.blender.org
Fri Mar 4 23:26:57 CET 2016
Commit: acebfbb6669b4f0c546068777c7f11146aad3def
Author: Campbell Barton
Date: Sat Mar 5 09:09:05 2016 +1100
Branches: master
https://developer.blender.org/rBacebfbb6669b4f0c546068777c7f11146aad3def
Cleanup: unnecessary comma use
===================================================================
M source/blender/blenkernel/intern/mesh.c
M source/blender/blenkernel/intern/subsurf_ccg.c
M source/blender/editors/interface/interface.c
M source/blender/editors/interface/interface_layout.c
M source/blender/editors/space_text/text_autocomplete.c
M source/blender/editors/space_text/text_draw.c
M source/blender/gpu/intern/gpu_compositing.c
M source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
M source/blender/render/intern/source/render_texture.c
M source/blender/render/intern/source/volumetric.c
M source/blender/render/intern/source/zbuf.c
===================================================================
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 9d23fc4..c105928 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -141,13 +141,15 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2
while (i1 < c1->totlayer && !ELEM(l1->type, CD_MVERT, CD_MEDGE, CD_MPOLY,
CD_MLOOPUV, CD_MLOOPCOL, CD_MTEXPOLY, CD_MDEFORMVERT))
{
- i1++, l1++;
+ i1++;
+ l1++;
}
while (i2 < c2->totlayer && !ELEM(l2->type, CD_MVERT, CD_MEDGE, CD_MPOLY,
CD_MLOOPUV, CD_MLOOPCOL, CD_MTEXPOLY, CD_MDEFORMVERT))
{
- i2++, l2++;
+ i2++;
+ l2++;
}
if (l1->type == CD_MVERT) {
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 61b759e..9799433 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -1524,19 +1524,19 @@ static void ccgDM_copyFinalLoopArray(DerivedMesh *dm, MLoop *mloop)
mv->v = v1;
mv->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v1, v2));
- mv++, i++;
+ mv++; i++;
mv->v = v2;
mv->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v2, v3));
- mv++, i++;
+ mv++; i++;
mv->v = v3;
mv->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v3, v4));
- mv++, i++;
+ mv++; i++;
mv->v = v4;
mv->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v4, v1));
- mv++, i++;
+ mv++; i++;
}
}
}
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 32c9177..c220557 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3577,11 +3577,11 @@ static int findBitIndex(unsigned int x)
else {
int idx = 0;
- if (x & 0xFFFF0000) idx += 16, x >>= 16;
- if (x & 0xFF00) idx += 8, x >>= 8;
- if (x & 0xF0) idx += 4, x >>= 4;
- if (x & 0xC) idx += 2, x >>= 2;
- if (x & 0x2) idx += 1;
+ if (x & 0xFFFF0000) { idx += 16; x >>= 16; }
+ if (x & 0xFF00) { idx += 8; x >>= 8; }
+ if (x & 0xF0) { idx += 4; x >>= 4; }
+ if (x & 0xC) { idx += 2; x >>= 2; }
+ if (x & 0x2) { idx += 1; }
return idx;
}
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 2daf3f7..e802cf8 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2264,7 +2264,6 @@ static void ui_litem_layout_radial(uiLayout *litem)
int itemnum = 0;
int totitems = 0;
- int minx, miny, maxx, maxy;
/* For the radial layout we will use Matt Ebb's design
* for radiation, see http://mattebb.com/weblog/radiation/
* also the old code at http://developer.blender.org/T5103
@@ -2275,7 +2274,7 @@ static void ui_litem_layout_radial(uiLayout *litem)
x = litem->x;
y = litem->y;
- minx = x, miny = y, maxx = x, maxy = y;
+ int minx = x, miny = y, maxx = x, maxy = y;
/* first count total items */
for (item = litem->items.first; item; item = item->next)
diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c
index 2db2137..04cff28 100644
--- a/source/blender/editors/space_text/text_autocomplete.c
+++ b/source/blender/editors/space_text/text_autocomplete.c
@@ -327,8 +327,13 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
if (text_do_suggest_select(st, ar))
swallow = 1;
else {
- if (tools & TOOL_SUGG_LIST) texttool_suggest_clear();
- if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0;
+ if (tools & TOOL_SUGG_LIST) {
+ texttool_suggest_clear();
+ }
+ if (tools & TOOL_DOCUMENT) {
+ texttool_docs_clear();
+ doc_scroll = 0;
+ }
retval = OPERATOR_FINISHED;
}
draw = 1;
@@ -342,8 +347,13 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
swallow = 1;
}
else {
- if (tools & TOOL_SUGG_LIST) texttool_suggest_clear();
- if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0;
+ if (tools & TOOL_SUGG_LIST) {
+ texttool_suggest_clear();
+ }
+ if (tools & TOOL_DOCUMENT) {
+ texttool_docs_clear();
+ doc_scroll = 0;
+ }
retval = OPERATOR_FINISHED;
}
draw = 1;
@@ -352,8 +362,13 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
case ESCKEY:
if (event->val == KM_PRESS) {
draw = swallow = 1;
- if (tools & TOOL_SUGG_LIST) texttool_suggest_clear();
- else if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0;
+ if (tools & TOOL_SUGG_LIST) {
+ texttool_suggest_clear();
+ }
+ else if (tools & TOOL_DOCUMENT) {
+ texttool_docs_clear();
+ doc_scroll = 0;
+ }
else draw = swallow = 0;
retval = OPERATOR_CANCELLED;
}
@@ -367,7 +382,11 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
swallow = 1;
draw = 1;
}
- if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0, draw = 1;
+ if (tools & TOOL_DOCUMENT) {
+ texttool_docs_clear();
+ doc_scroll = 0;
+ draw = 1;
+ }
retval = OPERATOR_FINISHED;
}
break;
@@ -398,7 +417,10 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
}
}
}
- if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0;
+ if (tools & TOOL_DOCUMENT) {
+ texttool_docs_clear();
+ doc_scroll = 0;
+ }
}
break;
case RIGHTARROWKEY:
@@ -427,7 +449,10 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
}
}
}
- if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0;
+ if (tools & TOOL_DOCUMENT) {
+ texttool_docs_clear();
+ doc_scroll = 0;
+ }
}
break;
case PAGEDOWNKEY:
@@ -498,8 +523,15 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
break;
#if 0
default:
- if (tools & TOOL_SUGG_LIST) texttool_suggest_clear(), draw = 1;
- if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0, draw = 1;
+ if (tools & TOOL_SUGG_LIST) {
+ texttool_suggest_clear();
+ draw = 1;
+ }
+ if (tools & TOOL_DOCUMENT) {
+ texttool_docs_clear();
+ doc_scroll = 0;
+ draw = 1;
+ }
#endif
}
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 1608792..9448f6a 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1108,8 +1108,13 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
vsell = txt_get_span(text->lines.first, text->sell) - st->top + offl;
vselc = text_get_char_pos(st, text->sell->line, text->selc) - st->left + offc;
- if (vcurc < 0) vcurc = 0;
- if (vselc < 0) vselc = 0, hidden = 1;
+ if (vcurc < 0) {
+ vcurc = 0;
+ }
+ if (vselc < 0) {
+ vselc = 0;
+ hidden = 1;
+ }
UI_ThemeColor(TH_SHADE2);
x = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
@@ -1135,11 +1140,16 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
}
y -= froml * lheight;
- glRecti(x + fromc * st->cwidth - 1, y, ar->winx, y - lheight); y -= lheight;
- for (i = froml + 1; i < tol; i++)
- glRecti(x - 4, y, ar->winx, y - lheight), y -= lheight;
- glRecti(x - 4, y, x + toc * st->cwidth, y - lheight); y -= lheight;
+ glRecti(x + fromc * st->cwidth - 1, y, ar->winx, y - lheight);
+ y -= lheight;
+ for (i = froml + 1; i < tol; i++) {
+ glRecti(x - 4, y, ar->winx, y - lheight);
+ y -= lheight;
+ }
+
+ glRecti(x - 4, y, x + toc * st->cwidth, y - lheight);
+ y -= lheight;
}
}
else {
diff --git a/source/blender/gpu/intern/gpu_compositing.c b/source/blender/gpu/intern/gpu_compositing.c
index 79a77d6..8516a2d 100644
--- a/source/blender/gpu/intern/gpu_compositing.c
+++ b/source/blender/gpu/intern/gpu_compositing.c
@@ -332,7 +332,8 @@ bool GPU_fx_compositor_initialize_passes(
/* scissor is missing when drawing offscreen, in that case, dimensions match exactly. In opposite case
* add one to match viewport dimensions */
if (scissor_rect) {
- w++, h++;
+ w++;
+ h++;
}
fx->num_passes = 0;
diff --git a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
index 1d67a8c..00c1129 100644
--- a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
@@ -331,7 +331,8 @@ int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds)
if (size > nchilds) {
float bcost = FLT_MAX;
- baxis = -1, boffset = size / 2;
+ baxis = -1;
+ boffset = size / 2;
SweepCost *sweep = (SweepCost *)MEM_mallocN(sizeof(SweepCost) * size, "RTBuilder.HeuristicSweep");
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 193f619..807686a 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -3827,7 +3827,9 @@ void RE_sample_material_color(
return;
}
- v1=mloop[mlooptri[tri_index].tri[0]].v, v2=mloop[mlooptri[tri_index].tri[1]].v, v3=mloop[mlooptri[tri_index].tri[2]].v;
+ v1 = mloop[mlooptri[tri_index].tri[0]].v;
+ v2 = mloop[mlooptri[tri_index].tri[1]].v;
+ v3 = mloop[mlooptri[tri_index].tri[2]].v;
normal_tri_v3(normal, mvert[v1].co, mvert[v2].co, mvert[v3].co);
/* generate shadeinput with data required */
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index 2c09172..610e86c 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -269,7 +269,9 @@ static float metadensity(Object
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list