diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/AlsaDriver.hpp | 15 | ||||
-rw-r--r-- | src/Patchage.cpp | 5 | ||||
-rw-r--r-- | src/PatchageCanvas.cpp | 2 | ||||
-rw-r--r-- | src/PatchageCanvas.hpp | 13 |
4 files changed, 17 insertions, 18 deletions
diff --git a/src/AlsaDriver.hpp b/src/AlsaDriver.hpp index a1de0e7..94dd101 100644 --- a/src/AlsaDriver.hpp +++ b/src/AlsaDriver.hpp @@ -1,5 +1,5 @@ /* This file is part of Patchage. - * Copyright 2007-2014 David Robillard <http://drobilla.net> + * Copyright 2007-2020 David Robillard <d@drobilla.net> * * Patchage is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free @@ -95,14 +95,13 @@ private: } }; - typedef std::set<snd_seq_addr_t, SeqAddrComparator> Ignored; - Ignored _ignored; + using Ignored = std::set<snd_seq_addr_t, SeqAddrComparator>; + using Modules = std::multimap<uint8_t, PatchageModule*>; + using PortAddrs = std::map<PatchagePort*, PortID>; - typedef std::multimap<uint8_t, PatchageModule*> Modules; - Modules _modules; - - typedef std::map<PatchagePort*, PortID> PortAddrs; - PortAddrs _port_addrs; + Ignored _ignored; + Modules _modules; + PortAddrs _port_addrs; bool ignore(const snd_seq_addr_t& addr, bool add = true); }; diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 022eace..997365d 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -1000,8 +1000,9 @@ Patchage::on_export_image() dialog.set_default_response(Gtk::RESPONSE_OK); dialog.set_transient_for(*_main_win); - typedef std::map<std::string, std::string> Types; - Types types; + using Types = std::map<std::string, std::string>; + + Types types; types["*.dot"] = "Graphviz DOT"; types["*.pdf"] = "Portable Document Format"; types["*.ps"] = "PostScript"; diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp index 36a815e..1dfe9e0 100644 --- a/src/PatchageCanvas.cpp +++ b/src/PatchageCanvas.cpp @@ -134,7 +134,7 @@ PatchageCanvas::remove_port(const PortID& id) struct RemovePortsData { - typedef bool (*Predicate)(const PatchagePort*); + using Predicate = bool (*)(const PatchagePort*); RemovePortsData(Predicate p) : pred(p) diff --git a/src/PatchageCanvas.hpp b/src/PatchageCanvas.hpp index 35d0abb..0b200f4 100644 --- a/src/PatchageCanvas.hpp +++ b/src/PatchageCanvas.hpp @@ -1,5 +1,5 @@ /* This file is part of Patchage. - * Copyright 2007-2014 David Robillard <http://drobilla.net> + * Copyright 2007-2020 David Robillard <d@drobilla.net> * * Patchage is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free @@ -71,16 +71,15 @@ public: void clear(); private: - Patchage* _app; + using PortIndex = std::map<const PortID, PatchagePort*>; + using ModuleIndex = std::multimap<const std::string, PatchageModule*>; bool on_event(GdkEvent* ev); bool on_connection_event(Ganv::Edge* c, GdkEvent* ev); - typedef std::map<const PortID, PatchagePort*> PortIndex; - PortIndex _port_index; - - typedef std::multimap<const std::string, PatchageModule*> ModuleIndex; - ModuleIndex _module_index; + Patchage* _app; + PortIndex _port_index; + ModuleIndex _module_index; }; #endif // PATCHAGE_PATCHAGECANVAS_HPP |