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.
This commit is contained in:
Lioncash 2019-09-30 11:00:47 -04:00
parent f1d08c4fbf
commit dea89e7664
1 changed files with 4 additions and 4 deletions

View File

@ -34,8 +34,8 @@ std::string_view CAudioSys::SysGetGroupSetName(CAssetId id) {
bool CAudioSys::SysLoadGroupSet(CSimplePool* pool, CAssetId id) {
if (!FindGroupSet(SysGetGroupSetName(id))) {
TLockedToken<CAudioGroupSet> 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<CAudioGroupSet>& 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;