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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user