diff options
author | David Robillard <d@drobilla.net> | 2020-08-02 13:34:45 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-02 13:34:45 +0200 |
commit | 7eae940654c8c81c1efc8a055a13c53fab42bf91 (patch) | |
tree | 8ac567cd98e765886fa4aa5b60ef6b24aab0235e /src/gui | |
parent | b8128027fcf79ece3ed973627dd4e76eb36b5997 (diff) | |
download | ingen-7eae940654c8c81c1efc8a055a13c53fab42bf91.tar.gz ingen-7eae940654c8c81c1efc8a055a13c53fab42bf91.tar.bz2 ingen-7eae940654c8c81c1efc8a055a13c53fab42bf91.zip |
Remove std::weak_ptr alias
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/GraphCanvas.cpp | 2 | ||||
-rw-r--r-- | src/gui/GraphCanvas.hpp | 2 | ||||
-rw-r--r-- | src/gui/PluginMenu.cpp | 3 | ||||
-rw-r--r-- | src/gui/PluginMenu.hpp | 5 | ||||
-rw-r--r-- | src/gui/Port.hpp | 9 |
5 files changed, 12 insertions, 9 deletions
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index 31835062..f923e3bb 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -837,7 +837,7 @@ GraphCanvas::menu_add_port(const string& sym_base, } void -GraphCanvas::load_plugin(const WPtr<PluginModel>& weak_plugin) +GraphCanvas::load_plugin(const std::weak_ptr<PluginModel>& weak_plugin) { SPtr<PluginModel> plugin = weak_plugin.lock(); if (!plugin) { diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp index 658e0f96..f8b4d432 100644 --- a/src/gui/GraphCanvas.hpp +++ b/src/gui/GraphCanvas.hpp @@ -96,7 +96,7 @@ private: void menu_new_graph(); void menu_load_graph(); void menu_properties(); - void load_plugin(const WPtr<client::PluginModel>& weak_plugin); + void load_plugin(const std::weak_ptr<client::PluginModel>& weak_plugin); void build_menus(); diff --git a/src/gui/PluginMenu.cpp b/src/gui/PluginMenu.cpp index f30c2b4b..2b2cf037 100644 --- a/src/gui/PluginMenu.cpp +++ b/src/gui/PluginMenu.cpp @@ -18,6 +18,7 @@ #include "ingen/Log.hpp" #include "ingen/client/PluginModel.hpp" +#include <memory> #include <utility> namespace ingen { @@ -169,7 +170,7 @@ PluginMenu::add_plugin_to_menu(MenuRecord& menu, SPtr<client::PluginModel> p) } void -PluginMenu::load_plugin(WPtr<client::PluginModel> weak_plugin) +PluginMenu::load_plugin(std::weak_ptr<client::PluginModel> weak_plugin) { signal_load_plugin.emit(weak_plugin); } diff --git a/src/gui/PluginMenu.hpp b/src/gui/PluginMenu.hpp index a701de74..38831f5a 100644 --- a/src/gui/PluginMenu.hpp +++ b/src/gui/PluginMenu.hpp @@ -25,6 +25,7 @@ #include <cstddef> #include <map> +#include <memory> #include <set> #include <string> @@ -47,7 +48,7 @@ public: void clear(); void add_plugin(SPtr<client::PluginModel> p); - sigc::signal< void, WPtr<client::PluginModel> > signal_load_plugin; + sigc::signal< void, std::weak_ptr<client::PluginModel> > signal_load_plugin; private: struct MenuRecord { @@ -68,7 +69,7 @@ private: void add_plugin_to_menu(MenuRecord& menu, SPtr<client::PluginModel> p); - void load_plugin(WPtr<client::PluginModel> weak_plugin); + void load_plugin(std::weak_ptr<client::PluginModel> weak_plugin); ingen::World& _world; MenuRecord _classless_menu; diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp index 72b91b2e..dd5c8b92 100644 --- a/src/gui/Port.hpp +++ b/src/gui/Port.hpp @@ -23,6 +23,7 @@ #include <gtkmm/menu.h> #include <cassert> +#include <memory> #include <string> namespace ingen { @@ -87,10 +88,10 @@ private: void port_properties_changed(); void set_type_tag(); - App& _app; - WPtr<const client::PortModel> _port_model; - bool _entered : 1; - bool _flipped : 1; + App& _app; + std::weak_ptr<const client::PortModel> _port_model; + bool _entered : 1; + bool _flipped : 1; }; } // namespace gui |