From ecad88d2128f920f5e11cc3ff443d62b225c79d3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Dec 2019 17:12:50 +0100 Subject: Cleanup: Use "using" instead of "typedef" where appropriate --- src/gui/App.hpp | 2 +- src/gui/GraphBox.cpp | 2 +- src/gui/GraphCanvas.cpp | 2 +- src/gui/GraphCanvas.hpp | 4 ++-- src/gui/LoadPluginWindow.hpp | 2 +- src/gui/PluginMenu.cpp | 2 +- src/gui/PluginMenu.hpp | 4 ++-- src/gui/PropertiesWindow.cpp | 2 +- src/gui/PropertiesWindow.hpp | 2 +- src/gui/RDFS.cpp | 4 ++-- src/gui/RDFS.hpp | 4 ++-- src/gui/ThreadedLoader.hpp | 2 +- src/gui/WindowFactory.hpp | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/gui') diff --git a/src/gui/App.hpp b/src/gui/App.hpp index 47352f50..13c46414 100644 --- a/src/gui/App.hpp +++ b/src/gui/App.hpp @@ -182,7 +182,7 @@ protected: float _max_run_load; std::string _status_text; - typedef std::unordered_map ActivityPorts; + using ActivityPorts = std::unordered_map; ActivityPorts _activity_ports; bool _enable_signal; diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp index d248d0a7..5ce54d99 100644 --- a/src/gui/GraphBox.cpp +++ b/src/gui/GraphBox.cpp @@ -664,7 +664,7 @@ GraphBox::event_export_image() dialog.set_transient_for(*_window); } - typedef std::map Types; + using Types = std::map; Types types; types["*.dot"] = "Graphviz DOT"; types["*.pdf"] = "Portable Document Format"; diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index d10d569b..0c33072f 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -659,7 +659,7 @@ GraphCanvas::copy_selection() void GraphCanvas::paste() { - typedef Properties::const_iterator PropIter; + using PropIter = Properties::const_iterator; std::lock_guard lock(_app.world().rdf_mutex()); diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp index 613c03da..9047a373 100644 --- a/src/gui/GraphCanvas.hpp +++ b/src/gui/GraphCanvas.hpp @@ -102,7 +102,7 @@ private: void auto_menu_position(int& x, int& y, bool& push_in); - typedef std::multimap LV2Children; + using LV2Children = std::multimap; Properties get_initial_data(Resource::Graph ctx=Resource::Graph::DEFAULT); @@ -117,7 +117,7 @@ private: App& _app; SPtr _graph; - typedef std::map, Ganv::Module*> Views; + using Views = std::map, Ganv::Module*>; Views _views; int _auto_position_count; diff --git a/src/gui/LoadPluginWindow.hpp b/src/gui/LoadPluginWindow.hpp index ddd0b427..31843dde 100644 --- a/src/gui/LoadPluginWindow.hpp +++ b/src/gui/LoadPluginWindow.hpp @@ -130,7 +130,7 @@ private: SPtr _graph; - typedef std::map Rows; + using Rows = std::map; Rows _rows; Glib::RefPtr _plugins_liststore; diff --git a/src/gui/PluginMenu.cpp b/src/gui/PluginMenu.cpp index 0090aff1..f30c2b4b 100644 --- a/src/gui/PluginMenu.cpp +++ b/src/gui/PluginMenu.cpp @@ -66,7 +66,7 @@ PluginMenu::clear() void PluginMenu::add_plugin(SPtr p) { - typedef ClassMenus::iterator iterator; + using iterator = ClassMenus::iterator; if (!p->lilv_plugin() || lilv_plugin_is_replaced(p->lilv_plugin())) { return; diff --git a/src/gui/PluginMenu.hpp b/src/gui/PluginMenu.hpp index 284331d6..6c7aa6b0 100644 --- a/src/gui/PluginMenu.hpp +++ b/src/gui/PluginMenu.hpp @@ -56,8 +56,8 @@ private: Gtk::Menu* menu; }; - typedef std::multimap LV2Children; - typedef std::multimap ClassMenus; + using LV2Children = std::multimap; + using ClassMenus = std::multimap; /// Recursively add hierarchy rooted at `plugin_class` to `menu`. size_t build_plugin_class_menu(Gtk::Menu* menu, diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index ee257843..9912f73a 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -42,7 +42,7 @@ using namespace client; namespace gui { -typedef std::set URISet; +using URISet = std::set; PropertiesWindow::PropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr& xml) diff --git a/src/gui/PropertiesWindow.hpp b/src/gui/PropertiesWindow.hpp index c847da20..81e29ae1 100644 --- a/src/gui/PropertiesWindow.hpp +++ b/src/gui/PropertiesWindow.hpp @@ -105,7 +105,7 @@ private: void apply_clicked(); void ok_clicked(); - typedef std::map Records; + using Records = std::map; Records _records; SPtr _model; diff --git a/src/gui/RDFS.cpp b/src/gui/RDFS.cpp index 0b4a4e62..1091c443 100644 --- a/src/gui/RDFS.cpp +++ b/src/gui/RDFS.cpp @@ -117,8 +117,8 @@ datatypes(World& world, URISet& types, bool super) URISet types(World& world, SPtr model) { - typedef Properties::const_iterator PropIter; - typedef std::pair PropRange; + using PropIter = Properties::const_iterator; + using PropRange = std::pair; // Start with every rdf:type URISet types; diff --git a/src/gui/RDFS.hpp b/src/gui/RDFS.hpp index 4e9a8ab1..a8d161cb 100644 --- a/src/gui/RDFS.hpp +++ b/src/gui/RDFS.hpp @@ -36,10 +36,10 @@ namespace gui { namespace rdfs { /** Set of URIs. */ -typedef std::set URISet; +using URISet = std::set; /** Label => Resource map. */ -typedef std::map Objects; +using Objects = std::map; /** Return the label of `node`. */ std::string label(World& world, const LilvNode* node); diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp index c1e97b6e..3ab8f4a2 100644 --- a/src/gui/ThreadedLoader.hpp +++ b/src/gui/ThreadedLoader.hpp @@ -80,7 +80,7 @@ private: const URI& filename); /** Returns nothing and takes no parameters (because they have all been bound) */ - typedef sigc::slot Closure; + using Closure = sigc::slot; void run(); diff --git a/src/gui/WindowFactory.hpp b/src/gui/WindowFactory.hpp index 1b6201af..fad5b308 100644 --- a/src/gui/WindowFactory.hpp +++ b/src/gui/WindowFactory.hpp @@ -79,7 +79,7 @@ public: void clear(); private: - typedef std::map GraphWindowMap; + using GraphWindowMap = std::map; GraphWindow* new_graph_window(SPtr graph, SPtr view); -- cgit v1.2.1