]> granicus.if.org Git - graphviz/commitdiff
remove const qualifier on Visio::Graphics
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 1 Apr 2021 01:27:50 +0000 (18:27 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 7 Apr 2021 04:30:38 +0000 (21:30 -0700)
Using a const qualifier on the element type of an STL container is usually an
anti-pattern. In this case, doubly so, because Visio::Render does not treat
elements of such a vector as const.

plugin/visio/VisioRender.h

index aa57b778bf799df82987c9256a286e4a35e556cd..9ef5ee6efda785e629b5cda55967f51e2fb53f00 100644 (file)
@@ -22,7 +22,7 @@
 namespace Visio
 {
        typedef std::map<Agnode_t*, unsigned int> NodeIds;
-       typedef std::vector<const Graphic*> Graphics;
+       typedef std::vector<Graphic*> Graphics;
        typedef std::vector<const Text*> Texts;
        typedef std::vector<const Hyperlink*> Hyperlinks;