Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-09-28 11:11:28 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-09-28 11:11:28 +0300
commit763c78fccbfda2e3e9518bbeb4fba900f821762f (patch)
tree707a7e5292580f6f80ce21a5ed73826f730f71ad /source/blender/draw/intern/draw_debug.c
parent6398e6608f5d9b8b512d76657325c00a3cd2036c (diff)
Fix/workaround stupidity of CLang
Seems there is something wrong with ternary operator and type deduction. Copying matrix to a variable with cleaner name seems to be better solution than to force cast to an array.
Diffstat (limited to 'source/blender/draw/intern/draw_debug.c')
-rw-r--r--source/blender/draw/intern/draw_debug.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_debug.c b/source/blender/draw/intern/draw_debug.c
index c748b8fb0d8..053d266ec34 100644
--- a/source/blender/draw/intern/draw_debug.c
+++ b/source/blender/draw/intern/draw_debug.c
@@ -111,14 +111,17 @@ void DRW_debug_m4_as_bbox(const float m[4][4], const float color[4], const bool
{
BoundBox bb;
const float min[3] = {-1.0f, -1.0f, -1.0f}, max[3] = {1.0f, 1.0f, 1.0f};
- float minv[4][4];
+ float project_matrix[4][4];
if (invert) {
- invert_m4_m4(minv, m);
+ invert_m4_m4(project_matrix, m);
+ }
+ else {
+ copy_m4_m4(project_matrix, m);
}
BKE_boundbox_init_from_minmax(&bb, min, max);
for (int i = 0; i < 8; ++i) {
- mul_project_m4_v3((invert) ? minv : m, bb.vec[i]);
+ mul_project_m4_v3(project_matrix, bb.vec[i]);
}
DRW_debug_bbox(&bb, color);
}