mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 18:09:39 +00:00
Use std::make_shared
This commit is contained in:
parent
1078708da0
commit
b3c5d64ff3
1 changed files with 11 additions and 11 deletions
|
@ -120,7 +120,7 @@ void NiRotatingParticlesData::read(NIFStream *nif)
|
||||||
|
|
||||||
void NiPosData::read(NIFStream *nif)
|
void NiPosData::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
mKeyList.reset(new Vector3KeyMap);
|
mKeyList = std::make_shared<Vector3KeyMap>();
|
||||||
mKeyList->read(nif);
|
mKeyList->read(nif);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,14 +128,14 @@ void NiUVData::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
for(int i = 0;i < 4;i++)
|
for(int i = 0;i < 4;i++)
|
||||||
{
|
{
|
||||||
mKeyList[i].reset(new FloatKeyMap);
|
mKeyList[i] = std::make_shared<FloatKeyMap>();
|
||||||
mKeyList[i]->read(nif);
|
mKeyList[i]->read(nif);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NiFloatData::read(NIFStream *nif)
|
void NiFloatData::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
mKeyList.reset(new FloatKeyMap);
|
mKeyList = std::make_shared<FloatKeyMap>();
|
||||||
mKeyList->read(nif);
|
mKeyList->read(nif);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ void NiPixelData::read(NIFStream *nif)
|
||||||
|
|
||||||
void NiColorData::read(NIFStream *nif)
|
void NiColorData::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
mKeyMap.reset(new Vector4KeyMap);
|
mKeyMap = std::make_shared<Vector4KeyMap>();
|
||||||
mKeyMap->read(nif);
|
mKeyMap->read(nif);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ void NiMorphData::read(NIFStream *nif)
|
||||||
mMorphs.resize(morphCount);
|
mMorphs.resize(morphCount);
|
||||||
for(int i = 0;i < morphCount;i++)
|
for(int i = 0;i < morphCount;i++)
|
||||||
{
|
{
|
||||||
mMorphs[i].mKeyFrames.reset(new FloatKeyMap);
|
mMorphs[i].mKeyFrames = std::make_shared<FloatKeyMap>();
|
||||||
mMorphs[i].mKeyFrames->read(nif, true);
|
mMorphs[i].mKeyFrames->read(nif, true);
|
||||||
nif->getVector3s(mMorphs[i].mVertices, vertCount);
|
nif->getVector3s(mMorphs[i].mVertices, vertCount);
|
||||||
}
|
}
|
||||||
|
@ -239,22 +239,22 @@ void NiMorphData::read(NIFStream *nif)
|
||||||
|
|
||||||
void NiKeyframeData::read(NIFStream *nif)
|
void NiKeyframeData::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
mRotations.reset(new QuaternionKeyMap);
|
mRotations = std::make_shared<QuaternionKeyMap>();
|
||||||
mRotations->read(nif);
|
mRotations->read(nif);
|
||||||
if(mRotations->mInterpolationType == Vector3KeyMap::sXYZInterpolation)
|
if(mRotations->mInterpolationType == Vector3KeyMap::sXYZInterpolation)
|
||||||
{
|
{
|
||||||
//Chomp unused float
|
//Chomp unused float
|
||||||
nif->getFloat();
|
nif->getFloat();
|
||||||
mXRotations.reset(new FloatKeyMap);
|
mXRotations = std::make_shared<FloatKeyMap>();
|
||||||
mYRotations.reset(new FloatKeyMap);
|
mYRotations = std::make_shared<FloatKeyMap>();
|
||||||
mZRotations.reset(new FloatKeyMap);
|
mZRotations = std::make_shared<FloatKeyMap>();
|
||||||
mXRotations->read(nif, true);
|
mXRotations->read(nif, true);
|
||||||
mYRotations->read(nif, true);
|
mYRotations->read(nif, true);
|
||||||
mZRotations->read(nif, true);
|
mZRotations->read(nif, true);
|
||||||
}
|
}
|
||||||
mTranslations.reset(new Vector3KeyMap);
|
mTranslations = std::make_shared<Vector3KeyMap>();
|
||||||
mTranslations->read(nif);
|
mTranslations->read(nif);
|
||||||
mScales.reset(new FloatKeyMap);
|
mScales = std::make_shared<FloatKeyMap>();
|
||||||
mScales->read(nif);
|
mScales->read(nif);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue