[Bf-blender-cvs] [7c48196056c] blender-v3.1-release: Silent compilation warning in space_graph.

Jeroen Bakker noreply at git.blender.org
Fri Jan 28 13:44:51 CET 2022


Commit: 7c48196056c88c17c551e3177ef7b6f276f01d77
Author: Jeroen Bakker
Date:   Fri Jan 28 11:41:08 2022 +0100
Branches: blender-v3.1-release
https://developer.blender.org/rB7c48196056c88c17c551e3177ef7b6f276f01d77

Silent compilation warning in space_graph.

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

M	source/blender/editors/space_graph/graph_draw.c

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

diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index ed5993c77a7..3a2593cc543 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -437,7 +437,6 @@ static void draw_fcurve_handles(SpaceGraph *sipo, FCurve *fcu)
   for (sel = 0; sel < 2; sel++) {
     BezTriple *bezt = fcu->bezt, *prevbezt = NULL;
     int basecol = (sel) ? TH_HANDLE_SEL_FREE : TH_HANDLE_FREE;
-    const float *fp;
     uchar col[4];
 
     for (b = 0; b < fcu->totvert; b++, prevbezt = bezt, bezt++) {
@@ -452,17 +451,15 @@ static void draw_fcurve_handles(SpaceGraph *sipo, FCurve *fcu)
 
       /* draw handle with appropriate set of colors if selection is ok */
       if ((bezt->f2 & SELECT) == sel) {
-        fp = bezt->vec[0];
-
         /* only draw first handle if previous segment had handles */
         if ((!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) ||
             (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) {
           UI_GetThemeColor3ubv(basecol + bezt->h1, col);
           col[3] = fcurve_display_alpha(fcu) * 255;
           immAttr4ubv(color, col);
-          immVertex2fv(pos, fp);
+          immVertex2fv(pos, bezt->vec[0]);
           immAttr4ubv(color, col);
-          immVertex2fv(pos, fp + 3);
+          immVertex2fv(pos, bezt->vec[1]);
         }
 
         /* only draw second handle if this segment is bezier */
@@ -470,33 +467,31 @@ static void draw_fcurve_handles(SpaceGraph *sipo, FCurve *fcu)
           UI_GetThemeColor3ubv(basecol + bezt->h2, col);
           col[3] = fcurve_display_alpha(fcu) * 255;
           immAttr4ubv(color, col);
-          immVertex2fv(pos, fp + 3);
+          immVertex2fv(pos, bezt->vec[1]);
           immAttr4ubv(color, col);
-          immVertex2fv(pos, fp + 6);
+          immVertex2fv(pos, bezt->vec[2]);
         }
       }
       else {
         /* only draw first handle if previous segment was had handles, and selection is ok */
         if (((bezt->f1 & SELECT) == sel) && ((!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) ||
                                              (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ)))) {
-          fp = bezt->vec[0];
           UI_GetThemeColor3ubv(basecol + bezt->h1, col);
           col[3] = fcurve_display_alpha(fcu) * 255;
           immAttr4ubv(color, col);
-          immVertex2fv(pos, fp);
+          immVertex2fv(pos, bezt->vec[0]);
           immAttr4ubv(color, col);
-          immVertex2fv(pos, fp + 3);
+          immVertex2fv(pos, bezt->vec[1]);
         }
 
         /* only draw second handle if this segment is bezier, and selection is ok */
         if (((bezt->f3 & SELECT) == sel) && (bezt->ipo == BEZT_IPO_BEZ)) {
-          fp = bezt->vec[1];
           UI_GetThemeColor3ubv(basecol + bezt->h2, col);
           col[3] = fcurve_display_alpha(fcu) * 255;
           immAttr4ubv(color, col);
-          immVertex2fv(pos, fp);
+          immVertex2fv(pos, bezt->vec[0]);
           immAttr4ubv(color, col);
-          immVertex2fv(pos, fp + 3);
+          immVertex2fv(pos, bezt->vec[1]);
         }
       }
     }



More information about the Bf-blender-cvs mailing list