From 89d5714d8f233b4bbb83f6a7b33237e2ec04ee79 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 17 Nov 2021 17:22:05 +0100 Subject: Build: match GCC and Clang float conversion warnings in Cycles --- intern/cycles/util/math.h | 2 +- intern/cycles/util/progress.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'intern/cycles/util') diff --git a/intern/cycles/util/math.h b/intern/cycles/util/math.h index e4c7df6e44a..2e13eecd002 100644 --- a/intern/cycles/util/math.h +++ b/intern/cycles/util/math.h @@ -801,7 +801,7 @@ ccl_device_inline float2 map_to_sphere(const float3 co) * https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ */ -ccl_device_inline float compare_floats(float a, float b, float abs_diff, int ulp_diff) +ccl_device_inline bool compare_floats(float a, float b, float abs_diff, int ulp_diff) { if (fabsf(a - b) < abs_diff) { return true; diff --git a/intern/cycles/util/progress.h b/intern/cycles/util/progress.h index f2d80e49ab8..15bd26d34bf 100644 --- a/intern/cycles/util/progress.h +++ b/intern/cycles/util/progress.h @@ -207,7 +207,7 @@ class Progress { if (total_pixel_samples > 0) { return ((double)pixel_samples) / (double)total_pixel_samples; } - return 0.0f; + return 0.0; } void add_samples(uint64_t pixel_samples_, int tile_sample) -- cgit v1.2.3