diff --git a/Source/Core/Core/PowerPC/Jit64IL/JitIL.cpp b/Source/Core/Core/PowerPC/Jit64IL/JitIL.cpp index b686cbc514..dc08d07bfa 100644 --- a/Source/Core/Core/PowerPC/Jit64IL/JitIL.cpp +++ b/Source/Core/Core/PowerPC/Jit64IL/JitIL.cpp @@ -223,7 +223,7 @@ namespace JitILProfiler std::unique_ptr finalizer; static void Init() { - finalizer = std::unique_ptr(new JitILProfilerFinalizer); + finalizer.reset(new JitILProfilerFinalizer()); } static void Shutdown() { diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp index 90f3118cab..4917cfc6af 100644 --- a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp +++ b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp @@ -1280,7 +1280,7 @@ void IRBuilder::WriteToFile(u64 codeHash) { _assert_(sizeof(opcodeNames) / sizeof(opcodeNames[0]) == Int3 + 1); if (!writer.get()) { - writer = std::unique_ptr(new Writer); + writer.reset(new Writer()); } FILE* const file = writer->file.GetHandle(); diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp index a193e19447..5bfec7d936 100644 --- a/Source/Core/DolphinWX/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/GameListCtrl.cpp @@ -44,6 +44,7 @@ #include "Common/FileSearch.h" #include "Common/FileUtil.h" #include "Common/MathUtil.h" +#include "Common/StdMakeUnique.h" #include "Common/StringUtil.h" #include "Common/SysConf.h" #include "Core/ConfigManager.h" @@ -555,14 +556,13 @@ void CGameListCtrl::ScanForISOs() if (dialog.WasCancelled()) break; - std::unique_ptr iso_file(new GameListItem(rFilenames[i])); - const GameListItem& ISOFile = *iso_file; + auto iso_file = std::make_unique(rFilenames[i]); - if (ISOFile.IsValid()) + if (iso_file->IsValid()) { bool list = true; - switch (ISOFile.GetPlatform()) + switch(iso_file->GetPlatform()) { case GameListItem::WII_DISC: if (!SConfig::GetInstance().m_ListWii) @@ -578,7 +578,7 @@ void CGameListCtrl::ScanForISOs() break; } - switch (ISOFile.GetCountry()) + switch(iso_file->GetCountry()) { case DiscIO::IVolume::COUNTRY_TAIWAN: if (!SConfig::GetInstance().m_ListTaiwan) @@ -621,7 +621,7 @@ void CGameListCtrl::ScanForISOs() for (const auto& drive : drives) { - std::unique_ptr gli(new GameListItem(drive)); + auto gli = std::make_unique(drive); if (gli->IsValid()) m_ISOFiles.push_back(gli.release());