From d8dbd49a2f23b7637f05fc058f39bdf6ab706624 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 31 May 2019 22:51:19 +1000 Subject: Cleanup: style, use braces in source/ Automated using clang-tidy. --- source/blender/blenlib/intern/math_matrix.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 6ac1ac776b3..71655084b2b 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -1043,16 +1043,21 @@ bool invert_m4_m4_fallback(float inverse[4][4], const float mat[4][4]) BLI_assert(inverse != mat); /* Set inverse to identity */ - for (i = 0; i < 4; i++) - for (j = 0; j < 4; j++) + for (i = 0; i < 4; i++) { + for (j = 0; j < 4; j++) { inverse[i][j] = 0; - for (i = 0; i < 4; i++) + } + } + for (i = 0; i < 4; i++) { inverse[i][i] = 1; + } /* Copy original matrix so we don't mess it up */ - for (i = 0; i < 4; i++) - for (j = 0; j < 4; j++) + for (i = 0; i < 4; i++) { + for (j = 0; j < 4; j++) { tempmat[i][j] = mat[i][j]; + } + } for (i = 0; i < 4; i++) { /* Look for row with max pivot */ @@ -1441,10 +1446,11 @@ bool is_orthonormal_m4(const float m[4][4]) if (is_orthogonal_m4(m)) { int i; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { if (fabsf(dot_v4v4(m[i], m[i]) - 1) > 1e-5f) { return false; } + } return true; } -- cgit v1.2.3