2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-14 06:06:11 +00:00

CParticleSwooshDataFactory: Make GetGeneratorDesc() return a unique_ptr

Same behavior, but with safer memory management.
This commit is contained in:
Lioncash
2020-03-12 14:14:02 -04:00
parent 93121c38f7
commit 59bbbdf41c
2 changed files with 15 additions and 11 deletions

View File

@@ -1,5 +1,7 @@
#pragma once
#include <memory>
#include "Runtime/CFactoryMgr.hpp"
#include "Runtime/CToken.hpp"
#include "Runtime/IOStreams.hpp"
@@ -10,11 +12,11 @@ namespace urde {
class CSwooshDescription;
class CSimplePool;
class CParticleSwooshDataFactory {
static CSwooshDescription* CreateGeneratorDescription(CInputStream& in, CSimplePool* resPool);
static std::unique_ptr<CSwooshDescription> CreateGeneratorDescription(CInputStream& in, CSimplePool* resPool);
static bool CreateWPSM(CSwooshDescription* desc, CInputStream& in, CSimplePool* resPool);
public:
static CSwooshDescription* GetGeneratorDesc(CInputStream& in, CSimplePool* resPool);
static std::unique_ptr<CSwooshDescription> GetGeneratorDesc(CInputStream& in, CSimplePool* resPool);
};
CFactoryFnReturn FParticleSwooshDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms,