Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-08-04 16:30:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-04 16:30:16 +0400
commit9ff4fa667108eeecfaaaae477b9e3708c0db5eab (patch)
tree025fd5ede7537919d4c70ee2423ebefc2853ae57 /source/blender
parent2390c95cf1435c19adcb22263b27750ea3ca81e7 (diff)
style cleanup
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/bmfont.c2
-rw-r--r--source/blender/blenkernel/intern/font.c2
-rw-r--r--source/blender/blenkernel/intern/sequencer.c2
-rw-r--r--source/blender/blenlib/intern/string_utf8.c4
-rw-r--r--source/blender/blenloader/intern/undofile.c2
-rw-r--r--source/blender/bmesh/operators/bmo_create.c2
-rw-r--r--source/blender/compositor/nodes/COM_DefocusNode.cpp3
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cpp3
-rw-r--r--source/blender/compositor/operations/COM_CombineChannelsOperation.cpp3
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp3
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp3
-rw-r--r--source/blender/editors/armature/editarmature.c2
-rw-r--r--source/blender/editors/curve/editcurve.c4
-rw-r--r--source/blender/editors/object/object_select.c2
-rw-r--r--source/blender/editors/render/render_preview.c2
-rw-r--r--source/blender/editors/screen/area.c2
-rw-r--r--source/blender/editors/screen/screen_edit.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c2
-rw-r--r--source/blender/editors/space_graph/space_graph.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c5
-rw-r--r--source/blender/gpu/intern/gpu_draw.c3
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c8
-rw-r--r--source/blender/render/intern/source/convertblender.c2
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c2
25 files changed, 39 insertions, 30 deletions
diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c
index 722dc1834dd..18161bc6fcb 100644
--- a/source/blender/blenkernel/intern/bmfont.c
+++ b/source/blender/blenkernel/intern/bmfont.c
@@ -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;
}
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index e977b9389a3..17d48841f95 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -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++;
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 2900cb55529..3b077dd22ef 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -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);
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index ff234a971aa..8047de2eeca 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -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;
diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c
index 21a9290968b..38fd6e9d32d 100644
--- a/source/blender/blenloader/intern/undofile.c
+++ b/source/blender/blenloader/intern/undofile.c
@@ -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;
diff --git a/source/blender/bmesh/operators/bmo_create.c b/source/blender/bmesh/operators/bmo_create.c
index c17f23eb658..5fec9f259ee 100644
--- a/source/blender/bmesh/operators/bmo_create.c
+++ b/source/blender/bmesh/operators/bmo_create.c
@@ -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;
diff --git a/source/blender/compositor/nodes/COM_DefocusNode.cpp b/source/blender/compositor/nodes/COM_DefocusNode.cpp
index 65825a60b50..7354c4fcd65 100644
--- a/source/blender/compositor/nodes/COM_DefocusNode.cpp
+++ b/source/blender/compositor/nodes/COM_DefocusNode.cpp
@@ -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);
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
index 7d190332c37..46c27496e9a 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
@@ -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);
diff --git a/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp b/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
index d05040c4c12..354fe51c068 100644
--- a/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
+++ b/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
@@ -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);
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
index f7ad3115f24..74043e187bc 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
@@ -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;
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
index dcf9262d646..00ad319e3b7 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -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;
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index e0aa33d0207..dd2400ca302 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -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
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index a9646aaabf4..bc154de9691 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -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;
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index c83331a8eb7..79ee57d3f91 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -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;
}
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 6357cb48a3d..29ebc51df3e 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -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);
}
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index f8ca150e28e..47a086a2779 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -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) {
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 48532c83e4c..dda4bfede9c 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -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) {
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 789c77f16ae..05cc958aa43 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -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;
}
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index f4cb4ec3d05..a4611cf1453 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -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);
}
}
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 0e129cb4dcb..67e06b1c33c 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -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;
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index c6ded2a91cf..39a78ea934b 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -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;
}
}
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 0ad271e90bd..3c2d3e11197 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -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
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index 2867cba8129..9270aec8d95 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -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;
}
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index a6f6458392f..ee7372d9848 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -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));
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 5bf6c34cfb3..11a4e9ac35b 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -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;