mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 22:27:42 +00:00
CParticleElectricDataFactory: Make GetGeneratorDesc() return a unique_ptr
Same behavior, but with safer memory management.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "Runtime/CFactoryMgr.hpp"
|
||||
#include "Runtime/CToken.hpp"
|
||||
#include "Runtime/IOStreams.hpp"
|
||||
@@ -10,12 +12,12 @@ namespace urde {
|
||||
class CElectricDescription;
|
||||
class CSimplePool;
|
||||
class CParticleElectricDataFactory {
|
||||
static CElectricDescription* CreateElectricDescription(CInputStream& in, CSimplePool* resPool);
|
||||
static std::unique_ptr<CElectricDescription> CreateElectricDescription(CInputStream& in, CSimplePool* resPool);
|
||||
static bool CreateELSM(CElectricDescription* desc, CInputStream& in, CSimplePool* resPool);
|
||||
static void LoadELSMTokens(CElectricDescription* desc);
|
||||
|
||||
public:
|
||||
static CElectricDescription* GetGeneratorDesc(CInputStream& in, CSimplePool* resPool);
|
||||
static std::unique_ptr<CElectricDescription> GetGeneratorDesc(CInputStream& in, CSimplePool* resPool);
|
||||
};
|
||||
|
||||
CFactoryFnReturn FParticleElectricDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms,
|
||||
|
||||
Reference in New Issue
Block a user