summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2015-11-21 21:05:31 -0500
committerLioncash <mathew1800@gmail.com>2015-11-21 21:15:01 -0500
commit35b02db39d845fb8a78920d3929d308592bbd219 (patch)
treeb1896f44cef21fe33096da5e7f3d521008daef71 /Source/Core
parentd42216e929f8b3ea7ec2664ed0deaa230a1614d3 (diff)
ISOFile: Get rid of explicit deletes
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/ISOFile.cpp33
1 files changed, 15 insertions, 18 deletions
diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp
index 8a2edf69cf..58d7b71ad7 100644
--- a/Source/Core/DolphinWX/ISOFile.cpp
+++ b/Source/Core/DolphinWX/ISOFile.cpp
@@ -93,28 +93,26 @@ GameListItem::GameListItem(const std::string& _rFileName, const std::unordered_m
}
else
{
- DiscIO::IVolume* pVolume = DiscIO::CreateVolumeFromFilename(_rFileName);
+ std::unique_ptr<DiscIO::IVolume> volume(DiscIO::CreateVolumeFromFilename(_rFileName));
- if (pVolume != nullptr)
+ if (volume != nullptr)
{
- m_Platform = pVolume->GetVolumeType();
+ m_Platform = volume->GetVolumeType();
- m_names = pVolume->GetNames(true);
- m_descriptions = pVolume->GetDescriptions();
- m_company = pVolume->GetCompany();
+ m_names = volume->GetNames(true);
+ m_descriptions = volume->GetDescriptions();
+ m_company = volume->GetCompany();
- m_Country = pVolume->GetCountry();
- m_blob_type = pVolume->GetBlobType();
- m_FileSize = pVolume->GetRawSize();
- m_VolumeSize = pVolume->GetSize();
+ m_Country = volume->GetCountry();
+ m_blob_type = volume->GetBlobType();
+ m_FileSize = volume->GetRawSize();
+ m_VolumeSize = volume->GetSize();
- m_UniqueID = pVolume->GetUniqueID();
- m_disc_number = pVolume->GetDiscNumber();
- m_Revision = pVolume->GetRevision();
+ m_UniqueID = volume->GetUniqueID();
+ m_disc_number = volume->GetDiscNumber();
+ m_Revision = volume->GetRevision();
- ReadVolumeBanner(*pVolume);
-
- delete pVolume;
+ ReadVolumeBanner(*volume);
m_Valid = true;
SaveToCache();
@@ -330,7 +328,7 @@ std::vector<DiscIO::IVolume::ELanguage> GameListItem::GetLanguages() const
const std::string GameListItem::GetWiiFSPath() const
{
- DiscIO::IVolume *iso = DiscIO::CreateVolumeFromFilename(m_FileName);
+ std::unique_ptr<DiscIO::IVolume> iso(DiscIO::CreateVolumeFromFilename(m_FileName));
std::string ret;
if (iso == nullptr)
@@ -352,7 +350,6 @@ const std::string GameListItem::GetWiiFSPath() const
else
ret = path;
}
- delete iso;
return ret;
}