summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/DriveBlob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DiscIO/DriveBlob.cpp')
-rw-r--r--Source/Core/DiscIO/DriveBlob.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/Core/DiscIO/DriveBlob.cpp b/Source/Core/DiscIO/DriveBlob.cpp
index 07105a9170..efd78db82e 100644
--- a/Source/Core/DiscIO/DriveBlob.cpp
+++ b/Source/Core/DiscIO/DriveBlob.cpp
@@ -4,6 +4,7 @@
#include <cstdio>
#include <cstring>
+#include <memory>
#include <string>
#include "Common/CommonTypes.h"
@@ -84,15 +85,12 @@ DriveReader::~DriveReader()
#endif
}
-DriveReader* DriveReader::Create(const std::string& drive)
+std::unique_ptr<DriveReader> DriveReader::Create(const std::string& drive)
{
- DriveReader* reader = new DriveReader(drive);
+ auto reader = std::unique_ptr<DriveReader>(new DriveReader(drive));
if (!reader->IsOK())
- {
- delete reader;
- return nullptr;
- }
+ reader.reset();
return reader;
}