DeviceFinder: Make use of unordered_map's emplace within _insertToken

Same thing, but less reading.
This commit is contained in:
Lioncash 2019-08-18 05:50:35 -04:00
parent 6cc5b30127
commit 90485ac1b9
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ bool DeviceFinder::_insertToken(std::unique_ptr<DeviceToken>&& token) {
}
m_tokensLock.lock();
TInsertedDeviceToken insertedTok = m_tokens.insert(std::make_pair(token->getDevicePath(), std::move(token)));
const TInsertedDeviceToken insertedTok = m_tokens.emplace(token->getDevicePath(), std::move(token));
m_tokensLock.unlock();
deviceConnected(*insertedTok.first->second);
return true;