Cleanup: comments/style
authorCampbell Barton <ideasman42@gmail.com>
Thu, 5 Nov 2015 18:09:14 +0000 (05:09 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 5 Nov 2015 18:34:05 +0000 (05:34 +1100)
source/blender/blenkernel/intern/softbody.c
source/blender/blenlib/intern/easing.c
source/blender/blenlib/intern/task.c
source/blender/bmesh/intern/bmesh_polygon.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_image/image_draw.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/transform/transform.c
source/blender/freestyle/intern/scene_graph/SceneHash.cpp

index 880a47b3256eede8be06649b2db63ab2c8a13928..9c4074275f067d3edecd305c6398990dfd7d7a0f 100644 (file)
@@ -2229,7 +2229,7 @@ static void softbody_calc_forcesEx(Scene *scene, Object *ob, float forcetime, fl
        /* bproot= sb->bpoint; */ /* need this for proper spring addressing */ /* UNUSED */
 
        if (do_springcollision || do_aero)
-       sb_sfesf_threads_run(scene, ob, timenow, sb->totspring, NULL);
+               sb_sfesf_threads_run(scene, ob, timenow, sb->totspring, NULL);
 
        /* after spring scan because it uses Effoctors too */
        do_effector= pdInitEffectors(scene, ob, NULL, sb->effector_weights, true);
index 90c8528338ed30a6c78a0d79f5eafea8a408c781..93c3cad904c1098b38947379410ad55f8444da64 100644 (file)
@@ -330,7 +330,7 @@ float BLI_easing_quint_ease_out(float time, float begin, float change, float dur
 float BLI_easing_quint_ease_in_out(float time, float begin, float change, float duration)
 {
        if ((time /= duration / 2) < 1.0f)
-                return change / 2 * time * time * time * time * time + begin;
+               return change / 2 * time * time * time * time * time + begin;
        time -= 2.0f;
        return change / 2 * (time * time * time * time * time + 2) + begin;
 }
index a5325aa1cc5f9179640fb3241ca9f082cecc51a0..5803448a4c0358b5b87774a92cb0ec23dd8ad75a 100644 (file)
@@ -140,10 +140,10 @@ static bool task_scheduler_thread_wait_pop(TaskScheduler *scheduler, Task **task
                /* Assuming we can only have a void queue in 'exit' case here seems logical (we should only be here after
                 * our worker thread has been woken up from a condition_wait(), which only happens after a new task was
                 * added to the queue), but it is wrong.
-                * Waiting on condition may wake up the thread even if condition is not signaled (spurious wakeups), and some
+                * Waiting on condition may wake up the thread even if condition is not signaled (spurious wake-ups), and some
                 * race condition may also empty the queue **after** condition has been signaled, but **before** awoken thread
                 * reaches this point...
-                * See http://stackoverflow.com/questions/8594591/why-does-pthread-cond-wait-have-spurious-wakeups
+                * See http://stackoverflow.com/questions/8594591
                 *
                 * So we only abort here if do_exit is set.
                 */
@@ -399,7 +399,7 @@ TaskPool *BLI_task_pool_create(TaskScheduler *scheduler, void *userdata)
  * \a BLI_task_pool_work_and_wait() on it to be sure it will be processed).
  *
  * \note Background pools are non-recursive (that is, you should not create other background pools in tasks assigned
- *       to a brackground pool, they could end never being executed, since the 'fallback' background thread is already
+ *       to a background pool, they could end never being executed, since the 'fallback' background thread is already
  *       busy with parent task in single-threaded context).
  */
 TaskPool *BLI_task_pool_create_background(TaskScheduler *scheduler, void *userdata)
index 56d109fbea1b40a27f89da1c435304b1dda4905e..0465148fd88304e769e1804ad64be6f5f81728b8 100644 (file)
@@ -921,7 +921,6 @@ void BM_face_triangulate(
 
                /* loop over calculated triangles and create new geometry */
                for (i = 0; i < totfilltri; i++) {
-                       /* the order is reverse, otherwise the normal is flipped */
                        BMLoop *l_tri[3] = {
                            loops[tris[i][0]],
                            loops[tris[i][1]],
index feea40443faecd4ce789f37e823112e364d6d1d3..ccd1b7cb02956a93dcc5f826af3299f461ac01ba 100644 (file)
@@ -1307,7 +1307,7 @@ void file_sfile_filepath_set(SpaceFile *sfile, const char *filepath)
                        BLI_split_dirfile(filepath, sfile->params->dir, sfile->params->file,
                                          sizeof(sfile->params->dir), sizeof(sfile->params->file));
                }
-               else{
+               else {
                        BLI_split_dir_part(filepath, sfile->params->dir, sizeof(sfile->params->dir));
                }
        }
index 0357692fb4fa8a9c3a2b72565e4f991b629f6fec..7f405e8ad16be1f1457d28dd2cf2b4f15e48ed3d 100644 (file)
@@ -394,7 +394,7 @@ static int compare_direntry_generic(const FileListInternEntry *entry1, const Fil
                }
        }
        else if (entry2->typeflag & FILE_TYPE_DIR) {
-           return 1;
+               return 1;
        }
 
        /* make sure "." and ".." are always first */
@@ -1069,7 +1069,7 @@ static void filelist_cache_preview_runf(TaskPool *pool, void *taskdata, int UNUS
 
 //     printf("%s: %d - %s - %p\n", __func__, preview->index, preview->path, preview->img);
        BLI_assert(preview->flags & (FILE_TYPE_IMAGE | FILE_TYPE_MOVIE | FILE_TYPE_FTFONT |
-                                                                FILE_TYPE_BLENDER | FILE_TYPE_BLENDER_BACKUP | FILE_TYPE_BLENDERLIB));
+                                    FILE_TYPE_BLENDER | FILE_TYPE_BLENDER_BACKUP | FILE_TYPE_BLENDERLIB));
 
        if (preview->flags & FILE_TYPE_IMAGE) {
                source = THB_SOURCE_IMAGE;
index 81711df355c6a1ddfe29d0a7671e6787079e3786..35a53afa5501887e64ec465bce3417c6d2249c39 100644 (file)
@@ -622,7 +622,7 @@ static void draw_image_buffer_tiled(SpaceImage *sima, ARegion *ar, Scene *scene,
                        }
                        else {
                                glaDrawPixelsSafe(x, y, dx, dy, dx, GL_LUMINANCE, GL_UNSIGNED_INT,
-                                                 (unsigned char*)rect + channel_offset);
+                                                 (unsigned char *)rect + channel_offset);
                        }
                }
        }
index 253430a4b13999008ee570ceffa9c26eb93126e7..a209681e18c137a7ee96da9c115802e58813d961 100644 (file)
@@ -800,7 +800,7 @@ static Base *outline_delete_hierarchy(bContext *C, Scene *scene, Base *base)
        Object *parent;
 
        if (!base) {
-           return NULL;
+               return NULL;
        }
 
        for (child_base = scene->base.first; child_base; child_base = base_next) {
index 8025994d16c87df5ea259da9a931afa97c7af2d1..9d8db67b3ee0a69fa9129c3b69886c92d0868baa 100644 (file)
@@ -3858,8 +3858,7 @@ static int sequencer_export_subtitles_invoke(bContext *C, wmOperator *op, const
 static int sequencer_export_subtitles_exec(bContext *C, wmOperator *op)
 {
        Scene *scene = CTX_data_scene(C);
-       Sequence *seq = BKE_sequencer_active_get(scene);
-       Sequence *seq_next;
+       Sequence *seq, *seq_next;
        Editing *ed = BKE_sequencer_editing_get(scene, false);
        ListBase text_seq = {0};
        int iter = 0;
index b79c550241baffbb4f1f0305a5d574c56d92ae03..49634e558a150e902dfb9eaa5356758ecdd25a21 100644 (file)
@@ -5574,7 +5574,7 @@ static void slide_origdata_interp_data_vert(
                float (*faces_center)[3] = BLI_array_alloca(faces_center, l_num);
                BMLoop *l;
 
-               BM_ITER_ELEM_INDEX (l, &liter, sv->v, BM_LOOPS_OF_VERT, j) {;
+               BM_ITER_ELEM_INDEX (l, &liter, sv->v, BM_LOOPS_OF_VERT, j) {
                        BM_face_calc_center_mean(l->f, faces_center[j]);
                }
 
index 9d595c235c285d1dccc14db3870f5895f2756730..2af02ab57649a15c8bd28a7c9459715b227f42da 100644 (file)
@@ -30,9 +30,9 @@ namespace Freestyle {
 
 string SceneHash::toString()
 {
-        stringstream ss;
-        ss << hex << _sum;
-        return ss.str();
+       stringstream ss;
+       ss << hex << _sum;
+       return ss.str();
 }
 
 void SceneHash::visitNodeSceneRenderLayer(NodeSceneRenderLayer& node)