Cleanup: double promotion

Also remove null checks from args with non-null attribute.
This commit is contained in:
Campbell Barton
2016-02-10 13:59:57 +11:00
parent 184a2ee5a4
commit 2cbf32e0fb
4 changed files with 4 additions and 5 deletions

View 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

View 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();

View 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);
}

View 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);