aboutsummaryrefslogtreecommitdiffstats
path: root/src/Flowgraph.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-01-31 21:45:00 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-01-31 21:45:00 +0100
commit166e885cf6ea7ff4b56d860bc6449c02d03ef5de (patch)
treed5999d2a45e19db11dedc71b310e1aa765d00cad /src/Flowgraph.cpp
parent15de0c12ca6393a8c8c849f25a4d016abef0056b (diff)
downloaddabmod-166e885cf6ea7ff4b56d860bc6449c02d03ef5de.tar.gz
dabmod-166e885cf6ea7ff4b56d860bc6449c02d03ef5de.tar.bz2
dabmod-166e885cf6ea7ff4b56d860bc6449c02d03ef5de.zip
Replace quite a few 'new' with make_shared
Diffstat (limited to 'src/Flowgraph.cpp')
-rw-r--r--src/Flowgraph.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Flowgraph.cpp b/src/Flowgraph.cpp
index e4c6a30..8e76cae 100644
--- a/src/Flowgraph.cpp
+++ b/src/Flowgraph.cpp
@@ -77,7 +77,7 @@ Edge::Edge(shared_ptr<Node>& srcNode, shared_ptr<Node>& dstNode) :
dstNode->plugin()->name(), dstNode.get(),
this);
- myBuffer = shared_ptr<Buffer>(new Buffer());
+ myBuffer = make_shared<Buffer>();
srcNode->myOutputBuffers.push_back(myBuffer);
dstNode->myInputBuffers.push_back(myBuffer);
}
@@ -177,7 +177,7 @@ void Flowgraph::connect(shared_ptr<ModPlugin> input, shared_ptr<ModPlugin> outpu
}
}
if (inputNode == nodes.end()) {
- inputNode = nodes.insert(nodes.end(), shared_ptr<Node>(new Node(input)));
+ inputNode = nodes.insert(nodes.end(), make_shared<Node>(input));
}
for (outputNode = nodes.begin(); outputNode != nodes.end(); ++outputNode) {
@@ -186,7 +186,7 @@ void Flowgraph::connect(shared_ptr<ModPlugin> input, shared_ptr<ModPlugin> outpu
}
}
if (outputNode == nodes.end()) {
- outputNode = nodes.insert(nodes.end(), shared_ptr<Node>(new Node(output)));
+ outputNode = nodes.insert(nodes.end(), make_shared<Node>(output));
for (inputNode = nodes.begin(); inputNode != nodes.end(); ++inputNode) {
if ((*inputNode)->plugin() == input) {
break;
@@ -206,7 +206,7 @@ void Flowgraph::connect(shared_ptr<ModPlugin> input, shared_ptr<ModPlugin> outpu
assert((*inputNode)->plugin() == input);
assert((*outputNode)->plugin() == output);
- edges.push_back(shared_ptr<Edge>(new Edge(*inputNode, *outputNode)));
+ edges.push_back(make_shared<Edge>(*inputNode, *outputNode));
}