diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/BlockFactory.cpp | 14 | ||||
-rw-r--r-- | src/server/ClientUpdate.cpp | 2 | ||||
-rw-r--r-- | src/server/DuplexPort.cpp | 8 | ||||
-rw-r--r-- | src/server/LV2Plugin.cpp | 5 | ||||
-rw-r--r-- | src/server/events/CreateBlock.cpp | 6 | ||||
-rw-r--r-- | src/server/events/Mark.cpp | 2 |
6 files changed, 18 insertions, 19 deletions
diff --git a/src/server/BlockFactory.cpp b/src/server/BlockFactory.cpp index d33be9fc..a1367e12 100644 --- a/src/server/BlockFactory.cpp +++ b/src/server/BlockFactory.cpp @@ -111,19 +111,19 @@ BlockFactory::load_internal_plugins() { Ingen::URIs& uris = _world->uris(); InternalPlugin* block_delay_plug = BlockDelayNode::internal_plugin(uris); - _plugins.insert(make_pair(block_delay_plug->uri(), block_delay_plug)); + _plugins.emplace(block_delay_plug->uri(), block_delay_plug); InternalPlugin* controller_plug = ControllerNode::internal_plugin(uris); - _plugins.insert(make_pair(controller_plug->uri(), controller_plug)); + _plugins.emplace(controller_plug->uri(), controller_plug); InternalPlugin* note_plug = NoteNode::internal_plugin(uris); - _plugins.insert(make_pair(note_plug->uri(), note_plug)); + _plugins.emplace(note_plug->uri(), note_plug); InternalPlugin* time_plug = TimeNode::internal_plugin(uris); - _plugins.insert(make_pair(time_plug->uri(), time_plug)); + _plugins.emplace(time_plug->uri(), time_plug); InternalPlugin* trigger_plug = TriggerNode::internal_plugin(uris); - _plugins.insert(make_pair(trigger_plug->uri(), trigger_plug)); + _plugins.emplace(trigger_plug->uri(), trigger_plug); } void @@ -138,7 +138,7 @@ BlockFactory::load_plugin(const Raul::URI& uri) const LilvPlugin* plug = lilv_plugins_get_by_uri(plugs, node); if (plug) { LV2Plugin* const ingen_plugin = new LV2Plugin(_world, plug); - _plugins.insert(make_pair(uri, ingen_plugin)); + _plugins.emplace(uri, ingen_plugin); } lilv_node_free(node); } @@ -216,7 +216,7 @@ BlockFactory::load_lv2_plugins() auto p = _plugins.find(uri); if (p == _plugins.end()) { LV2Plugin* const plugin = new LV2Plugin(_world, lv2_plug); - _plugins.insert(make_pair(uri, plugin)); + _plugins.emplace(uri, plugin); } else if (lilv_plugin_verify(lv2_plug)) { p->second->set_is_zombie(false); } diff --git a/src/server/ClientUpdate.cpp b/src/server/ClientUpdate.cpp index a5f85cef..b65fac12 100644 --- a/src/server/ClientUpdate.cpp +++ b/src/server/ClientUpdate.cpp @@ -42,7 +42,7 @@ ClientUpdate::put_port(const PortImpl* port) if (port->is_a(PortType::CONTROL) || port->is_a(PortType::CV)) { Properties props = port->properties(); props.erase(uris.ingen_value); - props.insert(std::make_pair(uris.ingen_value, port->value())); + props.emplace(uris.ingen_value, port->value()); put(port->uri(), props); } else { put(port->uri(), port->properties()); diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp index e81114ff..7e32e236 100644 --- a/src/server/DuplexPort.cpp +++ b/src/server/DuplexPort.cpp @@ -102,13 +102,13 @@ DuplexPort::inherit_neighbour(const PortImpl* port, if (_type == PortType::CONTROL || _type == PortType::CV) { if (port->minimum().get<float>() < _min.get<float>()) { _min = port->minimum(); - remove.insert(std::make_pair(uris.lv2_minimum, uris.patch_wildcard)); - add.insert(std::make_pair(uris.lv2_minimum, port->minimum())); + remove.emplace(uris.lv2_minimum, uris.patch_wildcard); + add.emplace(uris.lv2_minimum, port->minimum()); } if (port->maximum().get<float>() > _max.get<float>()) { _max = port->maximum(); - remove.insert(std::make_pair(uris.lv2_maximum, uris.patch_wildcard)); - add.insert(std::make_pair(uris.lv2_maximum, port->maximum())); + remove.emplace(uris.lv2_maximum, uris.patch_wildcard); + add.emplace(uris.lv2_maximum, port->maximum()); } } else if (_type == PortType::ATOM) { for (auto i = port->properties().find(uris.atom_supports); diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp index 86bad136..d51aeda3 100644 --- a/src/server/LV2Plugin.cpp +++ b/src/server/LV2Plugin.cpp @@ -122,9 +122,8 @@ LV2Plugin::load_presets() if (labels) { const LilvNode* label = lilv_nodes_get_first(labels); - _presets.insert( - std::make_pair(Raul::URI(lilv_node_as_uri(preset)), - lilv_node_as_string(label))); + _presets.emplace(Raul::URI(lilv_node_as_uri(preset)), + lilv_node_as_string(label)); lilv_nodes_free(labels); } else { diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp index eb307711..2c7978b1 100644 --- a/src/server/events/CreateBlock.cpp +++ b/src/server/events/CreateBlock.cpp @@ -71,7 +71,7 @@ CreateBlock::pre_process(PreProcessContext& ctx) const auto value = i->second; auto next = i; next = _properties.erase(i); - _properties.insert(std::make_pair(uris.lv2_prototype, value)); + _properties.emplace(uris.lv2_prototype, value); i = next; } @@ -106,8 +106,8 @@ CreateBlock::pre_process(PreProcessContext& ctx) but the client expects an actual LV2 plugin as prototype. */ _properties.erase(uris.ingen_prototype); _properties.erase(uris.lv2_prototype); - _properties.insert(std::make_pair(uris.lv2_prototype, - uris.forge.make_urid(ancestor->plugin()->uri()))); + _properties.emplace(uris.lv2_prototype, + uris.forge.make_urid(ancestor->plugin()->uri())); } else { // Prototype is a plugin PluginImpl* const plugin = _engine.block_factory()->plugin(prototype); diff --git a/src/server/events/Mark.cpp b/src/server/events/Mark.cpp index 90b449d5..3c0dfaaf 100644 --- a/src/server/events/Mark.cpp +++ b/src/server/events/Mark.cpp @@ -60,7 +60,7 @@ Mark::pre_process(PreProcessContext& ctx) for (GraphImpl* g : ctx.dirty_graphs()) { MPtr<CompiledGraph> cg = compile(*_engine.maid(), *g); if (cg) { - _compiled_graphs.insert(std::make_pair(g, std::move(cg))); + _compiled_graphs.emplace(g, std::move(cg)); } } ctx.dirty_graphs().clear(); |