[dia] [warningectomy] unused const variable



commit a1aecc3d53780d0853b6e515a3b211121331a10c
Author: Hans Breuer <hans breuer org>
Date:   Sat Sep 27 23:34:37 2014 +0200

    [warningectomy] unused const variable
    
    node.c:58:21: warning: unused variable 'NODE_BORDERWIDTH'
          [-Wunused-const-variable]
    static const double NODE_BORDERWIDTH = 0.1;
                        ^
    node.c:60:21: warning: unused variable 'NODE_FONTHEIGHT'
          [-Wunused-const-variable]
    static const double NODE_FONTHEIGHT = 0.8;
                        ^
    2 warnings generated.

 objects/UML/node.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/objects/UML/node.c b/objects/UML/node.c
index adc07d1..10a0c11 100644
--- a/objects/UML/node.c
+++ b/objects/UML/node.c
@@ -330,7 +330,7 @@ static DiaObject *node_create(Point *startpoint, void *user_data, Handle **handl
   node = g_malloc0(sizeof(Node));
   
   /* old defaults */
-  node->line_width = 0.1;
+  node->line_width = NODE_BORDERWIDTH;
 
   elem = &node->element;
   obj = &elem->object;
@@ -344,11 +344,11 @@ static DiaObject *node_create(Point *startpoint, void *user_data, Handle **handl
   node->line_color = attributes_get_foreground();
   node->fill_color = attributes_get_background();
 
-  font = dia_font_new_from_style (DIA_FONT_SANS, 0.8);
+  font = dia_font_new_from_style (DIA_FONT_SANS, NODE_FONTHEIGHT);
   /* The text position is recalculated later */
   p.x = 0.0;
   p.y = 0.0;
-  node->name = new_text("", font, 0.8, &p, &color_black, ALIGN_LEFT);
+  node->name = new_text("", font, NODE_FONTHEIGHT, &p, &color_black, ALIGN_LEFT);
   dia_font_unref(font);
   
   element_init(elem, 8, NUM_CONNECTIONS);


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