]> granicus.if.org Git - graphviz/commitdiff
xdot_gradient_fillcolor: use double instead of float for 'r1', 'r2'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 13 Nov 2021 01:35:31 +0000 (17:35 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 15 Nov 2021 15:54:17 +0000 (07:54 -0800)
Squashes a number of -Wfloat-conversion warnings.

plugin/core/gvrender_core_dot.c

index cc71d140c66d11ef197c986565f6845537ff4c13..74e63665b0c0eb8898914516dc77060db674335c 100644 (file)
@@ -615,7 +615,6 @@ static void xdot_gradient_fillcolor (GVJ_t* job, int filled, pointf* A, int n)
     agxbuf xb;
     obj_state_t* obj = job->obj;
     double angle = obj->gradient_angle * M_PI / 180;
-    float r1,r2;
     pointf G[2],c1,c2;
 
     if (xd->version < 14) {
@@ -633,7 +632,7 @@ static void xdot_gradient_fillcolor (GVJ_t* job, int filled, pointf* A, int n)
     else {
        get_gradient_points(A, G, n, 0, 3);
          // r2 is outer radius
-       r2 = G[1].y;
+       double r2 = G[1].y;
        if (angle == 0) {
            c1.x = G[0].x;
            c1.y = G[0].y;
@@ -644,7 +643,7 @@ static void xdot_gradient_fillcolor (GVJ_t* job, int filled, pointf* A, int n)
        }
        c2.x = G[0].x;
        c2.y = G[0].y;
-       r1 = r2/4;
+       double r1 = r2 / 4;
        agxbputc(&xb, '(');
        xdot_point (&xb, c1);
        xdot_num (&xb, r1);