]> granicus.if.org Git - graphviz/commitdiff
make gvmap usage a const char array
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 20 May 2021 00:35:25 +0000 (17:35 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 28 May 2021 14:49:25 +0000 (07:49 -0700)
This makes it more obvious to the compiler that it can inline or otherwise
optimize usage of this string.

cmd/gvmap/gvmap.c

index 312580d17a6970285de5cacb17872301ea52e4b2..6475fc446cd557dc23025ab0753da6b5d2a29f7d 100644 (file)
@@ -59,7 +59,7 @@ typedef struct {
     int seed;      /* seed used to calculate Fiedler vector */
 } params_t;
 
-static char* usestr =
+static const char usestr[] =
 "   where graphfile must contain node positions, and widths and heights for each node. No overlap between nodes should be present. Acceptable options are: \n\
     -a k - average number of artificial points added along the bounding box of the labels. If < 0, a suitable value is selected automatically. (-1)\n\
     -b v - polygon line width, with v < 0 for no line. (0)\n\