[dia] [scan-build] Dead assignment



commit 9308aeb8e6cb86f0c8084307c530e2019e4930b7
Author: Hans Breuer <hans breuer org>
Date:   Tue Dec 29 11:46:20 2009 +0100

    [scan-build] Dead assignment
    
    Actually remove the unused function beziershape_simple_draw()
    alltogether. Not only dead assignment but dead code;)

 lib/beziershape.c |   32 --------------------------------
 lib/beziershape.h |    2 --
 2 files changed, 0 insertions(+), 34 deletions(-)
---
diff --git a/lib/beziershape.c b/lib/beziershape.c
index 736d352..ebcd6b0 100644
--- a/lib/beziershape.c
+++ b/lib/beziershape.c
@@ -720,38 +720,6 @@ beziershape_update_boundingbox(BezierShape *bezier)
 }
 
 void
-beziershape_simple_draw(BezierShape *bezier, DiaRenderer *renderer, real width)
-{
-  BezPoint *points;
-  int numpoints;
-  
-  g_assert(bezier != NULL);
-  g_assert(renderer != NULL);
-
-  points = &bezier->points[0];
-  
-  DIA_RENDERER_GET_CLASS(renderer)->set_linewidth(renderer, width);
-  DIA_RENDERER_GET_CLASS(renderer)->set_linestyle(renderer, LINESTYLE_SOLID);
-  DIA_RENDERER_GET_CLASS(renderer)->set_linejoin(renderer, LINEJOIN_ROUND);
-  DIA_RENDERER_GET_CLASS(renderer)->set_linecaps(renderer, LINECAPS_BUTT);
-
-  numpoints = bezier->numpoints;
-  if (!DIA_RENDERER_GET_CLASS(renderer)->is_capable_to(renderer, RENDER_HOLES)) {
-    /* just throw away everything from the second move */
-    int i;
-
-    for (i = 1; i < numpoints; ++i)
-      if (points[i].type == BEZ_MOVE_TO) {
-        numpoints = i;
-        break;
-      }
-  }
-
-  DIA_RENDERER_GET_CLASS(renderer)->fill_bezier(renderer, points, bezier->numpoints,&color_white);
-  DIA_RENDERER_GET_CLASS(renderer)->draw_bezier(renderer, points, bezier->numpoints,&color_black);
-}
-
-void
 beziershape_draw_control_lines(BezierShape *bez, DiaRenderer *renderer)
 {
   Color line_colour = {0.0, 0.0, 0.6};
diff --git a/lib/beziershape.h b/lib/beziershape.h
index a0e854d..b4977de 100644
--- a/lib/beziershape.h
+++ b/lib/beziershape.h
@@ -46,8 +46,6 @@ struct _BezierShape {
 
 void beziershape_update_data(BezierShape *bezier);
 void beziershape_update_boundingbox(BezierShape *bezier);
-void beziershape_simple_draw(BezierShape *bezier, DiaRenderer *renderer,
-			     real width);
 void beziershape_init(BezierShape *bezier, int num_points);
 void beziershape_set_points(BezierShape *bezier, int num_points, BezPoint *points);
 void beziershape_destroy(BezierShape *bezier);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]