diff options
author | David Robillard <d@drobilla.net> | 2013-01-12 23:38:03 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-01-12 23:38:03 +0000 |
commit | df1447c665e6c3631961297a9d3e9aff4e94c47f (patch) | |
tree | c0ff117c362e6d571f430f886ab62f372b59af08 /src/gui/App.cpp | |
parent | bb335dca695273622b7a4ebbefbe9e089edb9ab4 (diff) | |
download | ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.tar.gz ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.tar.bz2 ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.zip |
Remove Raul::SharedPtr and switch to std::shared_ptr.
Use project local short type aliases for shared_ptr and friends.
Move Raul::Disposable and Raul::Manageable into Raul::Maid.
Use sets to store machina nodes and edges to avoid O(n) searches.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4939 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/App.cpp')
-rw-r--r-- | src/gui/App.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 11da12f0..5fcfb57d 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -97,7 +97,7 @@ App::~App() delete _window_factory; } -SharedPtr<App> +SPtr<App> App::create(Ingen::World* world) { _main = Gtk::Main::instance(); @@ -136,7 +136,7 @@ App::create(Ingen::World* world) Gtk::RC::parse_string(rc_style); - return SharedPtr<App>(app); + return SPtr<App>(app); } void @@ -155,7 +155,7 @@ App::run() } void -App::attach(SharedPtr<SigClientInterface> client) +App::attach(SPtr<SigClientInterface> client) { assert(!_client); assert(!_store); @@ -166,8 +166,8 @@ App::attach(SharedPtr<SigClientInterface> client) } _client = client; - _store = SharedPtr<ClientStore>(new ClientStore(_world->uris(), _world->log(), _world->interface(), client)); - _loader = SharedPtr<ThreadedLoader>(new ThreadedLoader(*this, _world->interface())); + _store = SPtr<ClientStore>(new ClientStore(_world->uris(), _world->log(), _world->interface(), client)); + _loader = SPtr<ThreadedLoader>(new ThreadedLoader(*this, _world->interface())); _graph_tree_window->init(*this, *_store); @@ -189,7 +189,7 @@ App::detach() _loader.reset(); _store.reset(); _client.reset(); - _world->set_interface(SharedPtr<Interface>()); + _world->set_interface(SPtr<Interface>()); } } @@ -202,7 +202,7 @@ App::request_plugins_if_necessary() } } -SharedPtr<Serialisation::Serialiser> +SPtr<Serialisation::Serialiser> App::serialiser() { if (!_world->serialiser()) @@ -376,10 +376,6 @@ struct IconDestroyNotification { Glib::RefPtr<Gdk::Pixbuf> App::icon_from_path(const string& path, int size) { - /* If weak references to Glib::Objects are needed somewhere else it will - probably be a good idea to create a proper WeakPtr class instead of - using raw pointers, but for a single use this will do. */ - Glib::RefPtr<Gdk::Pixbuf> buf; if (path.length() == 0) return buf; |