From 51446f0f075ff05a684b67662b696a8f4fa77daf Mon Sep 17 00:00:00 2001 From: Peter Clifton Date: Sat, 24 Nov 2012 13:38:22 +0000 Subject: [PATCH] draw.c: Collapse line and arc drawing wrapper functions into only callers --- src/draw.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/draw.c b/src/draw.c index 3821990346..d70963edef 100644 --- a/src/draw.c +++ b/src/draw.c @@ -425,17 +425,15 @@ DrawHoles (bool draw_plated, bool draw_unplated, const BoxType *drawn_area) r_search (PCB->Data->via_tree, drawn_area, NULL, hole_callback, &plated); } -static void -draw_line (LayerType *layer, LineType *line) +static int +line_callback (const BoxType * b, void *cl) { + LayerType *layer = (LayerType *) cl; + LineType *line = (LineType *) b; + set_layer_object_color (layer, (AnyObjectType *) line); gui->graphics->draw_pcb_line (Output.fgGC, line); -} -static int -line_callback (const BoxType * b, void *cl) -{ - draw_line ((LayerType *) cl, (LineType *) b); return 1; } @@ -466,17 +464,15 @@ rat_callback (const BoxType * b, void *cl) return 1; } -static void -draw_arc (LayerType *layer, ArcType *arc) +static int +arc_callback (const BoxType * b, void *cl) { + LayerType *layer = (LayerType *) cl; + ArcType *arc = (ArcType *) b; + set_layer_object_color (layer, (AnyObjectType *) arc); gui->graphics->draw_pcb_arc (Output.fgGC, arc); -} -static int -arc_callback (const BoxType * b, void *cl) -{ - draw_arc ((LayerType *) cl, (ArcType *) b); return 1; } -- 2.11.4.GIT