]> granicus.if.org Git - graphviz/commit
common point_gencode: tighter scope and stack-allocate 'AF'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 18 Aug 2022 01:52:13 +0000 (18:52 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 23 Aug 2022 04:38:16 +0000 (21:38 -0700)
commit105ab46277c15a220afa717c3fc208a38e3b65f1
tree2b38da5b9ff7b10691c3744c8980bf6db73ceef1
parent17e830cd67bfc904d261798979fa907ff8fd3b2e
common point_gencode: tighter scope and stack-allocate 'AF'

`AF` was being dynamically allocated as if it needed to contain an arbitrary
(potentially large) number of points. However its only use is in being passed to
`gvrender_ellipse` which only looks at the first two points. So we can simplify
and optimize this code by simply stack-allocating 2 entries.
lib/common/shapes.c