From e927ce8acb6848974077fbbd6dc110dd3948b48a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 10 Jul 2019 14:41:19 +1000 Subject: Cleanup: avoid line breaks from trailing comments --- source/blender/blenkernel/intern/curve.c | 13 +++--- source/blender/blenkernel/intern/mesh.c | 5 +- source/blender/blenkernel/intern/smoke.c | 4 +- source/blender/blenloader/intern/readfile.c | 47 ++++++++++--------- source/blender/blenloader/intern/writefile.c | 6 +-- source/blender/editors/space_info/info_ops.c | 3 +- source/blender/editors/transform/transform_snap.c | 9 +--- .../freestyle/intern/python/BPy_FrsMaterial.cpp | 4 +- .../intern/python/BPy_StrokeAttribute.cpp | 4 +- .../Interface0D/CurvePoint/BPy_StrokeVertex.cpp | 8 ++-- .../intern/python/Interface1D/BPy_Stroke.cpp | 4 +- .../blender/imbuf/intern/openexr/openexr_api.cpp | 8 ++-- source/blender/makesrna/intern/rna_rna.c | 4 +- source/blender/modifiers/intern/MOD_decimate.c | 4 +- .../blender/nodes/shader/nodes/node_shader_math.c | 53 +++++++++------------- .../nodes/shader/nodes/node_shader_vectMath.c | 4 +- source/blender/python/mathutils/mathutils_Vector.c | 12 ++--- 17 files changed, 92 insertions(+), 100 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 8a2450efa55..931c0ed73d3 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -1818,8 +1818,9 @@ void BKE_curve_bevel_make(Object *ob, ListBase *disp) fp[3] = fp[4] = 0.0; fp[5] = cu->ext1; } - else if ((cu->flag & (CU_FRONT | CU_BACK)) == 0 && - cu->ext1 == 0.0f) { /* we make a full round bevel in that case */ + else if ((cu->flag & (CU_FRONT | CU_BACK)) == 0 && cu->ext1 == 0.0f) { + /* We make a full round bevel in that case. */ + nr = 4 + 2 * cu->bevresol; dl = MEM_callocN(sizeof(DispList), "makebevelcurve p1"); @@ -4742,8 +4743,8 @@ bool BKE_nurb_check_valid_u(const Nurb *nu) if (nu->pntsu < nu->orderu) { return false; } - if (((nu->flagu & CU_NURB_CYCLIC) == 0) && - (nu->flagu & CU_NURB_BEZIER)) { /* Bezier U Endpoints */ + if (((nu->flagu & CU_NURB_CYCLIC) == 0) && (nu->flagu & CU_NURB_BEZIER)) { + /* Bezier U Endpoints */ if (nu->orderu == 4) { if (nu->pntsu < 5) { return false; /* bezier with 4 orderu needs 5 points */ @@ -4769,8 +4770,8 @@ bool BKE_nurb_check_valid_v(const Nurb *nu) if (nu->pntsv < nu->orderv) { return false; } - if (((nu->flagv & CU_NURB_CYCLIC) == 0) && - (nu->flagv & CU_NURB_BEZIER)) { /* Bezier V Endpoints */ + if (((nu->flagv & CU_NURB_CYCLIC) == 0) && (nu->flagv & CU_NURB_BEZIER)) { + /* Bezier V Endpoints */ if (nu->orderv == 4) { if (nu->pntsv < 5) { return false; /* bezier with 4 orderu needs 5 points */ diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index e6fbc386b77..04164de91ca 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -558,8 +558,9 @@ void BKE_mesh_copy_data(Main *bmain, Mesh *me_dst, const Mesh *me_src, const int /* XXX WHAT? Why? Comment, please! And pretty sure this is not valid for regular Mesh copying? */ me_dst->runtime.is_original = false; - const bool do_tessface = ((me_src->totface != 0) && - (me_src->totpoly == 0)); /* only do tessface if we have no polys */ + /* Only do tessface if we have no polys. */ + const bool do_tessface = ((me_src->totface != 0) && (me_src->totpoly == 0)); + CustomData_MeshMasks mask = CD_MASK_MESH; if (me_src->id.tag & LIB_TAG_NO_MAIN) { diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index d6858e2d4d2..bb8fd18ea58 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -1402,9 +1402,9 @@ static void emit_from_particles(Object *flow_ob, Scene *scene, float dt) { + /* Is particle system selected. */ if (sfs && sfs->psys && sfs->psys->part && - ELEM(sfs->psys->part->type, PART_EMITTER, PART_FLUID)) // is particle system selected - { + ELEM(sfs->psys->part->type, PART_EMITTER, PART_FLUID)) { ParticleSimulationData sim; ParticleSystem *psys = sfs->psys; float *particle_pos; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index e750b84efa0..44039ad59ee 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1712,22 +1712,26 @@ BlendThumbnail *BLO_thumbnail_from_file(const char *filepath) /** \name Old/New Pointer Map * \{ */ -static void *newdataadr(FileData *fd, const void *adr) /* only direct databocks */ +/* only direct databocks */ +static void *newdataadr(FileData *fd, const void *adr) { return oldnewmap_lookup_and_inc(fd->datamap, adr, true); } -static void *newdataadr_no_us(FileData *fd, const void *adr) /* only direct databocks */ +/* only direct databocks */ +static void *newdataadr_no_us(FileData *fd, const void *adr) { return oldnewmap_lookup_and_inc(fd->datamap, adr, false); } -static void *newglobadr(FileData *fd, const void *adr) /* direct data-locks with global linking */ +/* direct datablocks with global linking */ +static void *newglobadr(FileData *fd, const void *adr) { return oldnewmap_lookup_and_inc(fd->globmap, adr, true); } -static void *newimaadr(FileData *fd, const void *adr) /* used to restore image data after undo */ +/* used to restore image data after undo */ +static void *newimaadr(FileData *fd, const void *adr) { if (fd->imamap && adr) { return oldnewmap_lookup_and_inc(fd->imamap, adr, true); @@ -1735,7 +1739,8 @@ static void *newimaadr(FileData *fd, const void *adr) /* used to restore image d return NULL; } -static void *newsceadr(FileData *fd, const void *adr) /* used to restore scene data after undo */ +/* used to restore scene data after undo */ +static void *newsceadr(FileData *fd, const void *adr) { if (fd->scenemap && adr) { return oldnewmap_lookup_and_inc(fd->scenemap, adr, true); @@ -1743,8 +1748,8 @@ static void *newsceadr(FileData *fd, const void *adr) /* used to restore scene d return NULL; } -static void *newmclipadr(FileData *fd, - const void *adr) /* used to restore movie clip data after undo */ +/* used to restore movie clip data after undo */ +static void *newmclipadr(FileData *fd, const void *adr) { if (fd->movieclipmap && adr) { return oldnewmap_lookup_and_inc(fd->movieclipmap, adr, true); @@ -1752,7 +1757,8 @@ static void *newmclipadr(FileData *fd, return NULL; } -static void *newsoundadr(FileData *fd, const void *adr) /* used to restore sound data after undo */ +/* used to restore sound data after undo */ +static void *newsoundadr(FileData *fd, const void *adr) { if (fd->soundmap && adr) { return oldnewmap_lookup_and_inc(fd->soundmap, adr, true); @@ -1760,8 +1766,8 @@ static void *newsoundadr(FileData *fd, const void *adr) /* used to restore sound return NULL; } -static void *newpackedadr(FileData *fd, - const void *adr) /* used to restore packed data after undo */ +/* used to restore packed data after undo */ +static void *newpackedadr(FileData *fd, const void *adr) { if (fd->packedmap && adr) { return oldnewmap_lookup_and_inc(fd->packedmap, adr, true); @@ -1770,19 +1776,20 @@ static void *newpackedadr(FileData *fd, return oldnewmap_lookup_and_inc(fd->datamap, adr, true); } -static void *newlibadr(FileData *fd, const void *lib, const void *adr) /* only lib data */ +/* only lib data */ +static void *newlibadr(FileData *fd, const void *lib, const void *adr) { return oldnewmap_liblookup(fd->libmap, adr, lib); } -void *blo_do_versions_newlibadr(FileData *fd, const void *lib, const void *adr) /* only lib data */ +/* only lib data */ +void *blo_do_versions_newlibadr(FileData *fd, const void *lib, const void *adr) { return newlibadr(fd, lib, adr); } -static void *newlibadr_us(FileData *fd, - const void *lib, - const void *adr) /* increases user number */ +/* increases user number */ +static void *newlibadr_us(FileData *fd, const void *lib, const void *adr) { ID *id = newlibadr(fd, lib, adr); @@ -1791,16 +1798,14 @@ static void *newlibadr_us(FileData *fd, return id; } -void *blo_do_versions_newlibadr_us(FileData *fd, - const void *lib, - const void *adr) /* increases user number */ +/* increases user number */ +void *blo_do_versions_newlibadr_us(FileData *fd, const void *lib, const void *adr) { return newlibadr_us(fd, lib, adr); } -static void *newlibadr_real_us(FileData *fd, - const void *lib, - const void *adr) /* ensures real user */ +/* ensures real user */ +static void *newlibadr_real_us(FileData *fd, const void *lib, const void *adr) { ID *id = newlibadr(fd, lib, adr); diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 115387a697b..5954ba9cf8e 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -553,10 +553,8 @@ static void writestruct_id( writestruct_at_address_id(wd, filecode, structname, nr, adr, adr); } -static void writedata(WriteData *wd, - int filecode, - int len, - const void *adr) /* do not use for structs */ +/* do not use for structs */ +static void writedata(WriteData *wd, int filecode, int len, const void *adr) { BHead bh; diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 6460c3db8c2..14817e9ffa1 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -545,7 +545,8 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), co /* escape if not our timer */ if ((reports->reporttimer == NULL) || (reports->reporttimer != event->customdata) || - ((report = BKE_reports_last_displayable(reports)) == NULL) /* may have been deleted */ + ((report = BKE_reports_last_displayable(reports)) == NULL) + /* may have been deleted */ ) { return OPERATOR_PASS_THROUGH; } diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 58a50da9846..d45a0588003 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -566,13 +566,8 @@ static void initSnappingMode(TransInfo *t) /* Edit mode */ if (t->tsnap.applySnap != NULL && // A snapping function actually exist ((obedit_type != -1) && - ELEM(obedit_type, - OB_MESH, - OB_ARMATURE, - OB_CURVE, - OB_LATTICE, - OB_MBALL))) // Temporary limited to edit mode meshes, armature, curves, metaballs - { + /* Temporary limited to edit mode meshes, armature, curves, metaballs. */ + ELEM(obedit_type, OB_MESH, OB_ARMATURE, OB_CURVE, OB_LATTICE, OB_MBALL))) { /* Exclude editmesh if using proportional edit */ if ((obedit_type == OB_MESH) && (t->flag & T_PROP_EDIT)) { t->tsnap.modeSelect = SNAP_NOT_ACTIVE; diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp index b1d44a55fd5..7a5469cd414 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp @@ -428,8 +428,8 @@ static PyObject *FrsMaterial_shininess_get(BPy_FrsMaterial *self, void *UNUSED(c static int FrsMaterial_shininess_set(BPy_FrsMaterial *self, PyObject *value, void *UNUSED(closure)) { float scalar; - if ((scalar = PyFloat_AsDouble(value)) == -1.0f && - PyErr_Occurred()) { /* parsed item not a number */ + if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) { + /* parsed item not a number */ PyErr_SetString(PyExc_TypeError, "value must be a number"); return -1; } diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp index 7d2716a3e71..505566d3515 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -577,8 +577,8 @@ static int StrokeAttribute_alpha_set(BPy_StrokeAttribute *self, void *UNUSED(closure)) { float scalar; - if ((scalar = PyFloat_AsDouble(value)) == -1.0f && - PyErr_Occurred()) { /* parsed item not a number */ + if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) { + /* parsed item not a number */ PyErr_SetString(PyExc_TypeError, "value must be a number"); return -1; } diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp index 503dd3bf044..74d8fe4ce60 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp @@ -282,8 +282,8 @@ static int StrokeVertex_curvilinear_abscissa_set(BPy_StrokeVertex *self, void *UNUSED(closure)) { float scalar; - if ((scalar = PyFloat_AsDouble(value)) == -1.0f && - PyErr_Occurred()) { /* parsed item not a number */ + if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) { + /* parsed item not a number */ PyErr_SetString(PyExc_TypeError, "value must be a number"); return -1; } @@ -328,8 +328,8 @@ static int StrokeVertex_stroke_length_set(BPy_StrokeVertex *self, void *UNUSED(closure)) { float scalar; - if ((scalar = PyFloat_AsDouble(value)) == -1.0f && - PyErr_Occurred()) { /* parsed item not a number */ + if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) { + /* parsed item not a number */ PyErr_SetString(PyExc_TypeError, "value must be a number"); return -1; } diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index f712009b191..df80f61a7a6 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -435,8 +435,8 @@ static PyObject *Stroke_length_2d_get(BPy_Stroke *self, void *UNUSED(closure)) static int Stroke_length_2d_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure)) { float scalar; - if ((scalar = PyFloat_AsDouble(value)) == -1.0f && - PyErr_Occurred()) { /* parsed item not a number */ + if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) { + /* parsed item not a number */ PyErr_SetString(PyExc_TypeError, "value must be a number"); return -1; } diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 7b3de4167a2..69dec88e727 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -969,8 +969,8 @@ int IMB_exr_begin_read(void *handle, const char *filename, int *width, int *heig ExrHandle *data = (ExrHandle *)handle; ExrChannel *echan; - if (BLI_exists(filename) && - BLI_file_size(filename) > 32) { /* 32 is arbitrary, but zero length files crashes exr */ + /* 32 is arbitrary, but zero length files crashes exr. */ + if (BLI_exists(filename) && BLI_file_size(filename) > 32) { /* avoid crash/abort when we don't have permission to write here */ try { data->ifile_stream = new IFileStream(filename); @@ -1957,8 +1957,8 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem, } } - if (is_multi && - ((flags & IB_thumbnail) == 0)) { /* only enters with IB_multilayer flag set */ + /* Only enters with IB_multilayer flag set. */ + if (is_multi && ((flags & IB_thumbnail) == 0)) { /* constructs channels for reading, allocates memory in channels */ ExrHandle *handle = imb_exr_begin_read_mem(*membuf, *file, width, height); if (handle) { diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 8c3e1a724cf..9834520f952 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -1870,8 +1870,8 @@ int rna_property_override_diff_default(Main *bmain, # undef RNA_PATH_FREE } - equals = equals && !(iter_a.valid || iter_b.valid) && - !abort; /* Not same number of items in both collections... */ + /* Not same number of items in both collections. */ + equals = equals && !(iter_a.valid || iter_b.valid) && !abort; RNA_property_collection_end(&iter_a); RNA_property_collection_end(&iter_b); diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c index c41abfb6eb2..cff700e8d45 100644 --- a/source/blender/modifiers/intern/MOD_decimate.c +++ b/source/blender/modifiers/intern/MOD_decimate.c @@ -200,8 +200,8 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes updateFaceCount(ctx, dmd, bm->totface); result = BKE_mesh_from_bmesh_for_eval_nomain(bm, NULL); - BLI_assert(bm->vtoolflagpool == NULL && bm->etoolflagpool == NULL && - bm->ftoolflagpool == NULL); /* make sure we never alloc'd these */ + /* make sure we never alloc'd these */ + BLI_assert(bm->vtoolflagpool == NULL && bm->etoolflagpool == NULL && bm->ftoolflagpool == NULL); BLI_assert(bm->vtable == NULL && bm->etable == NULL && bm->ftable == NULL); BM_mesh_free(bm); diff --git a/source/blender/nodes/shader/nodes/node_shader_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c index 70432e04180..f0cd2273e67 100644 --- a/source/blender/nodes/shader/nodes/node_shader_math.c +++ b/source/blender/nodes/shader/nodes/node_shader_math.c @@ -64,9 +64,8 @@ static void node_shader_exec_math(void *UNUSED(data), break; } case NODE_MATH_SIN: { - if (in[0]->hasinput || - !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - { + /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) { r = sinf(a); } else { @@ -75,9 +74,8 @@ static void node_shader_exec_math(void *UNUSED(data), break; } case NODE_MATH_COS: { - if (in[0]->hasinput || - !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - { + /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) { r = cosf(a); } else { @@ -86,9 +84,8 @@ static void node_shader_exec_math(void *UNUSED(data), break; } case NODE_MATH_TAN: { - if (in[0]->hasinput || - !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - { + /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) { r = tanf(a); } else { @@ -97,8 +94,8 @@ static void node_shader_exec_math(void *UNUSED(data), break; } case NODE_MATH_ASIN: { - if (in[0]->hasinput || - !in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */ + /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) { /* Can't do the impossible... */ if (a <= 1 && a >= -1) { r = asinf(a); @@ -119,8 +116,8 @@ static void node_shader_exec_math(void *UNUSED(data), break; } case NODE_MATH_ACOS: { - if (in[0]->hasinput || - !in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */ + /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) { /* Can't do the impossible... */ if (a <= 1 && a >= -1) { r = acosf(a); @@ -141,9 +138,8 @@ static void node_shader_exec_math(void *UNUSED(data), break; } case NODE_MATH_ATAN: { - if (in[0]->hasinput || - !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - { + /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) { r = atan(a); } else { @@ -200,9 +196,8 @@ static void node_shader_exec_math(void *UNUSED(data), break; } case NODE_MATH_ROUND: { - if (in[0]->hasinput || - !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - { + /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) { r = (a < 0) ? (int)(a - 0.5f) : (int)(a + 0.5f); } else { @@ -246,9 +241,8 @@ static void node_shader_exec_math(void *UNUSED(data), break; } case NODE_MATH_FLOOR: { - if (in[0]->hasinput || - !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - { + /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) { r = floorf(a); } else { @@ -257,9 +251,8 @@ static void node_shader_exec_math(void *UNUSED(data), break; } case NODE_MATH_CEIL: { - if (in[0]->hasinput || - !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - { + /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) { r = ceilf(a); } else { @@ -268,9 +261,8 @@ static void node_shader_exec_math(void *UNUSED(data), break; } case NODE_MATH_FRACT: { - if (in[0]->hasinput || - !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - { + /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) { r = a - floorf(a); } else { @@ -279,9 +271,8 @@ static void node_shader_exec_math(void *UNUSED(data), break; } case NODE_MATH_SQRT: { - if (in[0]->hasinput || - !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - { + /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) { if (a > 0) { r = sqrt(a); } diff --git a/source/blender/nodes/shader/nodes/node_shader_vectMath.c b/source/blender/nodes/shader/nodes/node_shader_vectMath.c index c6b74e2a727..41273a6dc1d 100644 --- a/source/blender/nodes/shader/nodes/node_shader_vectMath.c +++ b/source/blender/nodes/shader/nodes/node_shader_vectMath.c @@ -78,8 +78,8 @@ static void node_shader_exec_vect_math(void *UNUSED(data), out[1]->vec[0] = normalize_v3(out[0]->vec); } else if (node->custom1 == 5) { /* Normalize */ - if (in[0]->hasinput || - !in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */ + /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) { out[0]->vec[0] = vec1[0]; out[0]->vec[1] = vec1[1]; out[0]->vec[2] = vec1[2]; diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index 10f1407f8f5..2c9a25d24bc 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -1415,8 +1415,8 @@ static int vector_ass_item_internal(VectorObject *self, int i, PyObject *value, return -1; } - if ((scalar = PyFloat_AsDouble(value)) == -1.0f && - PyErr_Occurred()) { /* parsed item not a number */ + if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) { + /* parsed item not a number */ PyErr_SetString(PyExc_TypeError, "vector[index] = x: " "assigned value not a number"); @@ -1950,8 +1950,8 @@ static PyObject *Vector_div(PyObject *v1, PyObject *v2) return NULL; } - if ((scalar = PyFloat_AsDouble(v2)) == -1.0f && - PyErr_Occurred()) { /* parsed item not a number */ + if ((scalar = PyFloat_AsDouble(v2)) == -1.0f && PyErr_Occurred()) { + /* parsed item not a number */ PyErr_SetString(PyExc_TypeError, "Vector division: " "Vector must be divided by a float"); @@ -1989,8 +1989,8 @@ static PyObject *Vector_idiv(PyObject *v1, PyObject *v2) return NULL; } - if ((scalar = PyFloat_AsDouble(v2)) == -1.0f && - PyErr_Occurred()) { /* parsed item not a number */ + if ((scalar = PyFloat_AsDouble(v2)) == -1.0f && PyErr_Occurred()) { + /* parsed item not a number */ PyErr_SetString(PyExc_TypeError, "Vector division: " "Vector must be divided by a float"); -- cgit v1.2.3