From 7c48196056c88c17c551e3177ef7b6f276f01d77 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 28 Jan 2022 11:41:08 +0100 Subject: Silent compilation warning in space_graph. --- source/blender/editors/space_graph/graph_draw.c | 21 ++++++++------------- 1 file 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]); } } } -- cgit v1.2.3