Give better names to late_bool arguments
authorMark Hansen <markhansen@google.com>
Mon, 14 Nov 2022 10:47:05 +0000 (21:47 +1100)
committerMark Hansen <markhansen@google.com>
Mon, 14 Nov 2022 10:52:49 +0000 (21:52 +1100)
lib/common/utils.c
lib/common/utils.h

index c6967cf64bd4a466735672a850fa477a6c09ec77..25555a2dc54589198f568a77dfc51a9c365bd7f2 100644 (file)
@@ -126,10 +126,9 @@ char *late_nnstring(void *obj, attrsym_t *attr, char *defaultValue) {
     return rv;
 }
 
-bool late_bool(void *obj, attrsym_t * attr, bool def)
-{
+bool late_bool(void *obj, attrsym_t *attr, bool defaultValue) {
     if (attr == NULL)
-       return def;
+        return defaultValue;
 
     return mapbool(agxget(obj, attr));
 }
index 4d00d10c8e909daa82fb2b0fd914a8878dbfc4e5..cf734d6960d3d735779dc59022fa8b6183e0fcd8 100644 (file)
@@ -78,7 +78,7 @@ UTILS_API double late_double(void *obj, Agsym_t *attr, double defaultValue,
                              double minimum);
 UTILS_API char *late_nnstring(void *obj, Agsym_t *attr, char *defaultValue);
 UTILS_API char *late_string(void *obj, Agsym_t *attr, char *defaultValue);
-UTILS_API bool late_bool(void *, Agsym_t *, bool);
+UTILS_API bool late_bool(void *obj, Agsym_t *attr, bool defaultValue);
 UTILS_API double get_inputscale(graph_t *g);
 
 UTILS_API Agnode_t *UF_find(Agnode_t *);