]> granicus.if.org Git - graphviz/commitdiff
smyrna: remove unused camera 'index' field
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 7 Nov 2021 00:03:21 +0000 (17:03 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 10 Nov 2021 03:50:54 +0000 (19:50 -0800)
cmd/smyrna/smyrnadefs.h
cmd/smyrna/viewportcamera.c

index ed6827dc95f8946c9d0841ef078331947668ab74..da4b41d78164b734afe87dd3ed36da300a078e5b 100644 (file)
@@ -181,7 +181,6 @@ typedef struct
        float targetx;
        float targety;
        float targetz;
-       int index;
 
        float r;
     } viewport_camera;
index 7ae084e3bcc55ad7e2a6be6a3f02211d186bcdb4..6304cc8e110c96c83bf87957f1b1300e3d343819 100644 (file)
@@ -22,14 +22,6 @@ static viewport_camera *new_viewport_camera(ViewInfo * view)
     return NEW(viewport_camera);
 }
 
-static void viewport_update_camera_indexes(ViewInfo * view)
-{
-    int ind = 0;
-    for (ind = 0; ind < view->camera_count; ind++) {
-       view->cameras[ind]->index = ind;
-    }
-}
-
 static viewport_camera *add_camera_to_viewport(ViewInfo * view)
 {
     view->camera_count++;
@@ -37,7 +29,6 @@ static viewport_camera *add_camera_to_viewport(ViewInfo * view)
        RALLOC(view->camera_count, view->cameras, viewport_camera *);
     view->cameras[view->camera_count - 1] = new_viewport_camera(view);
     view->active_camera = view->camera_count - 1;
-    viewport_update_camera_indexes(view);
     return view->cameras[view->camera_count - 1];
 }