mirror of https://github.com/AxioDL/metaforce.git
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:
parent
f1d08c4fbf
commit
dea89e7664
|
@ -34,8 +34,8 @@ std::string_view CAudioSys::SysGetGroupSetName(CAssetId id) {
|
||||||
bool CAudioSys::SysLoadGroupSet(CSimplePool* pool, CAssetId id) {
|
bool CAudioSys::SysLoadGroupSet(CSimplePool* pool, CAssetId id) {
|
||||||
if (!FindGroupSet(SysGetGroupSetName(id))) {
|
if (!FindGroupSet(SysGetGroupSetName(id))) {
|
||||||
TLockedToken<CAudioGroupSet> set = pool->GetObj(SObjectTag{FOURCC('AGSC'), id});
|
TLockedToken<CAudioGroupSet> set = pool->GetObj(SObjectTag{FOURCC('AGSC'), id});
|
||||||
mpGroupSetDB.emplace(std::make_pair(set->GetName(), set));
|
mpGroupSetDB.emplace(set->GetName(), set);
|
||||||
mpGroupSetResNameDB.emplace(std::make_pair(id, set->GetName()));
|
mpGroupSetResNameDB.emplace(id, set->GetName());
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
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) {
|
bool CAudioSys::SysLoadGroupSet(const TLockedToken<CAudioGroupSet>& set, std::string_view name, CAssetId id) {
|
||||||
if (!FindGroupSet(name)) {
|
if (!FindGroupSet(name)) {
|
||||||
mpGroupSetDB.emplace(std::make_pair(set->GetName(), set));
|
mpGroupSetDB.emplace(set->GetName(), set);
|
||||||
mpGroupSetResNameDB.emplace(std::make_pair(id, set->GetName()));
|
mpGroupSetResNameDB.emplace(id, set->GetName());
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue