mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
DiscIO: Make factory methods return unique_ptrs
Rather than rely on the developer to do the right thing, just make the default behavior safely deallocate resources. If shared semantics are ever needed in the future, the constructor that takes a unique_ptr for shared_ptr can be used.
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdio>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
@ -34,7 +35,7 @@ struct CISOHeader
|
||||
class CISOFileReader : public IBlobReader
|
||||
{
|
||||
public:
|
||||
static CISOFileReader* Create(const std::string& filename);
|
||||
static std::unique_ptr<CISOFileReader> Create(const std::string& filename);
|
||||
|
||||
BlobType GetBlobType() const override { return BlobType::CISO; }
|
||||
|
||||
|
Reference in New Issue
Block a user