[Bf-blender-cvs] [0dbd05ffdd5] master: Cleanup: Cleanup: style, use braces for collada (BCMath)

Campbell Barton noreply at git.blender.org
Tue Jun 4 03:31:39 CEST 2019


Commit: 0dbd05ffdd52c62c055fa68ab42061831a71b1ee
Author: Campbell Barton
Date:   Tue Jun 4 11:14:59 2019 +1000
Branches: master
https://developer.blender.org/rB0dbd05ffdd52c62c055fa68ab42061831a71b1ee

Cleanup: Cleanup: style, use braces for collada (BCMath)

===================================================================

M	source/blender/collada/BCMath.cpp

===================================================================

diff --git a/source/blender/collada/BCMath.cpp b/source/blender/collada/BCMath.cpp
index c82ecbb7441..ec9977c1469 100644
--- a/source/blender/collada/BCMath.cpp
+++ b/source/blender/collada/BCMath.cpp
@@ -183,8 +183,9 @@ void BCMatrix::get_matrix(DMatrix &mat, const bool transposed, const int precisi
   for (int i = 0; i < 4; i++) {
     for (int j = 0; j < 4; j++) {
       float val = (transposed) ? matrix[j][i] : matrix[i][j];
-      if (precision >= 0)
+      if (precision >= 0) {
         val = floor((val * pow(10, precision) + 0.5)) / pow(10, precision);
+      }
       mat[i][j] = val;
     }
   }
@@ -198,8 +199,9 @@ void BCMatrix::get_matrix(Matrix &mat,
   for (int i = 0; i < 4; i++) {
     for (int j = 0; j < 4; j++) {
       float val = (transposed) ? matrix[j][i] : matrix[i][j];
-      if (precision >= 0)
+      if (precision >= 0) {
         val = floor((val * pow(10, precision) + 0.5)) / pow(10, precision);
+      }
       mat[i][j] = val;
     }
   }



More information about the Bf-blender-cvs mailing list