aboutsummaryrefslogtreecommitdiffstats
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
parent4ca52683ce01f833c552aa62dd80a6a3e48e785c (diff)
downloadingen-ecad88d2128f920f5e11cc3ff443d62b225c79d3.tar.gz
ingen-ecad88d2128f920f5e11cc3ff443d62b225c79d3.tar.bz2
ingen-ecad88d2128f920f5e11cc3ff443d62b225c79d3.zip
Cleanup: Use "using" instead of "typedef" where appropriate
-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
-rw-r--r--src/ClashAvoider.cpp2
-rw-r--r--src/Library.cpp2
-rw-r--r--src/Parser.cpp6
-rw-r--r--src/Resource.cpp4
-rw-r--r--src/World.cpp10
-rw-r--r--src/client/ClientStore.cpp2
-rw-r--r--src/gui/App.hpp2
-rw-r--r--src/gui/GraphBox.cpp2
-rw-r--r--src/gui/GraphCanvas.cpp2
-rw-r--r--src/gui/GraphCanvas.hpp4
-rw-r--r--src/gui/LoadPluginWindow.hpp2
-rw-r--r--src/gui/PluginMenu.cpp2
-rw-r--r--src/gui/PluginMenu.hpp4
-rw-r--r--src/gui/PropertiesWindow.cpp2
-rw-r--r--src/gui/PropertiesWindow.hpp2
-rw-r--r--src/gui/RDFS.cpp4
-rw-r--r--src/gui/RDFS.hpp4
-rw-r--r--src/gui/ThreadedLoader.hpp2
-rw-r--r--src/gui/WindowFactory.hpp2
-rw-r--r--src/server/BlockFactory.cpp2
-rw-r--r--src/server/BlockImpl.hpp2
-rw-r--r--src/server/Broadcaster.hpp2
-rw-r--r--src/server/BufferRef.hpp2
-rw-r--r--src/server/CompiledGraph.hpp2
-rw-r--r--src/server/ControlBindings.hpp6
-rw-r--r--src/server/DirectDriver.hpp5
-rw-r--r--src/server/GraphImpl.cpp2
-rw-r--r--src/server/GraphImpl.hpp10
-rw-r--r--src/server/InputPort.hpp6
-rw-r--r--src/server/JackDriver.cpp2
-rw-r--r--src/server/JackDriver.hpp5
-rw-r--r--src/server/LV2Block.hpp10
-rw-r--r--src/server/PluginImpl.hpp4
-rw-r--r--src/server/PortAudioDriver.hpp5
-rw-r--r--src/server/PortImpl.hpp2
-rw-r--r--src/server/PreProcessContext.hpp2
-rw-r--r--src/server/Task.hpp2
-rw-r--r--src/server/events/CreateBlock.cpp2
-rw-r--r--src/server/events/CreateGraph.cpp2
-rw-r--r--src/server/events/CreatePort.cpp6
-rw-r--r--src/server/events/Delta.hpp2
-rw-r--r--src/server/events/DisconnectAll.hpp2
-rw-r--r--src/server/events/Mark.hpp2
-rw-r--r--src/server/ingen_lv2.cpp4
-rw-r--r--src/server/internals/Note.hpp2
-rw-r--r--src/server/types.hpp8
57 files changed, 102 insertions, 104 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; }
diff --git a/src/ClashAvoider.cpp b/src/ClashAvoider.cpp
index 5ae1f004..4dc8c64d 100644
--- a/src/ClashAvoider.cpp
+++ b/src/ClashAvoider.cpp
@@ -70,7 +70,7 @@ ClashAvoider::map_path(const Raul::Path& in)
if (m != _symbol_map.end()) {
return m->second;
} else {
- typedef std::pair<SymbolMap::iterator, bool> InsertRecord;
+ using InsertRecord = std::pair<SymbolMap::iterator, bool>;
// See if parent is mapped
Raul::Path parent = in.parent();
diff --git a/src/Library.cpp b/src/Library.cpp
index 48002ef0..44deea90 100644
--- a/src/Library.cpp
+++ b/src/Library.cpp
@@ -41,7 +41,7 @@ Library::get_function(const char* name)
#ifdef _WIN32
return (VoidFuncPtr)GetProcAddress((HMODULE)_lib, name);
#else
- typedef VoidFuncPtr (*VoidFuncGetter)(void*, const char*);
+ using VoidFuncGetter = VoidFuncPtr (*)(void*, const char*);
VoidFuncGetter dlfunc = (VoidFuncGetter)dlsym;
return dlfunc(_lib, name);
#endif
diff --git a/src/Parser.cpp b/src/Parser.cpp
index ff416106..e8599cf5 100644
--- a/src/Parser.cpp
+++ b/src/Parser.cpp
@@ -147,7 +147,7 @@ get_properties(ingen::World& world,
return props;
}
-typedef std::pair<Raul::Path, Properties> PortRecord;
+using PortRecord = std::pair<Raul::Path, Properties>;
static boost::optional<PortRecord>
get_port(ingen::World& world,
@@ -354,7 +354,7 @@ parse_graph(ingen::World& world,
target.put(path_to_uri(graph_path), props, ctx);
// For each port on this graph
- typedef std::map<uint32_t, PortRecord> PortRecords;
+ using PortRecords = std::map<uint32_t, PortRecord>;
PortRecords ports;
for (Sord::Iter p = model.find(graph, lv2_port, nil); !p.end(); ++p) {
Sord::Node port = p.get_object();
@@ -532,7 +532,7 @@ parse(ingen::World& world,
}
// Get all subjects and their types (?subject a ?type)
- typedef std::map< Sord::Node, std::set<Sord::Node> > Subjects;
+ using Subjects = std::map< Sord::Node, std::set<Sord::Node> >;
Subjects subjects;
for (Sord::Iter i = model.find(subject, rdf_type, nil); !i.end(); ++i) {
const Sord::Node& subject = i.get_subject();
diff --git a/src/Resource.cpp b/src/Resource.cpp
index 40f5fb4f..2601c2e3 100644
--- a/src/Resource.cpp
+++ b/src/Resource.cpp
@@ -29,7 +29,7 @@ bool
Resource::add_property(const URI& uri, const Atom& value, Graph ctx)
{
// Ignore duplicate statements
- typedef Properties::const_iterator iterator;
+ using iterator = Properties::const_iterator;
const std::pair<iterator, iterator> range = _properties.equal_range(uri);
for (iterator i = range.first; i != range.second && i != _properties.end(); ++i) {
if (i->second == value && i->second.context() == ctx) {
@@ -150,7 +150,7 @@ Resource::type(const URIs& uris,
bool& port,
bool& is_output)
{
- typedef Properties::const_iterator iterator;
+ using iterator = Properties::const_iterator;
const std::pair<iterator, iterator> types_range = properties.equal_range(uris.rdf_type);
graph = block = port = is_output = false;
diff --git a/src/World.cpp b/src/World.cpp
index 72b7b96b..1ba72259 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -141,7 +141,7 @@ public:
}
// Delete module objects but save pointers to libraries
- typedef std::list<std::unique_ptr<Library>> Libs;
+ using Libs = std::list<std::unique_ptr<Library>>;
Libs libs;
for (auto& m : modules) {
libs.emplace_back(std::move(m.second->library));
@@ -162,14 +162,14 @@ public:
// Module libraries go out of scope and close here
}
- typedef std::map<std::string, Module*> Modules;
+ using Modules = std::map<std::string, Module*>;
Modules modules;
- typedef std::map<const std::string, World::InterfaceFactory> InterfaceFactories;
+ using InterfaceFactories = std::map<const std::string, World::InterfaceFactory>;
InterfaceFactories interface_factories;
- typedef bool (*ScriptRunner)(World& world, const char* filename);
- typedef std::map<const std::string, ScriptRunner> ScriptRunners;
+ using ScriptRunner = bool (*)(World& world, const char* filename);
+ using ScriptRunners = std::map<const std::string, ScriptRunner>;
ScriptRunners script_runners;
using LilvWorldUPtr = std::unique_ptr<LilvWorld, decltype(&lilv_world_free)>;
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index 6aadcf2a..a42efd16 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -240,7 +240,7 @@ ClientStore::message(const Message& msg)
void
ClientStore::operator()(const Put& msg)
{
- typedef Properties::const_iterator Iterator;
+ using Iterator = Properties::const_iterator;
const auto& uri = msg.uri;
const auto& properties = msg.properties;
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<Port*, bool> ActivityPorts;
+ using ActivityPorts = std::unordered_map<Port*, bool>;
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<std::string, std::string> Types;
+ using Types = std::map<std::string, std::string>;
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<std::mutex> 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<const std::string, const LilvPluginClass*> LV2Children;
+ using LV2Children = std::multimap<const std::string, const LilvPluginClass*>;
Properties get_initial_data(Resource::Graph ctx=Resource::Graph::DEFAULT);
@@ -117,7 +117,7 @@ private:
App& _app;
SPtr<const client::GraphModel> _graph;
- typedef std::map<SPtr<const client::ObjectModel>, Ganv::Module*> Views;
+ using Views = std::map<SPtr<const client::ObjectModel>, 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<const client::GraphModel> _graph;
- typedef std::map<URI, Gtk::TreeModel::iterator> Rows;
+ using Rows = std::map<URI, Gtk::TreeModel::iterator>;
Rows _rows;
Glib::RefPtr<Gtk::ListStore> _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<client::PluginModel> 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<const std::string, const LilvPluginClass*> LV2Children;
- typedef std::multimap<const std::string, MenuRecord> ClassMenus;
+ using LV2Children = std::multimap<const std::string, const LilvPluginClass*>;
+ using ClassMenus = std::multimap<const std::string, MenuRecord>;
/// 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<URI> URISet;
+using URISet = std::set<URI>;
PropertiesWindow::PropertiesWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& 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<URI, Record> Records;
+ using Records = std::map<URI, Record>;
Records _records;
SPtr<const client::ObjectModel> _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<const client::ObjectModel> model)
{
- typedef Properties::const_iterator PropIter;
- typedef std::pair<PropIter, PropIter> PropRange;
+ using PropIter = Properties::const_iterator;
+ using PropRange = std::pair<PropIter, PropIter>;
// 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<URI> URISet;
+using URISet = std::set<URI>;
/** Label => Resource map. */
-typedef std::map<std::string, URI> Objects;
+using Objects = std::map<std::string, URI>;
/** 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<void> Closure;
+ using Closure = sigc::slot<void>;
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<Raul::Path, GraphWindow*> GraphWindowMap;
+ using GraphWindowMap = std::map<Raul::Path, GraphWindow*>;
GraphWindow* new_graph_window(SPtr<const client::GraphModel> graph,
SPtr<GraphView> view);
diff --git a/src/server/BlockFactory.cpp b/src/server/BlockFactory.cpp
index b6ad442e..18b19a4c 100644
--- a/src/server/BlockFactory.cpp
+++ b/src/server/BlockFactory.cpp
@@ -150,7 +150,7 @@ void
BlockFactory::load_lv2_plugins()
{
// Build an array of port type nodes for checking compatibility
- typedef std::vector< SPtr<LilvNode> > Types;
+ using Types = std::vector<SPtr<LilvNode>>;
Types types;
for (unsigned t = PortType::ID::AUDIO; t <= PortType::ID::ATOM; ++t) {
const URI& uri(PortType((PortType::ID)t).uri());
diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp
index 608bfc3e..c8c36ddf 100644
--- a/src/server/BlockImpl.hpp
+++ b/src/server/BlockImpl.hpp
@@ -62,7 +62,7 @@ class BlockImpl : public NodeImpl
, public boost::intrusive::slist_base_hook<> // In GraphImpl
{
public:
- typedef Raul::Array<PortImpl*> Ports;
+ using Ports = Raul::Array<PortImpl*>;
BlockImpl(PluginImpl* plugin,
const Raul::Symbol& symbol,
diff --git a/src/server/Broadcaster.hpp b/src/server/Broadcaster.hpp
index f03c0abb..a2d75284 100644
--- a/src/server/Broadcaster.hpp
+++ b/src/server/Broadcaster.hpp
@@ -103,7 +103,7 @@ public:
private:
friend class Transfer;
- typedef std::set<SPtr<Interface>> Clients;
+ using Clients = std::set<SPtr<Interface>>;
std::mutex _clients_mutex;
Clients _clients;
diff --git a/src/server/BufferRef.hpp b/src/server/BufferRef.hpp
index c168601c..64eab668 100644
--- a/src/server/BufferRef.hpp
+++ b/src/server/BufferRef.hpp
@@ -26,7 +26,7 @@ namespace server {
class Buffer;
-typedef boost::intrusive_ptr<Buffer> BufferRef;
+using BufferRef = boost::intrusive_ptr<Buffer>;
// Defined in Buffer.cpp
INGEN_API void intrusive_ptr_add_ref(Buffer* b);
diff --git a/src/server/CompiledGraph.hpp b/src/server/CompiledGraph.hpp
index 5cf12a10..959fb18e 100644
--- a/src/server/CompiledGraph.hpp
+++ b/src/server/CompiledGraph.hpp
@@ -53,7 +53,7 @@ private:
CompiledGraph(GraphImpl* graph);
- typedef std::set<BlockImpl*> BlockSet;
+ using BlockSet = std::set<BlockImpl*>;
void dump(const std::string& name) const;
diff --git a/src/server/ControlBindings.hpp b/src/server/ControlBindings.hpp
index 9ac08a7a..3a39c664 100644
--- a/src/server/ControlBindings.hpp
+++ b/src/server/ControlBindings.hpp
@@ -118,9 +118,9 @@ public:
void remove(RunContext& ctx, const std::vector<Binding*>& bindings);
private:
- typedef boost::intrusive::multiset<
- Binding,
- boost::intrusive::compare<BindingLess> > Bindings;
+ using Bindings =
+ boost::intrusive::multiset<Binding,
+ boost::intrusive::compare<BindingLess>>;
Key midi_event_key(uint16_t size, const uint8_t* buf, uint16_t& value);
diff --git a/src/server/DirectDriver.hpp b/src/server/DirectDriver.hpp
index 945761e6..bb949a14 100644
--- a/src/server/DirectDriver.hpp
+++ b/src/server/DirectDriver.hpp
@@ -93,9 +93,8 @@ public:
int real_time_priority() override { return 60; }
private:
- typedef boost::intrusive::slist<EnginePort,
- boost::intrusive::cache_last<true>
- > Ports;
+ using Ports = boost::intrusive::slist<EnginePort,
+ boost::intrusive::cache_last<true>>;
Engine& _engine;
Ports _ports;
diff --git a/src/server/GraphImpl.cpp b/src/server/GraphImpl.cpp
index b0f6145a..05bc6e4a 100644
--- a/src/server/GraphImpl.cpp
+++ b/src/server/GraphImpl.cpp
@@ -82,7 +82,7 @@ GraphImpl::duplicate(Engine& engine,
dup->set_properties(props);
// We need a map of port duplicates to duplicate arcs
- typedef std::unordered_map<PortImpl*, PortImpl*> PortMap;
+ using PortMap = std::unordered_map<PortImpl*, PortImpl*>;
PortMap port_map;
// Add duplicates of all ports
diff --git a/src/server/GraphImpl.hpp b/src/server/GraphImpl.hpp
index 73724c3f..846996f3 100644
--- a/src/server/GraphImpl.hpp
+++ b/src/server/GraphImpl.hpp
@@ -99,8 +99,9 @@ public:
// Graph specific stuff not inherited from Block
- typedef boost::intrusive::slist<
- BlockImpl, boost::intrusive::constant_time_size<true> > Blocks;
+ using Blocks =
+ boost::intrusive::slist<BlockImpl,
+ boost::intrusive::constant_time_size<true>>;
/** Add a block to this graph.
* Pre-process thread only.
@@ -118,8 +119,9 @@ public:
uint32_t num_ports_non_rt() const;
bool has_port_with_index(uint32_t index) const;
- typedef boost::intrusive::slist<
- DuplexPort, boost::intrusive::constant_time_size<true> > PortList;
+ using PortList =
+ boost::intrusive::slist<DuplexPort,
+ boost::intrusive::constant_time_size<true>>;
void add_input(DuplexPort& port) {
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
diff --git a/src/server/InputPort.hpp b/src/server/InputPort.hpp
index 550a787d..35ddb2b9 100644
--- a/src/server/InputPort.hpp
+++ b/src/server/InputPort.hpp
@@ -67,9 +67,9 @@ public:
const Atom& value,
size_t buffer_size = 0);
- typedef boost::intrusive::slist<ArcImpl,
- boost::intrusive::constant_time_size<true>
- > Arcs;
+ using Arcs =
+ boost::intrusive::slist<ArcImpl,
+ boost::intrusive::constant_time_size<true>>;
/** Return the maximum polyphony of an output connected to this input. */
virtual uint32_t max_tail_poly(RunContext& context) const;
diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp
index 537bd855..6d15f3a8 100644
--- a/src/server/JackDriver.cpp
+++ b/src/server/JackDriver.cpp
@@ -52,7 +52,7 @@
#include <string>
#include <utility>
-typedef jack_default_audio_sample_t jack_sample_t;
+using jack_sample_t = jack_default_audio_sample_t;
namespace ingen {
namespace server {
diff --git a/src/server/JackDriver.hpp b/src/server/JackDriver.hpp
index 6b64500e..00b1836a 100644
--- a/src/server/JackDriver.hpp
+++ b/src/server/JackDriver.hpp
@@ -142,9 +142,8 @@ private:
#endif
protected:
- typedef boost::intrusive::slist<EnginePort,
- boost::intrusive::cache_last<true>
- > Ports;
+ using Ports = boost::intrusive::slist<EnginePort,
+ boost::intrusive::cache_last<true>>;
using AudioBufPtr = UPtr<float, FreeDeleter<float>>;
diff --git a/src/server/LV2Block.hpp b/src/server/LV2Block.hpp
index e10775a0..07c04321 100644
--- a/src/server/LV2Block.hpp
+++ b/src/server/LV2Block.hpp
@@ -110,7 +110,7 @@ protected:
return (LilvInstance*)(*_instances)[voice]->instance;
}
- typedef Raul::Array< SPtr<Instance> > Instances;
+ using Instances = Raul::Array<SPtr<Instance>>;
void drop_instances(const MPtr<Instances>& instances) {
if (instances) {
@@ -139,10 +139,10 @@ protected:
void* const data;
};
- typedef boost::intrusive::slist<Response,
- boost::intrusive::cache_last<true>,
- boost::intrusive::constant_time_size<false>
- > Responses;
+ using Responses = boost::intrusive::slist<
+ Response,
+ boost::intrusive::cache_last<true>,
+ boost::intrusive::constant_time_size<false>>;
static LV2_Worker_Status work_respond(
LV2_Worker_Respond_Handle handle, uint32_t size, const void* data);
diff --git a/src/server/PluginImpl.hpp b/src/server/PluginImpl.hpp
index 6ef6fe22..854157ec 100644
--- a/src/server/PluginImpl.hpp
+++ b/src/server/PluginImpl.hpp
@@ -62,8 +62,8 @@ public:
bool is_zombie() const { return _is_zombie; }
void set_is_zombie(bool t) { _is_zombie = t; }
- typedef std::pair<URI, std::string> Preset;
- typedef std::map<URI, std::string> Presets;
+ using Preset = std::pair<URI, std::string>;
+ using Presets = std::map<URI, std::string>;
const Presets& presets(bool force_reload=false) {
if (!_presets_loaded || force_reload) {
diff --git a/src/server/PortAudioDriver.hpp b/src/server/PortAudioDriver.hpp
index f65fc871..679223ad 100644
--- a/src/server/PortAudioDriver.hpp
+++ b/src/server/PortAudioDriver.hpp
@@ -109,9 +109,8 @@ private:
void* outputs);
protected:
- typedef boost::intrusive::slist<EnginePort,
- boost::intrusive::cache_last<true>
- > Ports;
+ using Ports = boost::intrusive::slist<EnginePort,
+ boost::intrusive::cache_last<true>>;
Engine& _engine;
Ports _ports;
diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp
index 902e2cfa..5392d9b7 100644
--- a/src/server/PortImpl.hpp
+++ b/src/server/PortImpl.hpp
@@ -83,7 +83,7 @@ public:
BufferRef buffer;
};
- typedef Raul::Array<Voice> Voices;
+ using Voices = Raul::Array<Voice>;
PortImpl(BufferFactory& bufs,
BlockImpl* block,
diff --git a/src/server/PreProcessContext.hpp b/src/server/PreProcessContext.hpp
index 1d4b428a..7579e1e2 100644
--- a/src/server/PreProcessContext.hpp
+++ b/src/server/PreProcessContext.hpp
@@ -34,7 +34,7 @@ namespace server {
class PreProcessContext
{
public:
- typedef std::unordered_set<GraphImpl*> DirtyGraphs;
+ using DirtyGraphs = std::unordered_set<GraphImpl*>;
/** Return true iff an atomic bundle is currently being pre-processed. */
bool in_bundle() const { return _in_bundle; }
diff --git a/src/server/Task.hpp b/src/server/Task.hpp
index a2e3e86a..a6489e61 100644
--- a/src/server/Task.hpp
+++ b/src/server/Task.hpp
@@ -96,7 +96,7 @@ public:
void set_done(bool done) { _done = done; }
private:
- typedef std::deque<std::unique_ptr<Task>> Children;
+ using Children = std::deque<std::unique_ptr<Task>>;
Task(const Task&) = delete;
Task& operator=(const Task&) = delete;
diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp
index b9c844cb..cfeb0e3d 100644
--- a/src/server/events/CreateBlock.cpp
+++ b/src/server/events/CreateBlock.cpp
@@ -54,7 +54,7 @@ CreateBlock::CreateBlock(Engine& engine,
bool
CreateBlock::pre_process(PreProcessContext& ctx)
{
- typedef Properties::const_iterator iterator;
+ using iterator = Properties::const_iterator;
const ingen::URIs& uris = _engine.world().uris();
const SPtr<Store> store = _engine.store();
diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp
index e2dffc61..5561d147 100644
--- a/src/server/events/CreateGraph.cpp
+++ b/src/server/events/CreateGraph.cpp
@@ -109,7 +109,7 @@ CreateGraph::pre_process(PreProcessContext& ctx)
const ingen::URIs& uris = _engine.world().uris();
- typedef Properties::const_iterator iterator;
+ using iterator = Properties::const_iterator;
uint32_t ext_poly = 1;
uint32_t int_poly = 1;
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp
index f463eb4f..09eb8cff 100644
--- a/src/server/events/CreatePort.cpp
+++ b/src/server/events/CreatePort.cpp
@@ -57,8 +57,8 @@ CreatePort::CreatePort(Engine& engine,
{
const ingen::URIs& uris = _engine.world().uris();
- typedef Properties::const_iterator Iterator;
- typedef std::pair<Iterator, Iterator> Range;
+ using Iterator = Properties::const_iterator;
+ using Range = std::pair<Iterator, Iterator>;
const Range types = properties.equal_range(uris.rdf_type);
for (Iterator i = types.first; i != types.second; ++i) {
@@ -116,7 +116,7 @@ CreatePort::pre_process(PreProcessContext& ctx)
const uint32_t buf_size = bufs.default_size(_buf_type);
const int32_t old_n_ports = _graph->num_ports_non_rt();
- typedef Properties::const_iterator PropIter;
+ using PropIter = Properties::const_iterator;
PropIter index_i = _properties.find(uris.lv2_index);
int32_t index = 0;
diff --git a/src/server/events/Delta.hpp b/src/server/events/Delta.hpp
index dcc265f8..4328ad83 100644
--- a/src/server/events/Delta.hpp
+++ b/src/server/events/Delta.hpp
@@ -95,7 +95,7 @@ private:
LOADED_BUNDLE
};
- typedef std::vector<UPtr<SetPortValue>> SetEvents;
+ using SetEvents = std::vector<UPtr<SetPortValue>>;
void init();
diff --git a/src/server/events/DisconnectAll.hpp b/src/server/events/DisconnectAll.hpp
index 8aa63d2b..3edfedd6 100644
--- a/src/server/events/DisconnectAll.hpp
+++ b/src/server/events/DisconnectAll.hpp
@@ -60,7 +60,7 @@ public:
void undo(Interface& target) override;
private:
- typedef std::list<Disconnect::Impl*> Impls;
+ using Impls = std::list<Disconnect::Impl*>;
const ingen::DisconnectAll _msg;
GraphImpl* _parent;
diff --git a/src/server/events/Mark.hpp b/src/server/events/Mark.hpp
index 33aedcd6..ad8cb66b 100644
--- a/src/server/events/Mark.hpp
+++ b/src/server/events/Mark.hpp
@@ -59,7 +59,7 @@ public:
private:
enum class Type { BUNDLE_BEGIN, BUNDLE_END };
- typedef std::map<GraphImpl*, MPtr<CompiledGraph>> CompiledGraphs;
+ using CompiledGraphs = std::map<GraphImpl*, MPtr<CompiledGraph>>;
CompiledGraphs _compiled_graphs;
Type _type;
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index b40ccbf9..5ef3a321 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -92,7 +92,7 @@ class Lib {
public:
explicit Lib(const char* bundle_path);
- typedef std::vector< SPtr<const LV2Graph> > Graphs;
+ using Graphs = std::vector<SPtr<const LV2Graph>>;
Graphs graphs;
};
@@ -391,7 +391,7 @@ public:
AtomReader& reader() { return _reader; }
AtomWriter& writer() { return _writer; }
- typedef std::vector<EnginePort*> Ports;
+ using Ports = std::vector<EnginePort*>;
Ports& ports() { return _ports; }
diff --git a/src/server/internals/Note.hpp b/src/server/internals/Note.hpp
index 2911f55b..eed5dda7 100644
--- a/src/server/internals/Note.hpp
+++ b/src/server/internals/Note.hpp
@@ -84,7 +84,7 @@ private:
SampleCount time;
};
- typedef Raul::Array<Voice> Voices;
+ using Voices = Raul::Array<Voice>;
void free_voice(RunContext& context, uint32_t voice, FrameTime time);
diff --git a/src/server/types.hpp b/src/server/types.hpp
index e7dae117..bd211c31 100644
--- a/src/server/types.hpp
+++ b/src/server/types.hpp
@@ -19,9 +19,9 @@
#include <cstdint>
-typedef float Sample;
-typedef uint32_t SampleCount;
-typedef uint32_t SampleRate;
-typedef uint32_t FrameTime;
+using Sample = float;
+using SampleCount = uint32_t;
+using SampleRate = uint32_t;
+using FrameTime = uint32_t;
#endif // INGEN_ENGINE_TYPES_HPP