]> granicus.if.org Git - graphviz/commit
make events a local variable in generateXConstraints and generateYConstraints
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 11 Apr 2021 01:27:12 +0000 (18:27 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 18 Apr 2021 02:56:42 +0000 (19:56 -0700)
commit1434bc4f0a4541b5ea3fb7bd8537e5212d739cd2
treef8b9b31779dc5006120da4d526ea33ee30386067
parentf6964dbb00a08a11d71d702c78cae32cb7dbe7e5
make events a local variable in generateXConstraints and generateYConstraints

Not only is this variable not used outside its containing file (could be
declared static), but its lifetime within both these functions is entirely
contained. Reusing the same global in these functions has no advantage, but
impairs the compiler’s ability to optimize by potentially confusing its alias
analysis.
lib/vpsc/generate-constraints.cpp