]> granicus.if.org Git - graphviz/commitdiff
is_a_cluster: return a C99 bool instead of ambiguous int
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 10 Jan 2022 00:46:00 +0000 (16:46 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 10 Jan 2022 15:51:35 +0000 (07:51 -0800)
This function was already morally returning a boolean value.

lib/common/utils.c
lib/common/utils.h

index a3ed4e0b0749290a320b84c38d4a4827bbcb27d5..1b9d38e159f92dd04e5414d9bfc23719b8600205 100644 (file)
@@ -887,7 +887,7 @@ void compute_bb(graph_t * g)
     GD_bb(g) = bb;
 }
 
-int is_a_cluster (Agraph_t* g)
+bool is_a_cluster (Agraph_t* g)
 {
   return g == g->root || !strncasecmp(agnameof(g), "cluster", 7) ||
          mapBool(agget(g, "cluster"), false);
index 713af4ab63a8d353a91062f4be446968e44bfa85..3d7c6a6b231e7e6a9a01f6006b16de7b8aac0f04 100644 (file)
@@ -121,7 +121,7 @@ UTILS_API pointf spline_at_y(splines *spl, double y);
 UTILS_API Agsym_t *setAttr(graph_t *, void *, char *name, char *value,
                            Agsym_t *);
 UTILS_API void setEdgeType(graph_t *g, int dflt);
-UTILS_API int is_a_cluster(Agraph_t *g);
+UTILS_API bool is_a_cluster(Agraph_t *g);
 
 /* from postproc.c */
 UTILS_API void gv_nodesize(Agnode_t *n, bool flip);