mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Use unique_ptr for some IVolume instances
This commit is contained in:
@ -299,7 +299,7 @@ QString GameFile::GetName(int index) const
|
||||
|
||||
const QString GameFile::GetWiiFSPath() const
|
||||
{
|
||||
DiscIO::IVolume* volume = DiscIO::CreateVolumeFromFilename(m_file_name.toStdString());
|
||||
std::unique_ptr<DiscIO::IVolume> volume(DiscIO::CreateVolumeFromFilename(m_file_name.toStdString()));
|
||||
QString ret;
|
||||
|
||||
if (volume == nullptr)
|
||||
@ -323,7 +323,6 @@ const QString GameFile::GetWiiFSPath() const
|
||||
else
|
||||
ret = QString::fromStdString(path);
|
||||
}
|
||||
delete volume;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user