From fd94ce5210c9d2299965eee434cde550383681c9 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 11 May 2014 10:37:08 +0200 Subject: [PATCH] fixmeup use --- Source/Core/Core/Boot/Boot_WiiWAD.cpp | 5 +++-- Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp | 5 +++-- Source/Core/Core/PowerPC/Jit64IL/JitIL.cpp | 3 ++- Source/Core/Core/PowerPC/JitILCommon/IR.cpp | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/Boot/Boot_WiiWAD.cpp b/Source/Core/Core/Boot/Boot_WiiWAD.cpp index 03fa4a2548..e1a132a033 100644 --- a/Source/Core/Core/Boot/Boot_WiiWAD.cpp +++ b/Source/Core/Core/Boot/Boot_WiiWAD.cpp @@ -8,6 +8,7 @@ #include "Common/CommonPaths.h" #include "Common/FileUtil.h" #include "Common/NandPaths.h" +#include "Common/StdMakeUnique.h" #include "Core/ConfigManager.h" #include "Core/PatchEngine.h" @@ -98,11 +99,11 @@ bool CBoot::Boot_WiiWAD(const std::string& _pFilename) std::unique_ptr pDolLoader; if (pContent->m_pData) { - pDolLoader.reset(new CDolLoader(pContent->m_pData, pContent->m_Size)); + pDolLoader = std::make_unique(pContent->m_pData, pContent->m_Size); } else { - pDolLoader.reset(new CDolLoader(pContent->m_Filename)); + pDolLoader = std::make_unique(pContent->m_Filename); } pDolLoader->Load(); PC = pDolLoader->GetEntryPoint() | 0x80000000; diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp index 96dc66f03d..c5fd2871eb 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp @@ -42,6 +42,7 @@ #include "Common/CommonPaths.h" #include "Common/FileUtil.h" #include "Common/NandPaths.h" +#include "Common/StdMakeUnique.h" #include "Common/StringUtil.h" #include "Core/ConfigManager.h" @@ -918,11 +919,11 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) std::unique_ptr pDolLoader; if (pContent->m_pData) { - pDolLoader.reset(new CDolLoader(pContent->m_pData, pContent->m_Size)); + pDolLoader = std::make_unique(pContent->m_pData, pContent->m_Size); } else { - pDolLoader.reset(new CDolLoader(pContent->m_Filename)); + pDolLoader = std::make_unique(pContent->m_Filename); } pDolLoader->Load(); // TODO: Check why sysmenu does not load the DOL correctly PC = pDolLoader->GetEntryPoint() | 0x80000000; diff --git a/Source/Core/Core/PowerPC/Jit64IL/JitIL.cpp b/Source/Core/Core/PowerPC/Jit64IL/JitIL.cpp index dc08d07bfa..89c7f7d022 100644 --- a/Source/Core/Core/PowerPC/Jit64IL/JitIL.cpp +++ b/Source/Core/Core/PowerPC/Jit64IL/JitIL.cpp @@ -8,6 +8,7 @@ #include #include "Common/Common.h" +#include "Common/StdMakeUnique.h" #include "Core/PatchEngine.h" #include "Core/HLE/HLE.h" #include "Core/PowerPC/Profiler.h" @@ -223,7 +224,7 @@ namespace JitILProfiler std::unique_ptr finalizer; static void Init() { - finalizer.reset(new JitILProfilerFinalizer()); + finalizer = std::make_unique(); } static void Shutdown() { diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp index 4917cfc6af..3684e4e514 100644 --- a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp +++ b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp @@ -125,6 +125,7 @@ TODO (in no particular order): #include #include +#include "Common/StdMakeUnique.h" #include "Core/Core.h" #include "Core/CoreTiming.h" #include "Core/HW/GPFifo.h" @@ -1280,7 +1281,7 @@ void IRBuilder::WriteToFile(u64 codeHash) { _assert_(sizeof(opcodeNames) / sizeof(opcodeNames[0]) == Int3 + 1); if (!writer.get()) { - writer.reset(new Writer()); + writer = std::make_unique(); } FILE* const file = writer->file.GetHandle();