mirror of https://github.com/AxioDL/metaforce.git
CElementGen: std::move TToken instance in constructor
Allows the parameter to be moved into via calling code.
This commit is contained in:
parent
af2a82b5a7
commit
15dce1683e
|
@ -53,9 +53,8 @@ void CElementGen::Initialize() {
|
|||
|
||||
void CElementGen::Shutdown() { CElementGenShaders::Shutdown(); }
|
||||
|
||||
CElementGen::CElementGen(const TToken<CGenDescription>& gen, EModelOrientationType orientType,
|
||||
EOptionalSystemFlags flags)
|
||||
: x1c_genDesc(gen), x2c_orientType(orientType), x27c_randState(x94_randomSeed) {
|
||||
CElementGen::CElementGen(TToken<CGenDescription> gen, EModelOrientationType orientType, EOptionalSystemFlags flags)
|
||||
: x1c_genDesc(std::move(gen)), x2c_orientType(orientType), x27c_randState(x94_randomSeed) {
|
||||
CGenDescription* desc = x1c_genDesc.GetObj();
|
||||
x28_loadedGenDesc = desc;
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ private:
|
|||
void AccumulateBounds(const zeus::CVector3f& pos, float size);
|
||||
|
||||
public:
|
||||
CElementGen(const TToken<CGenDescription>& gen, EModelOrientationType orientType = EModelOrientationType::Normal,
|
||||
explicit CElementGen(TToken<CGenDescription> gen, EModelOrientationType orientType = EModelOrientationType::Normal,
|
||||
EOptionalSystemFlags flags = EOptionalSystemFlags::One);
|
||||
~CElementGen() override;
|
||||
|
||||
|
|
Loading…
Reference in New Issue