[Bf-blender-cvs] [93e92ac1263] master: Cleanup: remove unused assignments

Campbell Barton noreply at git.blender.org
Mon Oct 4 04:19:39 CEST 2021


Commit: 93e92ac1263505ea3a3bc5a42c1b2f55607ccc45
Author: Campbell Barton
Date:   Mon Oct 4 13:12:41 2021 +1100
Branches: master
https://developer.blender.org/rB93e92ac1263505ea3a3bc5a42c1b2f55607ccc45

Cleanup: remove unused assignments

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

M	source/blender/blenkernel/intern/image_gen.c
M	source/blender/editors/space_outliner/outliner_utils.c

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

diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c
index 1a0cc8c2924..943909cc90f 100644
--- a/source/blender/blenkernel/intern/image_gen.c
+++ b/source/blender/blenkernel/intern/image_gen.c
@@ -101,13 +101,12 @@ static void image_buf_fill_checker_slice(
   /* these two passes could be combined into one, but it's more readable and
    * easy to tweak like this, speed isn't really that much of an issue in this situation... */
 
-  int checkerwidth = 32, dark = 1;
+  int checkerwidth = 32;
   int x, y;
 
   unsigned char *rect_orig = rect;
   float *rect_float_orig = rect_float;
 
-  float h = 0.0, hoffs = 0.0;
   float hsv[3] = {0.0f, 0.9f, 0.9f};
   float rgb[3];
 
@@ -119,7 +118,7 @@ static void image_buf_fill_checker_slice(
 
   /* checkers */
   for (y = offset; y < height + offset; y++) {
-    dark = powf(-1.0f, floorf(y / checkerwidth));
+    int dark = powf(-1.0f, floorf(y / checkerwidth));
 
     for (x = 0; x < width; x++) {
       if (x % checkerwidth == 0) {
@@ -156,10 +155,10 @@ static void image_buf_fill_checker_slice(
 
   /* 2nd pass, colored + */
   for (y = offset; y < height + offset; y++) {
-    hoffs = 0.125f * floorf(y / checkerwidth);
+    float hoffs = 0.125f * floorf(y / checkerwidth);
 
     for (x = 0; x < width; x++) {
-      h = 0.125f * floorf(x / checkerwidth);
+      float h = 0.125f * floorf(x / checkerwidth);
 
       if ((abs((x % checkerwidth) - (checkerwidth / 2)) < 4) &&
           (abs((y % checkerwidth) - (checkerwidth / 2)) < 4)) {
diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c
index 5feb157bfc8..c62ca468747 100644
--- a/source/blender/editors/space_outliner/outliner_utils.c
+++ b/source/blender/editors/space_outliner/outliner_utils.c
@@ -117,10 +117,8 @@ static TreeElement *outliner_find_item_at_x_in_row_recursive(const TreeElement *
 {
   TreeElement *child_te = parent_te->subtree.first;
 
-  bool over_element = false;
-
   while (child_te) {
-    over_element = (view_co_x > child_te->xs) && (view_co_x < child_te->xend);
+    const bool over_element = (view_co_x > child_te->xs) && (view_co_x < child_te->xend);
     if ((child_te->flag & TE_ICONROW) && over_element) {
       return child_te;
     }



More information about the Bf-blender-cvs mailing list