Cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Fri, 2 Jun 2017 05:38:04 +0000 (15:38 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 2 Jun 2017 05:38:04 +0000 (15:38 +1000)
18 files changed:
source/blender/alembic/intern/abc_exporter.cc
source/blender/alembic/intern/abc_util.cc
source/blender/alembic/intern/alembic_capi.cc
source/blender/blenkernel/intern/mesh_mapping.c
source/blender/blenkernel/intern/particle_distribute.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/scene.c
source/blender/blenlib/intern/math_color_blend_inline.c
source/blender/depsgraph/intern/eval/deg_eval_flush.cc
source/blender/editors/curve/editcurve.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/space_text/text_autocomplete.c
source/blender/editors/transform/transform.c
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
source/blender/gpu/shaders/gpu_shader_material.glsl
source/blender/imbuf/intern/cineon/dpxlib.c
source/blender/render/intern/source/rendercore.c
source/gameengine/Ketsji/KX_SoundActuator.cpp

index 3da67ac08652a8933ae6e43c1a9415d81466ea46..3f359990980a745e335d2f0bbbdcf0ed8ef24e92 100644 (file)
@@ -428,7 +428,7 @@ AbcTransformWriter * AbcExporter::createTransformWriter(Object *ob, Object *pare
 
        /* check if we have already created a transform writer for this object */
        AbcTransformWriter *my_writer = getXForm(name);
-       if (my_writer != NULL){
+       if (my_writer != NULL) {
                return my_writer;
        }
 
index 67d2d3b1eb2f70cd6f579f6272eb0f1402eb1ea9..26eb7620fb166efb6265dfe67b64804b8f9332fc 100644 (file)
@@ -142,7 +142,7 @@ void create_swapped_rotation_matrix(
        float rz;
 
        /* Apply transformation */
-       switch(mode) {
+       switch (mode) {
                case ABC_ZUP_FROM_YUP:
                        ry = -euler[2];
                        rz = euler[1];
@@ -217,7 +217,7 @@ void copy_m44_axis_swap(float dst_mat[4][4], float src_mat[4][4], AbcAxisSwapMod
        copy_m4_m3(dst_mat, dst_rot);
 
        /* Apply translation */
-       switch(mode) {
+       switch (mode) {
                case ABC_ZUP_FROM_YUP:
                        copy_zup_from_yup(dst_mat[3], src_trans);
                        break;
index 5ac73175e5b73586dfa706e68b6baf9ba1f2589a..be4540500983f41353d9290c704b84a5d4f6adf1 100644 (file)
@@ -452,7 +452,8 @@ static std::pair<bool, AbcObjectReader *> visit_object(
                else {
                        if (child_claims_this_object) {
                                claiming_child_readers.push_back(child_reader);
-                       } else {
+                       }
+                       else {
                                nonclaiming_child_readers.push_back(child_reader);
                        }
                }
index 8562988b5e1a49213c24db5a50552365a2ac78cf..525c0c9728ec2a5f896e9ea7b63868f4d61c7e0c 100644 (file)
@@ -165,7 +165,7 @@ UvVertMap *BKE_mesh_uv_vert_map_create(
                vmap->vert[a] = newvlist;
        }
 
-       if (use_winding)  {
+       if (use_winding) {
                MEM_freeN(winding);
        }
 
index 44cf5b119c17a89787a366b7316cca9bec07e299..6603521c42f87fccb8e7d09337f9385150e298e5 100644 (file)
@@ -1092,7 +1092,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti
 
        /* For hair, sort by origindex (allows optimization's in rendering), */
        /* however with virtual parents the children need to be in random order. */
-       if (part->type == PART_HAIR && !(part->childtype==PART_CHILD_FACES && part->parents!=0.0f)) {
+       if (part->type == PART_HAIR && !(part->childtype==PART_CHILD_FACES && part->parents != 0.0f)) {
                int *orig_index = NULL;
 
                if (from == PART_FROM_VERT) {
index 943dc7812461703ecab0703ed1b172c8f787d87f..3f9a92a5577aa3298bcaa6766895cd3be760b3fb 100644 (file)
@@ -1000,7 +1000,7 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
        part=psys->part;
        
        /* get precise emitter matrix if particle is born */
-       if (part->type!=PART_HAIR && dtime > 0.f && pa->time < cfra && pa->time >= sim->psys->cfra) {
+       if (part->type != PART_HAIR && dtime > 0.f && pa->time < cfra && pa->time >= sim->psys->cfra) {
                evaluate_emitter_anim(sim->scene, sim->ob, pa->time);
 
                psys->flag |= PSYS_OB_ANIM_RESTORE;
@@ -1183,7 +1183,7 @@ static void set_keyed_keys(ParticleSimulationData *sim)
                                key->time = pa->time;
                }
 
-               if (psys->flag & PSYS_KEYED_TIMING && pt->duration!=0.0f)
+               if (psys->flag & PSYS_KEYED_TIMING && pt->duration != 0.0f)
                        k++;
 
                ksim.psys->flag |= keyed_flag;
index 5933aaccd66290a9eaa8a0ae4091a0d334f72d58..44b71416bf0fc5537b358b2c332abae1862ffde9 100644 (file)
@@ -2137,7 +2137,7 @@ bool BKE_scene_remove_render_view(Scene *scene, SceneRenderView *srv)
 
 int get_render_subsurf_level(const RenderData *r, int lvl, bool for_render)
 {
-       if (r->mode & R_SIMPLIFY)  {
+       if (r->mode & R_SIMPLIFY) {
                if (for_render)
                        return min_ii(r->simplify_subsurf_render, lvl);
                else
index 048ab71c6dc9119606dc7bed77c1df52fa53c47e..dc3874f83a253520c4e4a36b8b43e914514a6dfd 100644 (file)
@@ -444,7 +444,7 @@ MINLINE void blend_color_vividlight_byte(unsigned char dst[4], unsigned const ch
                        else if (src2[i] == 0) {
                                temp = 0;
                        }
-                       else if (src2[i] > 127)  {
+                       else if (src2[i] > 127) {
                                temp = min_ii(((src1[i]) * 255) / (2 * (255 - src2[i])), 255);
                        }
                        else {
index 963c16c3a13b6cbeddf3a2e9174836a89619fb86..611c78a5ffed40433be1666e71e796bb43b307c8 100644 (file)
@@ -139,18 +139,18 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
                        IDDepsNode *id_node = comp_node->owner;
 
                        ID *id = id_node->id;
-                       if(id_node->done == 0) {
+                       if (id_node->done == 0) {
                                deg_editors_id_update(bmain, id);
                                lib_id_recalc_tag(bmain, id);
                                /* TODO(sergey): For until we've got proper data nodes in the graph. */
                                lib_id_recalc_data_tag(bmain, id);
                        }
 
-                       if(comp_node->done == 0) {
+                       if (comp_node->done == 0) {
                                Object *object = NULL;
                                if (GS(id->name) == ID_OB) {
                                        object = (Object *)id;
-                                       if(id_node->done == 0) {
+                                       if (id_node->done == 0) {
                                                ++num_flushed_objects;
                                        }
                                }
index a69264cd0126a93738d85ff46d2ebd1cae4142b2..8a366ce6a817710ab4a4fbebd2533b1920e88188 100644 (file)
@@ -4160,7 +4160,7 @@ static int make_segment_exec(bContext *C, wmOperator *op)
                                 */
 
                                bp = nu->bp;
-                               if (bp[nu->pntsu - 1].f1 & SELECT)  {
+                               if (bp[nu->pntsu - 1].f1 & SELECT) {
                                        if (nu2 == NULL) {
                                                nu2 = nu;
                                        }
index e22a145b3a6bddb38363838a64a8dfb54a5ac960..2541aaa4b11625cc653dc9ffb51718d036dd93e0 100644 (file)
@@ -4419,7 +4419,7 @@ void PE_undo_push(Scene *scene, const char *str)
                undo= undo->prev;
        }
        if (undo) {
-               while (edit->undo.first!=undo) {
+               while (edit->undo.first != undo) {
                        PTCacheUndo *first= edit->undo.first;
                        BLI_remlink(&edit->undo, first);
                        free_PTCacheUndo(first);
index 9b0bd30ff11f993a44b58d19fda4d20dd8485dd6..da5fa9da046fb45dc39c22283ddd31375e2ec0e8 100644 (file)
@@ -328,7 +328,7 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
                                        if (tools & TOOL_SUGG_LIST) {
                                                texttool_suggest_clear();
                                        }
-                                       if (tools & TOOL_DOCUMENT)  {
+                                       if (tools & TOOL_DOCUMENT) {
                                                texttool_docs_clear();
                                                doc_scroll = 0;
                                        }
index d786c75552948a9401509b4e787cdedd100de82a..971a6cbe788244d921f58d95ca6caa4da8d7941a 100644 (file)
@@ -4278,7 +4278,7 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_
                bUnit_AsString(distvec, sizeof(distvec), dist * t->scene->unit.scale_length, 4, t->scene->unit.system,
                               B_UNIT_LENGTH, do_split, false);
        }
-       else if (dist > 1e10f || dist < -1e10f)  {
+       else if (dist > 1e10f || dist < -1e10f) {
                /* prevent string buffer overflow */
                BLI_snprintf(distvec, NUM_STR_REP_LEN, "%.4e", dist);
        }
index f63cf7711209157a5e1131c211bf8a8aa65f987c..1dbac1848b7e282ce404c68c3f5c2090f7f89157 100644 (file)
@@ -524,7 +524,7 @@ void BlenderStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const
 
                                // We'll generate both with tips and without tips
                                // coordinates, on two different UV layers.
-                               if (ma->mtex[a]->texflag & MTEX_TIPS)  {
+                               if (ma->mtex[a]->texflag & MTEX_TIPS) {
                                        BLI_strncpy(ma->mtex[a]->uvname, uvNames[1], sizeof(ma->mtex[a]->uvname));
                                }
                                else {
index 5c52b7fd1530bf1b185e8468c1acdc9ffe1bb0e1..f6b39d77dc7d9c4fd2dea7a4a694c8dc8b51ed47 100644 (file)
@@ -3032,10 +3032,10 @@ vec2 calc_brick_texture(vec3 p, float mortar_size, float mortar_smooth, float bi
        float tint = clamp((integer_noise((rownum << 16) + (bricknum & 0xFFFF)) + bias), 0.0, 1.0);
 
        float min_dist = min(min(x, y), min(brick_width - x, row_height - y));
-       if(min_dist >= mortar_size) {
+       if (min_dist >= mortar_size) {
                return vec2(tint, 0.0);
        }
-       else if(mortar_smooth == 0.0) {
+       else if (mortar_smooth == 0.0) {
                return vec2(tint, 1.0);
        }
        else {
index 8b4e95ac4522d0e7c35c1752c589deb4ebefaf9c..429a19936a56dfa876c625a999f4bcdb16cfa7b7 100644 (file)
@@ -183,7 +183,7 @@ LogImageFile *dpxOpen(const unsigned char *byteStuff, int fromMemory, size_t buf
                if (verbose) printf("DPX: File is LSB.\n");
        }
        else {
-               if (verbose)  {
+               if (verbose) {
                        printf("DPX: Bad magic number %u in \"%s\".\n",
                               header.fileHeader.magic_num, byteStuff);
                }
index 59c7ea85c1dff28ba3d99540f70fcf29acd93051..77f399d08d14906e53669575660dd0b611c36634 100644 (file)
@@ -464,48 +464,48 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
                float *fp, *col= NULL;
                int pixsize= 3;
                
-               if(STREQ(rpass->name, RE_PASSNAME_COMBINED)) {
+               if (STREQ(rpass->name, RE_PASSNAME_COMBINED)) {
                        add_filt_fmask(curmask, shr->combined, rpass->rect + 4*offset, rectx);
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_Z)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_Z)) {
                        fp = rpass->rect + offset;
                        *fp = shr->z;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_RGBA)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_RGBA)) {
                        col = shr->col;
                        pixsize = 4;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_EMIT)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_EMIT)) {
                        col = shr->emit;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_DIFFUSE)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_DIFFUSE)) {
                        col = shr->diff;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_SPEC)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_SPEC)) {
                        col = shr->spec;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_SHADOW)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_SHADOW)) {
                        col = shr->shad;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_AO)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_AO)) {
                        col = shr->ao;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_ENVIRONMENT)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_ENVIRONMENT)) {
                        col = shr->env;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_INDIRECT)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_INDIRECT)) {
                        col = shr->indirect;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_REFLECT)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_REFLECT)) {
                        col = shr->refl;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_REFRACT)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_REFRACT)) {
                        col = shr->refr;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_NORMAL)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_NORMAL)) {
                        col = shr->nor;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_UV)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_UV)) {
                        /* box filter only, gauss will screwup UV too much */
                        if (shi->totuv) {
                                float mult = (float)count_mask(curmask)/(float)R.osa;
@@ -515,7 +515,7 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
                                fp[2]+= mult;
                        }
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_INDEXOB)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_INDEXOB)) {
                        /* no filter */
                        if (shi->vlr) {
                                fp = rpass->rect + offset;
@@ -523,7 +523,7 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
                                        *fp = (float)shi->obr->ob->index;
                        }
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_INDEXMA)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_INDEXMA)) {
                        /* no filter */
                        if (shi->vlr) {
                                        fp = rpass->rect + offset;
@@ -531,12 +531,12 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
                                                        *fp = (float)shi->mat->index;
                        }
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_MIST)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_MIST)) {
                        /*  */
                        col = &shr->mist;
                        pixsize = 1;
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_VECTOR)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_VECTOR)) {
                        /* add minimum speed in pixel, no filter */
                        fp = rpass->rect + 4*offset;
                        if ( (ABS(shr->winspeed[0]) + ABS(shr->winspeed[1]))< (ABS(fp[0]) + ABS(fp[1])) ) {
@@ -548,7 +548,7 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
                                fp[3] = shr->winspeed[3];
                        }
                }
-               else if(STREQ(rpass->name, RE_PASSNAME_RAYHITS)) {
+               else if (STREQ(rpass->name, RE_PASSNAME_RAYHITS)) {
                        /*  */
                        col = shr->rayhits;
                        pixsize= 4;
index 822f2e054f86dd96a6932700e36723b6c7bb2e58..d858097abef809e2783cf3a98f77b5529acef38b 100644 (file)
@@ -124,7 +124,7 @@ void KX_SoundActuator::play()
        AUD_Device_free(device);
 
        // in case of pingpong, we have to free the sound
-       if(sound != m_sound)
+       if (sound != m_sound)
                AUD_Sound_free(sound);
 
        if (m_handle != NULL) {