summaryrefslogtreecommitdiffstats
path: root/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-12-08 17:12:50 +0100
committerDavid Robillard <d@drobilla.net>2019-12-08 20:59:06 +0100
commitecad88d2128f920f5e11cc3ff443d62b225c79d3 (patch)
treec497cebca3455f4201f38d017db0f1566f8004f7 /ingen
parent4ca52683ce01f833c552aa62dd80a6a3e48e785c (diff)
downloadingen-ecad88d2128f920f5e11cc3ff443d62b225c79d3.tar.gz
ingen-ecad88d2128f920f5e11cc3ff443d62b225c79d3.tar.bz2
ingen-ecad88d2128f920f5e11cc3ff443d62b225c79d3.zip
Cleanup: Use "using" instead of "typedef" where appropriate
Diffstat (limited to 'ingen')
-rw-r--r--ingen/ClashAvoider.hpp4
-rw-r--r--ingen/Configuration.hpp6
-rw-r--r--ingen/FilePath.hpp6
-rw-r--r--ingen/LV2Features.hpp4
-rw-r--r--ingen/Log.hpp2
-rw-r--r--ingen/Node.hpp4
-rw-r--r--ingen/Store.hpp8
-rw-r--r--ingen/Tee.hpp2
-rw-r--r--ingen/client/BlockModel.hpp2
-rw-r--r--ingen/client/ClientStore.hpp3
-rw-r--r--ingen/client/PluginModel.hpp4
11 files changed, 22 insertions, 23 deletions
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<Raul::Path, unsigned> Offsets;
- typedef std::map<Raul::Path, Raul::Path> SymbolMap;
+ using Offsets = std::map<Raul::Path, unsigned>;
+ using SymbolMap = std::map<Raul::Path, Raul::Path>;
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<std::string, Option> Options;
- typedef std::map<char, std::string> ShortNames;
- typedef std::map<std::string, std::string> Keys;
+ using Options = std::map<std::string, Option>;
+ using ShortNames = std::map<char, std::string>;
+ using Keys = std::map<std::string, std::string>;
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<value_type> string_type;
+ using string_type = std::basic_string<value_type>;
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<LV2_Feature> > FeatureVector;
+ using FeatureVector = std::vector<SPtr<LV2_Feature>>;
explicit FeatureArray(FeatureVector& features);
@@ -84,7 +84,7 @@ protected:
SPtr<FeatureArray> lv2_features(World& world, Node* node) const;
private:
- typedef std::vector< SPtr<Feature> > Features;
+ using Features = std::vector<SPtr<Feature>>;
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<int(LV2_URID, const char*, va_list)> Sink;
+ using Sink = std::function<int(LV2_URID, const char*, va_list)>;
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<const Node*, const Node*> ArcsKey;
- typedef std::map< ArcsKey, SPtr<Arc> > Arcs;
+ using ArcsKey = std::pair<const Node*, const Node*>;
+ using Arcs = std::map<ArcsKey, SPtr<Arc>>;
// 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_iterator, const_iterator> const_range;
-
- typedef std::map< Raul::Path, SPtr<Node> > Objects;
+ using const_range = std::pair<const_iterator, const_iterator>;
+ using Objects = std::map<Raul::Path, SPtr<Node>>;
+ 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<SPtr<Interface>> Sinks;
+ using Sinks = std::vector<SPtr<Interface>>;
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<const PortModel> > Ports;
+ using Ports = std::vector<SPtr<const PortModel>>;
SPtr<const PortModel> get_port(const Raul::Symbol& symbol) const;
SPtr<const PortModel> 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<PluginModel> > Plugins;
+ using Plugins = std::map<const URI, SPtr<PluginModel>>;
+
SPtr<const Plugins> plugins() const { return _plugins; }
SPtr<Plugins> plugins() { return _plugins; }
void set_plugins(SPtr<Plugins> 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<float, std::string> ScalePoints;
+ using ScalePoints = std::map<float, std::string>;
ScalePoints port_scale_points(uint32_t i) const;
- typedef std::map<URI, std::string> Presets;
+ using Presets = std::map<URI, std::string>;
const Presets& presets() const { return _presets; }
static LilvWorld* lilv_world() { return _lilv_world; }