2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:07:42 +00:00

Remove unnecessary and RVO-detrimental moves

This commit is contained in:
Jack Andersen
2016-10-02 18:39:31 -10:00
parent e92d4ab6a8
commit 9b6ab93ae5
14 changed files with 25 additions and 25 deletions

View File

@@ -44,13 +44,13 @@ SParticleModel CParticleDataFactory::GetModel(CInputStream& in, CSimplePool* res
ResId id = in.readUint32Big();
if (!id)
return {};
return {std::move(resPool->GetObj({FOURCC('CMDL'), id})), true};
return {resPool->GetObj({FOURCC('CMDL'), id}), true};
}
SChildGeneratorDesc CParticleDataFactory::GetChildGeneratorDesc(ResId res, CSimplePool* resPool, const std::vector<ResId>& tracker)
{
if (std::count(tracker.cbegin(), tracker.cend(), res) == 0)
return {std::move(resPool->GetObj({FOURCC('PART'), res})), true};
return {resPool->GetObj({FOURCC('PART'), res}), true};
return {};
}
@@ -73,7 +73,7 @@ SSwooshGeneratorDesc CParticleDataFactory::GetSwooshGeneratorDesc(CInputStream&
ResId id = in.readUint32Big();
if (!id)
return {};
return {std::move(resPool->GetObj({FOURCC('SWHC'), id})), true};
return {resPool->GetObj({FOURCC('SWHC'), id}), true};
}
SElectricGeneratorDesc CParticleDataFactory::GetElectricGeneratorDesc(CInputStream& in, CSimplePool* resPool)
@@ -84,7 +84,7 @@ SElectricGeneratorDesc CParticleDataFactory::GetElectricGeneratorDesc(CInputStre
ResId id = in.readUint32Big();
if (!id)
return {};
return {std::move(resPool->GetObj({FOURCC('ELSC'), id})), true};
return {resPool->GetObj({FOURCC('ELSC'), id}), true};
}
CUVElement* CParticleDataFactory::GetTextureElement(CInputStream& in, CSimplePool* resPool)