2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 17:07:41 +00:00

CParticleDataFactory: Use unique_ptr where applicable

Same behavior, but makes the functions a little safer in terms of memory
management.
This commit is contained in:
Lioncash
2019-10-11 15:13:02 -04:00
parent c4ecf972f5
commit 7430b70b73
2 changed files with 13 additions and 12 deletions

View File

@@ -86,14 +86,14 @@ class CParticleDataFactory {
static s32 GetInt(CInputStream& in);
static bool GetBool(CInputStream& in);
static FourCC GetClassID(CInputStream& in);
static CGenDescription* CreateGeneratorDescription(CInputStream& in, std::vector<CAssetId>& tracker, CAssetId resId,
CSimplePool* resPool);
static std::unique_ptr<CGenDescription> CreateGeneratorDescription(CInputStream& in, std::vector<CAssetId>& tracker,
CAssetId resId, CSimplePool* resPool);
static bool CreateGPSM(CGenDescription* fillDesc, CInputStream& in, std::vector<CAssetId>& tracker,
CSimplePool* resPool);
static void LoadGPSMTokens(CGenDescription* desc);
public:
static CGenDescription* GetGeneratorDesc(CInputStream& in, CSimplePool* resPool);
static std::unique_ptr<CGenDescription> GetGeneratorDesc(CInputStream& in, CSimplePool* resPool);
};
CFactoryFnReturn FParticleFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms,