From: Matthew Fernandez Date: Tue, 27 Sep 2022 15:23:27 +0000 (-0700) Subject: core plugin: make 'IS_CLUSTER' macro a function X-Git-Tag: 6.0.2~23^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f64fe8fbd0a824af8a5d458864a71c540f46035;p=graphviz core plugin: make 'IS_CLUSTER' macro a function This improves type safety, while still being inline-able by the compiler. --- diff --git a/plugin/core/gvrender_core_json.c b/plugin/core/gvrender_core_json.c index 7b75a4f2b..e25810d53 100644 --- a/plugin/core/gvrender_core_json.c +++ b/plugin/core/gvrender_core_json.c @@ -58,7 +58,9 @@ typedef struct { #define ED_gid(n) (((gvid_t*)aggetrec(n, ID, FALSE))->id) #define GD_gid(n) (((gvid_t*)aggetrec(n, ID, FALSE))->id) -#define IS_CLUSTER(s) startswith(agnameof(s), "cluster") +static bool IS_CLUSTER(Agraph_t *s) { + return startswith(agnameof(s), "cluster"); +} static void json_begin_graph(GVJ_t *job) {