From 95ceaf902f95baa431cdda972c0ebb48293e2022 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 1 Aug 2020 16:46:54 +0200 Subject: Use std::make_shared --- src/gui/App.cpp | 14 +++++++------- src/gui/GraphView.cpp | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/gui') diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 49ac2cae..49e3bb67 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -171,18 +171,18 @@ App::attach(const SPtr& client) } _client = client; - _store = SPtr(new ClientStore(_world.uris(), _world.log(), sig_client())); - _loader = SPtr(new ThreadedLoader(*this, _world.interface())); + _store = std::make_shared(_world.uris(), _world.log(), sig_client()); + _loader = std::make_shared(*this, _world.interface()); if (!_world.store()) { _world.set_store(_store); } if (_world.conf().option("dump").get()) { - _dumper = SPtr(new StreamWriter(_world.uri_map(), - _world.uris(), - URI("ingen:/client"), - stderr, - ColorContext::Color::CYAN)); + _dumper = std::make_shared(_world.uri_map(), + _world.uris(), + URI("ingen:/client"), + stderr, + ColorContext::Color::CYAN); sig_client()->signal_message().connect( sigc::mem_fun(*_dumper.get(), &StreamWriter::message)); diff --git a/src/gui/GraphView.cpp b/src/gui/GraphView.cpp index 4f76f798..c9191a37 100644 --- a/src/gui/GraphView.cpp +++ b/src/gui/GraphView.cpp @@ -27,6 +27,7 @@ #include #include +#include namespace ingen { @@ -70,7 +71,7 @@ GraphView::set_graph(const SPtr& graph) assert(_breadcrumb_container); // ensure created _graph = graph; - _canvas = SPtr(new GraphCanvas(*_app, graph, 1600*2, 1200*2)); + _canvas = std::make_shared(*_app, graph, 1600*2, 1200*2); _canvas->build(); _canvas_scrolledwindow->add(_canvas->widget()); -- cgit v1.2.1