From dea89e76644b89e56eb8968ee3b2ffa789f9c1fa Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 30 Sep 2019 11:00:47 -0400 Subject: [PATCH] CAudioSys: Remove construction of pairs in emplace calls The purpose of emplace is to construct the pair within the map. While using make_pair will result in the same behavior, it's a tad more verbose than it needs to be. --- Runtime/Audio/CAudioSys.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Runtime/Audio/CAudioSys.cpp b/Runtime/Audio/CAudioSys.cpp index 028d17a78..ce65c356d 100644 --- a/Runtime/Audio/CAudioSys.cpp +++ b/Runtime/Audio/CAudioSys.cpp @@ -34,8 +34,8 @@ std::string_view CAudioSys::SysGetGroupSetName(CAssetId id) { bool CAudioSys::SysLoadGroupSet(CSimplePool* pool, CAssetId id) { if (!FindGroupSet(SysGetGroupSetName(id))) { TLockedToken set = pool->GetObj(SObjectTag{FOURCC('AGSC'), id}); - mpGroupSetDB.emplace(std::make_pair(set->GetName(), set)); - mpGroupSetResNameDB.emplace(std::make_pair(id, set->GetName())); + mpGroupSetDB.emplace(set->GetName(), set); + mpGroupSetResNameDB.emplace(id, set->GetName()); return false; } else { return true; @@ -44,8 +44,8 @@ bool CAudioSys::SysLoadGroupSet(CSimplePool* pool, CAssetId id) { bool CAudioSys::SysLoadGroupSet(const TLockedToken& set, std::string_view name, CAssetId id) { if (!FindGroupSet(name)) { - mpGroupSetDB.emplace(std::make_pair(set->GetName(), set)); - mpGroupSetResNameDB.emplace(std::make_pair(id, set->GetName())); + mpGroupSetDB.emplace(set->GetName(), set); + mpGroupSetResNameDB.emplace(id, set->GetName()); return false; } else { return true;