From: Matthew Fernandez Date: Fri, 2 Sep 2022 01:44:01 +0000 (-0700) Subject: smyrna new_viewport_camera: use cgraph wrapper for allocation X-Git-Tag: 6.0.1~13^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6cc3e771082df8cb1c483083a1cb7d99d0ece9d8;p=graphviz 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. --- 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)