diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-11-17 19:22:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-11-17 19:29:41 +0300 |
commit | 89d5714d8f233b4bbb83f6a7b33237e2ec04ee79 (patch) | |
tree | beee985786bb7660ec42f7f11bda91bc77c31bc9 /intern/cycles/util | |
parent | ea7efa556936851075c2bda2f772ba4a7674a01c (diff) |
Build: match GCC and Clang float conversion warnings in Cycles
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/math.h | 2 | ||||
-rw-r--r-- | intern/cycles/util/progress.h | 2 |
2 files changed, 2 insertions, 2 deletions
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) |