From 2026179bb20e2220459129dfced535bee0983cbf Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 27 Feb 2018 11:14:17 +0100 Subject: Collada: Use floating point version of abs() Avoids implicit cast of float to int. --- source/blender/collada/collada_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/collada/collada_utils.h b/source/blender/collada/collada_utils.h index bbe36f2999c..0069b4d4871 100644 --- a/source/blender/collada/collada_utils.h +++ b/source/blender/collada/collada_utils.h @@ -105,7 +105,7 @@ extern int bc_set_layer(int bitfield, int layer, bool enable); extern int bc_set_layer(int bitfield, int layer); inline bool bc_in_range(float a, float b, float range) { - return abs(a - b) < range; + return fabsf(a - b) < range; } void bc_copy_m4_farray(float r[4][4], float *a); void bc_copy_farray_m4(float *r, float a[4][4]); -- cgit v1.2.3 From 26f4ce4a769b142446def40f53ce22d8b30c617c Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 27 Feb 2018 11:14:55 +0100 Subject: Collada: Remove unused vector of flaot[4][4] values Was in fact causing issues on macOS, something to do with a destructor. --- source/blender/collada/AnimationExporter.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index 54da8b98138..3eefe84b214 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -155,7 +155,6 @@ void AnimationExporter::export_keyframed_animation_set(Object *ob) if (this->export_settings->export_transformation_type == BC_TRANSFORMATION_TYPE_MATRIX) { std::vector ctimes; - std::vector values; find_keyframes(ob, ctimes); if (ctimes.size() > 0) export_sampled_matrix_animation(ob, ctimes); -- cgit v1.2.3