mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 03:15:32 +00:00
make use of std::make_unique to test that MSVC2015 can handle that
This commit is contained in:
parent
df9a8cf957
commit
2ab7f903d7
3 changed files with 3 additions and 4 deletions
|
@ -261,7 +261,7 @@ const MWMechanics::PathgridGraph& MWMechanics::AiPackage::getPathGridGraph(const
|
|||
CacheMap::iterator found = cache.find(id);
|
||||
if (found == cache.end())
|
||||
{
|
||||
cache.insert(std::make_pair(id, std::unique_ptr<MWMechanics::PathgridGraph>(new MWMechanics::PathgridGraph(cell))));
|
||||
cache.insert(std::make_pair(id, std::make_unique<MWMechanics::PathgridGraph>(MWMechanics::PathgridGraph(cell))));
|
||||
}
|
||||
return *cache[id].get();
|
||||
}
|
||||
|
|
|
@ -92,7 +92,6 @@ osg::ref_ptr<Resource::BulletShape> BulletNifLoader::load(const Nif::File& nif)
|
|||
if (findBoundingBox(node))
|
||||
{
|
||||
std::unique_ptr<btCompoundShape> compound (new btCompoundShape);
|
||||
|
||||
std::unique_ptr<btBoxShape> boxShape(new btBoxShape(getbtVector(mShape->mCollisionBoxHalfExtents)));
|
||||
btTransform transform = btTransform::getIdentity();
|
||||
transform.setOrigin(getbtVector(mShape->mCollisionBoxTranslate));
|
||||
|
|
|
@ -10,10 +10,10 @@ BsaArchive::BsaArchive(const std::string &filename)
|
|||
Bsa::BsaVersion bsaVersion = Bsa::CompressedBSAFile::detectVersion(filename);
|
||||
|
||||
if (bsaVersion == Bsa::BSAVER_COMPRESSED) {
|
||||
mFile = std::unique_ptr<Bsa::CompressedBSAFile>(new Bsa::CompressedBSAFile());
|
||||
mFile = std::make_unique<Bsa::CompressedBSAFile>(Bsa::CompressedBSAFile());
|
||||
}
|
||||
else {
|
||||
mFile = std::unique_ptr<Bsa::BSAFile>(new Bsa::BSAFile());
|
||||
mFile = std::make_unique<Bsa::BSAFile>(Bsa::BSAFile());
|
||||
}
|
||||
|
||||
mFile->open(filename);
|
||||
|
|
Loading…
Reference in a new issue