[Bf-blender-cvs] [2a96e8be398] master: Cleanup: redundant parenthesis, NULL checks

Campbell Barton noreply at git.blender.org
Mon Apr 20 04:17:10 CEST 2020


Commit: 2a96e8be39876dc42201dd640bbf57c8396bd542
Author: Campbell Barton
Date:   Mon Apr 20 12:08:29 2020 +1000
Branches: master
https://developer.blender.org/rB2a96e8be39876dc42201dd640bbf57c8396bd542

Cleanup: redundant parenthesis, NULL checks

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

M	intern/dualcon/dualcon.h
M	intern/dualcon/intern/octree.cpp
M	source/blender/editors/physics/physics_fluid.c
M	source/blender/modifiers/intern/MOD_surfacedeform.c

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

diff --git a/intern/dualcon/dualcon.h b/intern/dualcon/dualcon.h
index e9bff72a1ce..60cec101545 100644
--- a/intern/dualcon/dualcon.h
+++ b/intern/dualcon/dualcon.h
@@ -29,7 +29,7 @@ typedef float (*DualConCo)[3];
 
 typedef unsigned int (*DualConTri)[3];
 
-typedef unsigned int(*DualConLoop);
+typedef unsigned int *DualConLoop;
 
 typedef struct DualConInput {
   DualConLoop mloop;
diff --git a/intern/dualcon/intern/octree.cpp b/intern/dualcon/intern/octree.cpp
index 70b3b8bb457..c9d5639cb5d 100644
--- a/intern/dualcon/intern/octree.cpp
+++ b/intern/dualcon/intern/octree.cpp
@@ -480,7 +480,7 @@ void Octree::trace()
   if (chdpath != NULL) {
     dc_printf("there are incomplete rings.\n");
     printPaths(chdpath);
-  };
+  }
 }
 
 Node *Octree::trace(Node *newnode, int *st, int len, int depth, PathList *&paths)
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index eb808398254..5550f1a63c8 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -361,7 +361,7 @@ static void fluid_bake_endjob(void *customdata)
         RPT_INFO, "Fluid: %s complete! (%.2f)", job->name, PIL_check_seconds_timer() - job->start);
   }
   else {
-    if (mds->error != NULL && mds->error[0] != '\0') {
+    if (mds->error[0] != '\0') {
       WM_reportf(RPT_ERROR, "Fluid: %s failed: %s", job->name, mds->error);
     }
     else { /* User canceled the bake */
@@ -473,7 +473,7 @@ static void fluid_free_endjob(void *customdata)
         RPT_INFO, "Fluid: %s complete! (%.2f)", job->name, PIL_check_seconds_timer() - job->start);
   }
   else {
-    if (mds->error != NULL && mds->error[0] != '\0') {
+    if (mds->error[0] != '\0') {
       WM_reportf(RPT_ERROR, "Fluid: %s failed: %s", job->name, mds->error);
     }
     else { /* User canceled the free job */
diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c
index 4ef1f32462a..b6b936dca6b 100644
--- a/source/blender/modifiers/intern/MOD_surfacedeform.c
+++ b/source/blender/modifiers/intern/MOD_surfacedeform.c
@@ -112,7 +112,7 @@ typedef struct SDefDeformData {
   const SDefVert *const bind_verts;
   float (*const targetCos)[3];
   float (*const vertexCos)[3];
-  float(*const weights);
+  float *const weights;
   float const strength;
 } SDefDeformData;



More information about the Bf-blender-cvs mailing list