]> granicus.if.org Git - graphviz/commitdiff
smyrna add_camera_to_viewport: remove shadowing of 'view' global
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 21 Dec 2022 05:22:19 +0000 (21:22 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Dec 2022 19:42:15 +0000 (11:42 -0800)
cmd/smyrna/viewportcamera.c

index 5014966169abb1f06ff4bdc468b41fde214d1660..0f6c57fc7f59dd61d04ad80340ab77f833afef36 100644 (file)
@@ -21,15 +21,14 @@ static viewport_camera *new_viewport_camera(void) {
     return gv_alloc(sizeof(viewport_camera));
 }
 
-static viewport_camera *add_camera_to_viewport(ViewInfo * view)
-{
-    view->cameras = gv_recalloc(view->cameras, view->camera_count,
-                                view->camera_count + 1,
-                                sizeof(viewport_camera*));
-    view->camera_count++;
-    view->cameras[view->camera_count - 1] = new_viewport_camera();
-    view->active_camera = view->camera_count - 1;
-    return view->cameras[view->camera_count - 1];
+static viewport_camera *add_camera_to_viewport(ViewInfo *vi) {
+    vi->cameras = gv_recalloc(vi->cameras, vi->camera_count,
+                              vi->camera_count + 1,
+                              sizeof(viewport_camera*));
+    vi->camera_count++;
+    vi->cameras[vi->camera_count - 1] = new_viewport_camera();
+    vi->active_camera = vi->camera_count - 1;
+    return vi->cameras[vi->camera_count - 1];
 }
 
 void menu_click_add_camera(void)