From f9271f02217b397e596a7aba3f819b49c22ac8a7 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 6 Nov 2021 17:03:21 -0700 Subject: [PATCH] smyrna: remove unused camera 'index' field --- cmd/smyrna/smyrnadefs.h | 1 - cmd/smyrna/viewportcamera.c | 9 --------- 2 files changed, 10 deletions(-) diff --git a/cmd/smyrna/smyrnadefs.h b/cmd/smyrna/smyrnadefs.h index ed6827dc9..da4b41d78 100644 --- a/cmd/smyrna/smyrnadefs.h +++ b/cmd/smyrna/smyrnadefs.h @@ -181,7 +181,6 @@ typedef struct float targetx; float targety; float targetz; - int index; float r; } viewport_camera; diff --git a/cmd/smyrna/viewportcamera.c b/cmd/smyrna/viewportcamera.c index 7ae084e3b..6304cc8e1 100644 --- a/cmd/smyrna/viewportcamera.c +++ b/cmd/smyrna/viewportcamera.c @@ -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]; } -- 2.40.0