]> granicus.if.org Git - graphviz/commitdiff
make_map_internal: flip order of 'bbm1' if-then-else ladder
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 19 Sep 2021 22:17:48 +0000 (15:17 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 25 Sep 2021 17:22:21 +0000 (10:22 -0700)
Squashes a -Wfloat-equal warning.

cmd/gvmap/make_map.c

index b6a0ef6451117b534b083795ceb1149b09b25c79..83a231843cfb77462d05296e4beab13d32f979cb 100644 (file)
@@ -1152,10 +1152,10 @@ static int make_map_internal(int exclude_random, int include_OK_points,
        fprintf (stderr, "bounding box margin: %.06f", MAX(boxsize[0]*0.2, 2*shore_depth_tol));
       if (bbm1 > 0)
        fprintf (stderr, " %.06f\n", bbm1);
-      else if (bbm1 == 0)
-       fprintf (stderr, " %.06f\n", MAX(boxsize[1]*0.2, 2*shore_depth_tol));
-      else 
+      else if (bbm1 < 0)
        fprintf (stderr, " (%.06f * %.06f)\n", boxsize[1], -bbm1);
+      else
+       fprintf (stderr, " %.06f\n", MAX(boxsize[1]*0.2, 2*shore_depth_tol));
     }
     if (*nrandom < 0) {
       real n1, n2, area2;