summaryrefslogtreecommitdiffstats
path: root/src/ClashAvoider.cpp
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/ClashAvoider.cpp
parente84092a7acee6c4d1493cbdd23ec5676b923f44d (diff)
downloadingen-90fca083052880479ad90d870e556f0648e32106.tar.gz
ingen-90fca083052880479ad90d870e556f0648e32106.tar.bz2
ingen-90fca083052880479ad90d870e556f0648e32106.zip
Replace insert(make_pair(...)) with emplace
Diffstat (limited to 'src/ClashAvoider.cpp')
-rw-r--r--src/ClashAvoider.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ClashAvoider.cpp b/src/ClashAvoider.cpp
index 3ec3a12d..dafd4472 100644
--- a/src/ClashAvoider.cpp
+++ b/src/ClashAvoider.cpp
@@ -72,7 +72,7 @@ ClashAvoider::map_path(const Raul::Path& in)
if (p != _symbol_map.end()) {
const Raul::Path mapped = Raul::Path(
p->second.base() + in.substr(parent.base().length()));
- InsertRecord i = _symbol_map.insert(make_pair(in, mapped));
+ InsertRecord i = _symbol_map.emplace(in, mapped);
return i.first->second;
}
parent = parent.parent();
@@ -80,7 +80,7 @@ ClashAvoider::map_path(const Raul::Path& in)
if (!exists(in) && _symbol_map.find(in) == _symbol_map.end()) {
// No clash, use symbol unmodified
- InsertRecord i = _symbol_map.insert(make_pair(in, in));
+ InsertRecord i = _symbol_map.emplace(in, in);
assert(i.second);
return i.first->second;
@@ -111,10 +111,9 @@ ClashAvoider::map_path(const Raul::Path& in)
}
Raul::Symbol sym(name);
std::string str = ss.str();
- InsertRecord i = _symbol_map.insert(
- make_pair(in, Raul::Path(str)));
+ InsertRecord i = _symbol_map.emplace(in, Raul::Path(str));
offset = _store.child_name_offset(in.parent(), sym, false);
- _offsets.insert(make_pair(base_path, offset));
+ _offsets.emplace(base_path, offset);
return i.first->second;
} else {
if (o != _offsets.end()) {