diff options
author | David Robillard <d@drobilla.net> | 2022-08-18 01:41:54 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-18 01:41:54 -0400 |
commit | 4564d719745848386a0662a44a47a8400c799560 (patch) | |
tree | 2e17ed86462390a10425e910d23d96bea582c08c /src/server | |
parent | 590f82cba0752f41226bbdbf352753cf336ec758 (diff) | |
download | ingen-4564d719745848386a0662a44a47a8400c799560.tar.gz ingen-4564d719745848386a0662a44a47a8400c799560.tar.bz2 ingen-4564d719745848386a0662a44a47a8400c799560.zip |
Use a consistent style for FOREACH macros
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/BlockFactory.cpp | 4 | ||||
-rw-r--r-- | src/server/Buffer.cpp | 6 | ||||
-rw-r--r-- | src/server/ControlBindings.cpp | 2 | ||||
-rw-r--r-- | src/server/JackDriver.cpp | 2 | ||||
-rw-r--r-- | src/server/LV2Block.cpp | 10 | ||||
-rw-r--r-- | src/server/LV2Plugin.cpp | 2 | ||||
-rw-r--r-- | src/server/PortImpl.cpp | 2 | ||||
-rw-r--r-- | src/server/ingen_lv2.cpp | 4 | ||||
-rw-r--r-- | src/server/internals/Controller.cpp | 2 | ||||
-rw-r--r-- | src/server/internals/Note.cpp | 2 | ||||
-rw-r--r-- | src/server/internals/Trigger.cpp | 2 |
11 files changed, 19 insertions, 19 deletions
diff --git a/src/server/BlockFactory.cpp b/src/server/BlockFactory.cpp index 1d88568a..2b80f037 100644 --- a/src/server/BlockFactory.cpp +++ b/src/server/BlockFactory.cpp @@ -156,14 +156,14 @@ BlockFactory::load_lv2_plugins() } const LilvPlugins* plugins = lilv_world_get_all_plugins(_world.lilv_world()); - LILV_FOREACH(plugins, i, plugins) { + LILV_FOREACH (plugins, i, plugins) { const LilvPlugin* lv2_plug = lilv_plugins_get(plugins, i); const URI uri(lilv_node_as_uri(lilv_plugin_get_uri(lv2_plug))); // Ignore plugins that require features Ingen doesn't support LilvNodes* features = lilv_plugin_get_required_features(lv2_plug); bool supported = true; - LILV_FOREACH(nodes, f, features) { + LILV_FOREACH (nodes, f, features) { const char* feature = lilv_node_as_uri(lilv_nodes_get(features, f)); if (!_world.lv2_features().is_supported(feature)) { supported = false; diff --git a/src/server/Buffer.cpp b/src/server/Buffer.cpp index 199d858b..426cdb27 100644 --- a/src/server/Buffer.cpp +++ b/src/server/Buffer.cpp @@ -132,7 +132,7 @@ Buffer::render_sequence(const RunContext& ctx, const Buffer* src, bool add) float value = init ? init->body : 0.0f; SampleCount offset = ctx.offset(); - LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + LV2_ATOM_SEQUENCE_FOREACH (seq, ev) { if (ev->time.frames >= offset && ev->body.type == atom_Float) { write_block(value, offset, ev->time.frames, add); value = reinterpret_cast<const LV2_Atom_Float*>(&ev->body)->body; @@ -362,7 +362,7 @@ Buffer::next_value_offset(SampleCount offset, SampleCount end) const { if (_type == _factory.uris().atom_Sequence && _value_type) { const auto* seq = get<const LV2_Atom_Sequence>(); - LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + LV2_ATOM_SEQUENCE_FOREACH (seq, ev) { if (ev->time.frames > offset && ev->time.frames < end && ev->body.type == _value_type) { @@ -415,7 +415,7 @@ Buffer::update_value_buffer(SampleCount offset) auto* seq = get<LV2_Atom_Sequence>(); LV2_Atom_Event* latest = nullptr; - LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + LV2_ATOM_SEQUENCE_FOREACH (seq, ev) { if (ev->time.frames > offset) { break; } diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp index f68c28d8..ecbdf8cf 100644 --- a/src/server/ControlBindings.cpp +++ b/src/server/ControlBindings.cpp @@ -418,7 +418,7 @@ ControlBindings::pre_process(RunContext& ctx, Buffer* buffer) } auto* seq = buffer->get<LV2_Atom_Sequence>(); - LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + LV2_ATOM_SEQUENCE_FOREACH (seq, ev) { if (ev->body.type == uris.midi_MidiEvent) { const auto* buf = static_cast<const uint8_t*>(LV2_ATOM_BODY(&ev->body)); const Key key = midi_event_key(ev->body.size, buf, value); diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp index 2a9fb321..b60fb5fa 100644 --- a/src/server/JackDriver.cpp +++ b/src/server/JackDriver.cpp @@ -386,7 +386,7 @@ JackDriver::post_process_port(RunContext& ctx, EnginePort* port) const auto* seq = graph_buf->get<LV2_Atom_Sequence>(); jack_midi_clear_buffer(jack_buf); - LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + LV2_ATOM_SEQUENCE_FOREACH (seq, ev) { const auto* buf = static_cast<const uint8_t*>(LV2_ATOM_BODY(&ev->body)); diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp index be5af8ce..35a06368 100644 --- a/src/server/LV2Block.cpp +++ b/src/server/LV2Block.cpp @@ -271,7 +271,7 @@ LV2Block::instantiate(BufferFactory& bufs, const LilvState* state) is_morph = true; LilvNodes* types = lilv_port_get_value( plug, id, uris.morph_supportsType); - LILV_FOREACH(nodes, i, types) { + LILV_FOREACH (nodes, i, types) { const LilvNode* type = lilv_nodes_get(types, i); if (lilv_node_equals(type, uris.lv2_CVPort)) { port_type = PortType::CV; @@ -302,7 +302,7 @@ LV2Block::instantiate(BufferFactory& bufs, const LilvState* state) if (!buffer_type) { LilvNodes* types = lilv_port_get_value( plug, id, uris.atom_bufferType); - LILV_FOREACH(nodes, i, types) { + LILV_FOREACH (nodes, i, types) { const LilvNode* type = lilv_nodes_get(types, i); if (lilv_node_is_uri(type)) { buffer_type = world.uri_map().map_uri( @@ -327,7 +327,7 @@ LV2Block::instantiate(BufferFactory& bufs, const LilvState* state) if (port_type == PortType::ATOM) { // Get default value, and its length LilvNodes* defaults = lilv_port_get_value(plug, id, uris.lv2_default); - LILV_FOREACH(nodes, i, defaults) { + LILV_FOREACH (nodes, i, defaults) { const LilvNode* d = lilv_nodes_get(defaults, i); if (lilv_node_is_string(d)) { const char* str_val = lilv_node_as_string(d); @@ -347,7 +347,7 @@ LV2Block::instantiate(BufferFactory& bufs, const LilvState* state) // Get minimum size, if set in data LilvNodes* sizes = lilv_port_get_value(plug, id, uris.rsz_minimumSize); - LILV_FOREACH(nodes, i, sizes) { + LILV_FOREACH (nodes, i, sizes) { const LilvNode* d = lilv_nodes_get(sizes, i); if (lilv_node_is_int(d)) { uint32_t size_val = lilv_node_as_int(d); @@ -415,7 +415,7 @@ LV2Block::instantiate(BufferFactory& bufs, const LilvState* state) nullptr }; for (int p = 0; preds[p]; ++p) { LilvNodes* values = lilv_port_get_value(plug, id, preds[p]); - LILV_FOREACH(nodes, v, values) { + LILV_FOREACH (nodes, v, values) { const LilvNode* value = lilv_nodes_get(values, v); if (lilv_node_is_uri(value)) { port->add_property(URI(lilv_node_as_uri(preds[p])), diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp index 121792c7..98234746 100644 --- a/src/server/LV2Plugin.cpp +++ b/src/server/LV2Plugin.cpp @@ -114,7 +114,7 @@ LV2Plugin::load_presets() LilvNodes* presets = lilv_plugin_get_related(_lilv_plugin, uris.pset_Preset); if (presets) { - LILV_FOREACH(nodes, i, presets) { + LILV_FOREACH (nodes, i, presets) { const LilvNode* preset = lilv_nodes_get(presets, i); lilv_world_load_resource(lworld, preset); diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp index 1e7e23cf..f5012c81 100644 --- a/src/server/PortImpl.cpp +++ b/src/server/PortImpl.cpp @@ -485,7 +485,7 @@ PortImpl::monitor(RunContext& ctx, bool send_now) } else if (_monitored) { /* Sequence explicitly monitored, send everything. */ const auto* seq = reinterpret_cast<const LV2_Atom_Sequence*>(atom); - LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + LV2_ATOM_SEQUENCE_FOREACH (seq, ev) { ctx.notify(uris.ingen_activity, ctx.start() + ev->time.frames, this, diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index c1dd4e95..203fc115 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -149,7 +149,7 @@ public: auto* seq = reinterpret_cast<LV2_Atom_Sequence*>(lv2_buf); bool enqueued = false; - LV2_ATOM_SEQUENCE_FOREACH(seq, ev) + LV2_ATOM_SEQUENCE_FOREACH (seq, ev) { if (AtomReader::is_message(uris, &ev->body)) { enqueued = enqueue_message(&ev->body) || enqueued; @@ -262,7 +262,7 @@ public: const URIs& uris = _engine.world().uris(); auto* seq = static_cast<LV2_Atom_Sequence*>(_ports[0]->buffer()); - LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + LV2_ATOM_SEQUENCE_FOREACH (seq, ev) { if (ev->body.type == uris.atom_Object) { const LV2_Atom_Object* obj = reinterpret_cast<LV2_Atom_Object*>(&ev->body); diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp index d8445a8a..ccc6df01 100644 --- a/src/server/internals/Controller.cpp +++ b/src/server/internals/Controller.cpp @@ -124,7 +124,7 @@ ControllerNode::run(RunContext& ctx) auto* seq = midi_in->get<LV2_Atom_Sequence>(); const BufferRef midi_out = _midi_out_port->buffer(0); - LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + LV2_ATOM_SEQUENCE_FOREACH (seq, ev) { const auto* buf = static_cast<const uint8_t*>(LV2_ATOM_BODY_CONST(&ev->body)); if (ev->body.type == _midi_in_port->bufs().uris().midi_MidiEvent && ev->body.size >= 3 && diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp index e67cd441..ea5019a8 100644 --- a/src/server/internals/Note.cpp +++ b/src/server/internals/Note.cpp @@ -178,7 +178,7 @@ NoteNode::run(RunContext& ctx) Buffer* const midi_in = _midi_in_port->buffer(0).get(); auto* seq = midi_in->get<LV2_Atom_Sequence>(); - LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + LV2_ATOM_SEQUENCE_FOREACH (seq, ev) { const auto* buf = static_cast<const uint8_t*>(LV2_ATOM_BODY_CONST(&ev->body)); diff --git a/src/server/internals/Trigger.cpp b/src/server/internals/Trigger.cpp index 19e320c9..89a970fc 100644 --- a/src/server/internals/Trigger.cpp +++ b/src/server/internals/Trigger.cpp @@ -123,7 +123,7 @@ TriggerNode::run(RunContext& ctx) // Initialise output to the empty sequence midi_out->prepare_write(ctx); - LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + LV2_ATOM_SEQUENCE_FOREACH (seq, ev) { const int64_t t = ev->time.frames; const auto* buf = static_cast<const uint8_t*>(LV2_ATOM_BODY_CONST(&ev->body)); |