diff options
author | YimingWu <xp8110@outlook.com> | 2021-03-10 02:59:23 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2021-03-10 02:59:23 +0300 |
commit | 9166075cbeb4163566bf943f7844759702147a8a (patch) | |
tree | 1109502274df385ceabfbb3707a56e164c121edc /source/blender/compositor/intern/COM_NodeGraph.h | |
parent | 10c097eff0416368bf769c3349e9c81c12f19d5f (diff) | |
parent | 53b82efed66baddff3b7ef6c93a919ef10f4ef42 (diff) |
Merge remote-tracking branch 'origin/master' into lanpr-under-gp
Diffstat (limited to 'source/blender/compositor/intern/COM_NodeGraph.h')
-rw-r--r-- | source/blender/compositor/intern/COM_NodeGraph.h | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/source/blender/compositor/intern/COM_NodeGraph.h b/source/blender/compositor/intern/COM_NodeGraph.h index 7252d546fce..990e3a30831 100644 --- a/source/blender/compositor/intern/COM_NodeGraph.h +++ b/source/blender/compositor/intern/COM_NodeGraph.h @@ -18,6 +18,8 @@ #pragma once +#include "BLI_vector.hh" + #include <map> #include <set> #include <vector> @@ -39,33 +41,21 @@ class NodeOutput; */ class NodeGraph { public: - class Link { - private: - NodeOutput *m_from; - NodeInput *m_to; - - public: - Link(NodeOutput *from, NodeInput *to) : m_from(from), m_to(to) - { - } + struct Link { + NodeOutput *from; + NodeInput *to; - NodeOutput *getFromSocket() const - { - return m_from; - } - NodeInput *getToSocket() const + Link(NodeOutput *from, NodeInput *to) : from(from), to(to) { - return m_to; } }; typedef std::vector<Node *> Nodes; typedef Nodes::iterator NodeIterator; - typedef std::vector<Link> Links; private: Nodes m_nodes; - Links m_links; + blender::Vector<Link> m_links; public: NodeGraph(); @@ -75,7 +65,7 @@ class NodeGraph { { return m_nodes; } - const Links &links() const + const blender::Vector<Link> &links() const { return m_links; } |