diff --git a/apps/openmw/mwmechanics/aipackage.cpp b/apps/openmw/mwmechanics/aipackage.cpp index 90da9d160..c9a371749 100644 --- a/apps/openmw/mwmechanics/aipackage.cpp +++ b/apps/openmw/mwmechanics/aipackage.cpp @@ -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(new MWMechanics::PathgridGraph(cell)))); + cache.insert(std::make_pair(id, std::make_unique(MWMechanics::PathgridGraph(cell)))); } return *cache[id].get(); } diff --git a/components/nifbullet/bulletnifloader.cpp b/components/nifbullet/bulletnifloader.cpp index 72933fc32..1bc8d1c5f 100644 --- a/components/nifbullet/bulletnifloader.cpp +++ b/components/nifbullet/bulletnifloader.cpp @@ -92,7 +92,6 @@ osg::ref_ptr BulletNifLoader::load(const Nif::File& nif) if (findBoundingBox(node)) { std::unique_ptr compound (new btCompoundShape); - std::unique_ptr boxShape(new btBoxShape(getbtVector(mShape->mCollisionBoxHalfExtents))); btTransform transform = btTransform::getIdentity(); transform.setOrigin(getbtVector(mShape->mCollisionBoxTranslate)); diff --git a/components/vfs/bsaarchive.cpp b/components/vfs/bsaarchive.cpp index 925c1076e..9646b62af 100644 --- a/components/vfs/bsaarchive.cpp +++ b/components/vfs/bsaarchive.cpp @@ -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(new Bsa::CompressedBSAFile()); + mFile = std::make_unique(Bsa::CompressedBSAFile()); } else { - mFile = std::unique_ptr(new Bsa::BSAFile()); + mFile = std::make_unique(Bsa::BSAFile()); } mFile->open(filename);