summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-01-21 00:41:34 +0100
committerDavid Robillard <d@drobilla.net>2018-01-21 00:41:34 +0100
commit90fca083052880479ad90d870e556f0648e32106 (patch)
treed99d4aa6f7f519d59b0d262dbc1f5451afff07d1 /src/server/events
parente84092a7acee6c4d1493cbdd23ec5676b923f44d (diff)
downloadingen-90fca083052880479ad90d870e556f0648e32106.tar.gz
ingen-90fca083052880479ad90d870e556f0648e32106.tar.bz2
ingen-90fca083052880479ad90d870e556f0648e32106.zip
Replace insert(make_pair(...)) with emplace
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/CreateBlock.cpp6
-rw-r--r--src/server/events/Mark.cpp2
2 files changed, 4 insertions, 4 deletions
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();