From 6cc3e771082df8cb1c483083a1cb7d99d0ece9d8 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 1 Sep 2022 18:44:01 -0700 Subject: [PATCH] smyrna new_viewport_camera: use cgraph wrapper for allocation The lib/cgraph/alloc.h wrappers are similar to the older lib/common/memory.h wrappers except (1) they are header-only and (2) they live in a directory (cgraph) that is at the root of the dependency tree. The long term plan is to replace all use of lib/common/memory.h with lib/cgraph/alloc.h. --- cmd/smyrna/viewportcamera.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/smyrna/viewportcamera.c b/cmd/smyrna/viewportcamera.c index 138c21047..c5b818da2 100644 --- a/cmd/smyrna/viewportcamera.c +++ b/cmd/smyrna/viewportcamera.c @@ -8,6 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#include #include "viewportcamera.h" #include "gui.h" #include @@ -19,7 +20,7 @@ static viewport_camera *new_viewport_camera(ViewInfo * view) { - return NEW(viewport_camera); + return gv_alloc(sizeof(viewport_camera)); } static viewport_camera *add_camera_to_viewport(ViewInfo * view) -- 2.50.1