summaryrefslogtreecommitdiffstats
path: root/src/server/CompiledGraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/CompiledGraph.cpp')
-rw-r--r--src/server/CompiledGraph.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/server/CompiledGraph.cpp b/src/server/CompiledGraph.cpp
index e644d982..08e558a8 100644
--- a/src/server/CompiledGraph.cpp
+++ b/src/server/CompiledGraph.cpp
@@ -26,7 +26,6 @@
#include "ingen/Configuration.hpp"
#include "ingen/Log.hpp"
#include "ingen/World.hpp"
-#include "raul/Maid.hpp"
#include "raul/Path.hpp"
#include <boost/intrusive/slist.hpp>
@@ -37,13 +36,14 @@
#include <cstdio>
#include <exception>
#include <limits>
+#include <memory>
#include <utility>
-namespace ingen {
-namespace server {
+namespace ingen::server {
/** Graph contains ambiguous feedback with no delay nodes. */
-class FeedbackException : public std::exception {
+class FeedbackException : public std::exception
+{
public:
explicit FeedbackException(const BlockImpl* n)
: node(n)
@@ -70,16 +70,16 @@ has_provider_with_many_dependants(const BlockImpl* n)
}
CompiledGraph::CompiledGraph(GraphImpl* graph)
- : _master(std::unique_ptr<Task>(new Task(Task::Mode::SEQUENTIAL)))
+ : _master{std::make_unique<Task>(Task::Mode::SEQUENTIAL)}
{
compile_graph(graph);
}
-raul::managed_ptr<CompiledGraph>
-CompiledGraph::compile(raul::Maid& maid, GraphImpl& graph)
+std::unique_ptr<CompiledGraph>
+CompiledGraph::compile(GraphImpl& graph)
{
try {
- return maid.make_managed<CompiledGraph>(&graph);
+ return std::unique_ptr<CompiledGraph>(new CompiledGraph(&graph));
} catch (const FeedbackException& e) {
Log& log = graph.engine().log();
if (e.node && e.root) {
@@ -160,7 +160,7 @@ CompiledGraph::compile_graph(GraphImpl* graph)
_master = Task::simplify(std::move(_master));
if (graph->engine().world().conf().option("trace").get<int32_t>()) {
- ColorContext ctx(stderr, ColorContext::Color::YELLOW);
+ const ColorContext ctx{stderr, ColorContext::Color::YELLOW};
dump(graph->path());
}
}
@@ -285,5 +285,4 @@ CompiledGraph::dump(const std::string& name) const
sink(")\n");
}
-} // namespace server
-} // namespace ingen
+} // namespace ingen::server