DSPEmulator: Make CreateDSPEmulator return a unique_ptr

This commit is contained in:
Lioncash
2016-01-17 22:33:21 -05:00
parent 24c228c6e9
commit 2ff5923334
3 changed files with 15 additions and 14 deletions

View File

@ -2,15 +2,16 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "Core/DSPEmulator.h"
#include <memory>
#include "Core/DSPEmulator.h"
#include "Core/HW/DSPHLE/DSPHLE.h"
#include "Core/HW/DSPLLE/DSPLLE.h"
DSPEmulator *CreateDSPEmulator(bool HLE)
std::unique_ptr<DSPEmulator> CreateDSPEmulator(bool hle)
{
if (HLE)
return new DSPHLE();
else
return new DSPLLE();
if (hle)
return std::make_unique<DSPHLE>();
return std::make_unique<DSPLLE>();
}