[Bf-blender-cvs] [e6c531353b8] blender2.8: Cleanup: Reduce indentation level

Sergey Sharybin noreply at git.blender.org
Tue Dec 18 12:54:54 CET 2018


Commit: e6c531353b842b671a3a32dc56a03d0b88e173d5
Author: Sergey Sharybin
Date:   Tue Dec 18 12:46:03 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBe6c531353b842b671a3a32dc56a03d0b88e173d5

Cleanup: Reduce indentation level

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

M	source/blender/editors/space_info/info_stats.c

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

diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index e1823010e0d..b027d6c3df0 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -97,26 +97,26 @@ typedef struct SceneStatsFmt {
 
 static bool stats_mesheval(Mesh *me_eval, int sel, int totob, SceneStats *stats)
 {
-	int totvert, totedge, totface, totloop;
+	if (me_eval == NULL) {
+		return false;
+	}
 
-	if (me_eval) {
-		totvert = me_eval->totvert;
-		totedge = me_eval->totedge;
-		totface = me_eval->totpoly;
-		totloop = me_eval->totloop;
+	int totvert, totedge, totface, totloop;
+	totvert = me_eval->totvert;
+	totedge = me_eval->totedge;
+	totface = me_eval->totpoly;
+	totloop = me_eval->totloop;
 
-		stats->totvert += totvert * totob;
-		stats->totedge += totedge * totob;
-		stats->totface += totface * totob;
-		stats->tottri  += poly_to_tri_count(totface, totloop) * totob;
+	stats->totvert += totvert * totob;
+	stats->totedge += totedge * totob;
+	stats->totface += totface * totob;
+	stats->tottri  += poly_to_tri_count(totface, totloop) * totob;
 
-		if (sel) {
-			stats->totvertsel += totvert;
-			stats->totfacesel += totface;
-		}
-		return true;
+	if (sel) {
+		stats->totvertsel += totvert;
+		stats->totfacesel += totface;
 	}
-	return false;
+	return true;
 }
 
 static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)



More information about the Bf-blender-cvs mailing list