diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-01-28 13:41:08 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-01-28 13:48:47 +0300 |
commit | 7c48196056c88c17c551e3177ef7b6f276f01d77 (patch) | |
tree | 59d97d93bf14afd120d857a50942080f9e1e97bb /source/blender/editors | |
parent | be921a04f24a4807682bfb9d1118bcce11c7b66a (diff) |
Silent compilation warning in space_graph.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 21 |
1 files changed, 8 insertions, 13 deletions
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]); } } } |