Cleanup: double promotion
authorCampbell Barton <ideasman42@gmail.com>
Wed, 10 Feb 2016 02:59:57 +0000 (13:59 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 10 Feb 2016 04:27:28 +0000 (15:27 +1100)
Also remove null checks from args with non-null attribute.

source/blender/blenlib/intern/storage.c
source/blender/blenlib/intern/string.c
source/blender/editors/interface/interface_templates.c
source/blender/render/intern/source/pipeline.c

index 260a23c41dc659068f5229203ada6990d6268c27..aba7c9d5ee20a508401c435d9ea6db0e979483f4 100644 (file)
@@ -232,7 +232,6 @@ int BLI_exists(const char *name)
        if (res == -1) return(0);
 #else
        struct stat st;
-       BLI_assert(name);
        BLI_assert(!BLI_path_is_rel(name));
        if (stat(name, &st)) return(0);
 #endif
index efc89ff6a155d16500d4a4f578c1859512e21d1c..aad4649344f9ea64558388c7b10a245bd7e6e0ee 100644 (file)
@@ -302,8 +302,6 @@ char *BLI_sprintfN(const char *__restrict format, ...)
        va_list arg;
        char *n;
 
-       BLI_assert(format != NULL);
-
        va_start(arg, format);
 
        ds = BLI_dynstr_new();
index a404cde371e1bb68a5a5e54f5d6b842f2b91c82a..d149c8cb7a462edb5b557e70019b201401b1f117 100644 (file)
@@ -3399,7 +3399,7 @@ static char *progress_tooltip_func(bContext *UNUSED(C), void *argN, const char *
        BLI_timecode_string_from_time_simple(elapsed_str, sizeof(elapsed_str), elapsed);
 
        if (progress) {
-               const double remaining = (elapsed / progress) - elapsed;
+               const double remaining = (elapsed / (double)progress) - elapsed;
                BLI_timecode_string_from_time_simple(remaining_str, sizeof(remaining_str), remaining);
        }
 
index 8f5b3150bce38cb8f6002966fa7ed6d09cdb8069..59b9da9b2a686d415e330346ad59eae9bdee677d 100644 (file)
@@ -1506,7 +1506,9 @@ static void do_render_3d(Render *re)
        const int cfra_backup = re->scene->r.cfra;
        const float subframe_backup = re->scene->r.subframe;
 
-       BKE_scene_frame_set(re->scene, (double)re->scene->r.cfra + re->scene->r.subframe + re->mblur_offs + re->field_offs);
+       BKE_scene_frame_set(
+               re->scene, (double)re->scene->r.cfra + (double)re->scene->r.subframe +
+               (double)re->mblur_offs + (double)re->field_offs);
 
        /* init main render result */
        main_render_result_new(re);