]> granicus.if.org Git - graphviz/commitdiff
Use agfindgraphattr macro to simplify code
authorerg <devnull@localhost>
Sun, 29 Aug 2010 19:39:30 +0000 (19:39 +0000)
committererg <devnull@localhost>
Sun, 29 Aug 2010 19:39:30 +0000 (19:39 +0000)
lib/common/emit.c

index 35af908c074d746f118e981d66774d1ec258fd60..5930de8481ab5a054b83ac4efe827a04bb164254 100644 (file)
@@ -2494,13 +2494,8 @@ static void init_gvc(GVC_t * gvc, graph_t * g)
     gvc->bb = GD_bb(g);
 
     /* clusters have peripheries */
-#ifndef WITH_CGRAPH
-    G_peripheries = agfindattr(g, "peripheries");
-    G_penwidth = agfindattr(g, "penwidth");
-#else
-    G_peripheries = agattr(g, AGRAPH,"peripheries", NULL);
-    G_penwidth = agattr(g, AGRAPH,"penwidth", NULL);
-#endif
+    G_peripheries = agfindgraphattr(g, "peripheries");
+    G_penwidth = agfindgraphattr(g, "penwidth");
 
     /* default font */
 #ifndef WITH_CGRAPH