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 --- ingen/ClashAvoider.hpp | 4 ++-- ingen/Configuration.hpp | 6 +++--- ingen/FilePath.hpp | 6 +++--- ingen/LV2Features.hpp | 4 ++-- ingen/Log.hpp | 2 +- ingen/Node.hpp | 4 ++-- ingen/Store.hpp | 8 +++----- ingen/Tee.hpp | 2 +- ingen/client/BlockModel.hpp | 2 +- ingen/client/ClientStore.hpp | 3 ++- ingen/client/PluginModel.hpp | 4 ++-- 11 files changed, 22 insertions(+), 23 deletions(-) (limited to 'ingen') diff --git a/ingen/ClashAvoider.hpp b/ingen/ClashAvoider.hpp index d8fce196..60bb6b48 100644 --- a/ingen/ClashAvoider.hpp +++ b/ingen/ClashAvoider.hpp @@ -53,8 +53,8 @@ public: std::string name); private: - typedef std::map Offsets; - typedef std::map SymbolMap; + using Offsets = std::map; + using SymbolMap = std::map; const Store& _store; Offsets _offsets; diff --git a/ingen/Configuration.hpp b/ingen/Configuration.hpp index 5a1085fe..6c0343b1 100644 --- a/ingen/Configuration.hpp +++ b/ingen/Configuration.hpp @@ -137,9 +137,9 @@ private: } }; - typedef std::map Options; - typedef std::map ShortNames; - typedef std::map Keys; + using Options = std::map; + using ShortNames = std::map; + using Keys = std::map; std::string variable_string(LV2_URID type) const; diff --git a/ingen/FilePath.hpp b/ingen/FilePath.hpp index 376411ec..e4f22b88 100644 --- a/ingen/FilePath.hpp +++ b/ingen/FilePath.hpp @@ -41,14 +41,14 @@ class INGEN_API FilePath { public: #ifdef USE_WINDOWS_FILE_PATHS - typedef wchar_t value_type; + using value_type = wchar_t; static constexpr value_type preferred_separator = L'\\'; #else - typedef char value_type; + using value_type = char; static constexpr value_type preferred_separator = '/'; #endif - typedef std::basic_string string_type; + using string_type = std::basic_string; FilePath() = default; FilePath(const FilePath&) = default; diff --git a/ingen/LV2Features.hpp b/ingen/LV2Features.hpp index 9508bd82..e2ce600f 100644 --- a/ingen/LV2Features.hpp +++ b/ingen/LV2Features.hpp @@ -65,7 +65,7 @@ protected: class FeatureArray : public Raul::Noncopyable { public: - typedef std::vector< SPtr > FeatureVector; + using FeatureVector = std::vector>; explicit FeatureArray(FeatureVector& features); @@ -84,7 +84,7 @@ protected: SPtr lv2_features(World& world, Node* node) const; private: - typedef std::vector< SPtr > Features; + using Features = std::vector>; Features _features; }; diff --git a/ingen/Log.hpp b/ingen/Log.hpp index 3cc7de20..de27404b 100644 --- a/ingen/Log.hpp +++ b/ingen/Log.hpp @@ -39,7 +39,7 @@ class World; class INGEN_API Log { public: - typedef std::function Sink; + using Sink = std::function; Log(LV2_Log_Log* log, URIs& uris); diff --git a/ingen/Node.hpp b/ingen/Node.hpp index 038627b0..24e45f2a 100644 --- a/ingen/Node.hpp +++ b/ingen/Node.hpp @@ -61,8 +61,8 @@ public: PORT }; - typedef std::pair ArcsKey; - typedef std::map< ArcsKey, SPtr > Arcs; + using ArcsKey = std::pair; + using Arcs = std::map>; // Graphs only Arcs& arcs() { return _arcs; } diff --git a/ingen/Store.hpp b/ingen/Store.hpp index cf412ce6..3c92dcc4 100644 --- a/ingen/Store.hpp +++ b/ingen/Store.hpp @@ -47,9 +47,9 @@ public: return (i == end()) ? nullptr : i->second.get(); } - typedef std::pair const_range; - - typedef std::map< Raul::Path, SPtr > Objects; + using const_range = std::pair; + using Objects = std::map>; + using Mutex = std::recursive_mutex; iterator find_descendants_end(Store::iterator parent); const_iterator find_descendants_end(Store::const_iterator parent) const; @@ -75,8 +75,6 @@ public: const Raul::Symbol& symbol, bool allow_zero=true) const; - typedef std::recursive_mutex Mutex; - Mutex& mutex() { return _mutex; } private: diff --git a/ingen/Tee.hpp b/ingen/Tee.hpp index 153a3d4b..bf3fd335 100644 --- a/ingen/Tee.hpp +++ b/ingen/Tee.hpp @@ -32,7 +32,7 @@ namespace ingen { class Tee : public Interface { public: - typedef std::vector> Sinks; + using Sinks = std::vector>; explicit Tee(Sinks sinks) : _sinks(std::move(sinks)) {} diff --git a/ingen/client/BlockModel.hpp b/ingen/client/BlockModel.hpp index 6b9881c5..f6aa731a 100644 --- a/ingen/client/BlockModel.hpp +++ b/ingen/client/BlockModel.hpp @@ -50,7 +50,7 @@ public: GraphType graph_type() const override { return Node::GraphType::BLOCK; } - typedef std::vector< SPtr > Ports; + using Ports = std::vector>; SPtr get_port(const Raul::Symbol& symbol) const; SPtr get_port(uint32_t index) const; diff --git a/ingen/client/ClientStore.hpp b/ingen/client/ClientStore.hpp index 5cb097e8..7d83e9f6 100644 --- a/ingen/client/ClientStore.hpp +++ b/ingen/client/ClientStore.hpp @@ -71,7 +71,8 @@ public: void clear(); - typedef std::map< const URI, SPtr > Plugins; + using Plugins = std::map>; + SPtr plugins() const { return _plugins; } SPtr plugins() { return _plugins; } void set_plugins(SPtr p) { _plugins = p; } diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp index 468816aa..5f43b3c4 100644 --- a/ingen/client/PluginModel.hpp +++ b/ingen/client/PluginModel.hpp @@ -67,10 +67,10 @@ public: std::string human_name() const; std::string port_human_name(uint32_t i) const; - typedef std::map ScalePoints; + using ScalePoints = std::map; ScalePoints port_scale_points(uint32_t i) const; - typedef std::map Presets; + using Presets = std::map; const Presets& presets() const { return _presets; } static LilvWorld* lilv_world() { return _lilv_world; } -- cgit v1.2.1