Cleanup: use braces, unused variable, unused enum
authorCampbell Barton <ideasman42@gmail.com>
Wed, 31 Jul 2019 23:03:50 +0000 (09:03 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 31 Jul 2019 23:03:50 +0000 (09:03 +1000)
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/paint_toolslots.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/space_text/space_text.c
source/blender/makesdna/DNA_gpencil_types.h

index 1382b8636377f77906945f315e694f89c00444a7..b01c1189fd1b2ddc7ccbcfd6946f489dcc68cab0 100644 (file)
@@ -1128,7 +1128,7 @@ static bool ntree_foreach_texnode_recursive(bNodeTree *nodetree,
   return true;
 }
 
-static bool count_texture_nodes_cb(bNode *node, void *userdata)
+static bool count_texture_nodes_cb(bNode *UNUSED(node), void *userdata)
 {
   (*((int *)userdata))++;
   return true;
index abaf5a96481fe1e2eb7ffea5216e0c3da91ecdbd..a252329b6355d02b20335b18b95c195915de9114 100644 (file)
@@ -67,16 +67,21 @@ void BKE_paint_toolslots_init_from_main(struct Main *bmain)
   for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
     ToolSettings *ts = scene->toolsettings;
     paint_toolslots_init(bmain, &ts->imapaint.paint);
-    if (ts->sculpt)
+    if (ts->sculpt) {
       paint_toolslots_init(bmain, &ts->sculpt->paint);
-    if (ts->vpaint)
+    }
+    if (ts->vpaint) {
       paint_toolslots_init(bmain, &ts->vpaint->paint);
-    if (ts->wpaint)
+    }
+    if (ts->wpaint) {
       paint_toolslots_init(bmain, &ts->wpaint->paint);
-    if (ts->uvsculpt)
+    }
+    if (ts->uvsculpt) {
       paint_toolslots_init(bmain, &ts->uvsculpt->paint);
-    if (ts->gp_paint)
+    }
+    if (ts->gp_paint) {
       paint_toolslots_init(bmain, &ts->gp_paint->paint);
+    }
   }
 }
 
index 9f6db2264d9c011de040e89698e48e1f76419aa0..91e07dc9f478a6e82a3c8dcff7e1ea6b07d2edce 100644 (file)
@@ -6414,16 +6414,21 @@ static void lib_link_scene(FileData *fd, Main *main)
       sce->gpd = newlibadr_us(fd, sce->id.lib, sce->gpd);
 
       link_paint(fd, sce, &sce->toolsettings->imapaint.paint);
-      if (sce->toolsettings->sculpt)
+      if (sce->toolsettings->sculpt) {
         link_paint(fd, sce, &sce->toolsettings->sculpt->paint);
-      if (sce->toolsettings->vpaint)
+      }
+      if (sce->toolsettings->vpaint) {
         link_paint(fd, sce, &sce->toolsettings->vpaint->paint);
-      if (sce->toolsettings->wpaint)
+      }
+      if (sce->toolsettings->wpaint) {
         link_paint(fd, sce, &sce->toolsettings->wpaint->paint);
-      if (sce->toolsettings->uvsculpt)
+      }
+      if (sce->toolsettings->uvsculpt) {
         link_paint(fd, sce, &sce->toolsettings->uvsculpt->paint);
-      if (sce->toolsettings->gp_paint)
+      }
+      if (sce->toolsettings->gp_paint) {
         link_paint(fd, sce, &sce->toolsettings->gp_paint->paint);
+      }
 
       if (sce->toolsettings->sculpt) {
         sce->toolsettings->sculpt->gravity_object = newlibadr(
index 70985bbb0722406b7dcadb315d9a25e8dc9d4c54..c5e90cf247de532c1c60c07a0b17e9d74b2d9a1c 100644 (file)
@@ -254,8 +254,9 @@ static int text_context(const bContext *C, const char *member, bContextDataResul
     return 1;
   }
   else if (CTX_data_equals(member, "edit_text")) {
-    if (st->text)
+    if (st->text != NULL) {
       CTX_data_id_pointer_set(result, &st->text->id);
+    }
     return 1;
   }
 
index 9134e603a87212dcbf29faf6d28b7d3d4c62134f..bf72ce5e598941034bdd10409607effc8f743676 100644 (file)
@@ -148,8 +148,7 @@ typedef struct bGPDpalette {
 /* bGPDpalette->flag */
 typedef enum eGPDpalette_Flag {
   /* palette is active */
-  A,
-  PL_PALETTE_ACTIVE = (1 << 0)
+  PL_PALETTE_ACTIVE = (1 << 0),
 } eGPDpalette_Flag;
 
 /* ***************************************** */