]> granicus.if.org Git - graphviz/commitdiff
squash a -Wfloat-conversion warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 18 Apr 2021 23:49:14 +0000 (16:49 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 25 Apr 2021 18:58:20 +0000 (11:58 -0700)
cmd/smyrna/glmotion.c
cmd/smyrna/smyrnadefs.h

index 09a128f4c2bacfa671873b22a73fb6024e274cba..fbec6b4d1f038dc99cef500677911b4eac441557 100644 (file)
@@ -30,7 +30,7 @@ static void graph_zoom(float real_zoom)
                old_zoom = view->cameras[view->active_camera]->r;
 
     if (real_zoom < view->Topview->fitin_zoom * MAX_ZOOM)
-               real_zoom = (float) view->Topview->fitin_zoom * MAX_ZOOM;
+               real_zoom = view->Topview->fitin_zoom * MAX_ZOOM;
     if (real_zoom > view->Topview->fitin_zoom * MIN_ZOOM)
                real_zoom = view->Topview->fitin_zoom * MIN_ZOOM;
     if (view->active_camera == -1)
index abb4436da319b7ef699d099c7dd744cc403fe772..28d99882d7bf994c00e08f57bb0303cdab1f56af 100644 (file)
@@ -70,7 +70,7 @@ typedef struct _ArcBall_t ArcBall_t;
 
 #define GLOBAL_Z_OFFSET                        0.001
 
-#define MAX_ZOOM       500
+#define MAX_ZOOM       500.0f
 #define MIN_ZOOM       0.005f
 #define ZOOM_STEPS     100