mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-06-15 08:17:05 +00:00
perf: emplace elements instead of inserting temporaries
- construct container elements in place instead of inserting a temporary - clang-tidy modernize-use-emplace https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-emplace.html
This commit is contained in:
committed by
Dennis Klein
parent
0feda158b4
commit
d5e0c29ced
@@ -513,7 +513,8 @@ void Device::HandleMultipleTransportInput()
|
||||
fMultitransportProceed = true;
|
||||
|
||||
for (const auto& i : fMultitransportInputs) {
|
||||
threads.emplace_back(thread(&Device::PollForTransport, this, fTransports.at(i.first).get(), i.second));
|
||||
threads.emplace_back(
|
||||
&Device::PollForTransport, this, fTransports.at(i.first).get(), i.second);
|
||||
}
|
||||
|
||||
for (thread& t : threads) {
|
||||
|
||||
@@ -189,7 +189,7 @@ vector<string> ProgOptions::GetPropertyKeys() const
|
||||
vector<string> keys;
|
||||
|
||||
for (const auto& it : fVarMap) {
|
||||
keys.push_back(it.first.c_str());
|
||||
keys.emplace_back(it.first.c_str());
|
||||
}
|
||||
|
||||
return keys;
|
||||
|
||||
@@ -390,7 +390,7 @@ class Manager
|
||||
}
|
||||
|
||||
auto* lRegion = GetRegion(id);
|
||||
fTlRegionCache.fRegionsTLCache.emplace_back(std::make_tuple(lRegion, id, fShmId64));
|
||||
fTlRegionCache.fRegionsTLCache.emplace_back(lRegion, id, fShmId64);
|
||||
fTlRegionCache.fRegionsTLCacheGen = fRegionsGen;
|
||||
return lRegion;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user