summaryrefslogtreecommitdiffstats
path: root/src/server
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 /src/server
parent4ca52683ce01f833c552aa62dd80a6a3e48e785c (diff)
downloadingen-ecad88d2128f920f5e11cc3ff443d62b225c79d3.tar.gz
ingen-ecad88d2128f920f5e11cc3ff443d62b225c79d3.tar.bz2
ingen-ecad88d2128f920f5e11cc3ff443d62b225c79d3.zip
Cleanup: Use "using" instead of "typedef" where appropriate
Diffstat (limited to 'src/server')
-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
27 files changed, 50 insertions, 51 deletions
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