Merge pull request #1554 from lioncash/unique
ISOFile: Get rid of a delete call
This commit is contained in:
commit
5d2ca2dfcc
|
@ -5,6 +5,7 @@
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <wx/bitmap.h>
|
#include <wx/bitmap.h>
|
||||||
|
@ -80,11 +81,9 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
||||||
|
|
||||||
if (pFileSystem != nullptr || m_Platform == WII_WAD)
|
if (pFileSystem != nullptr || m_Platform == WII_WAD)
|
||||||
{
|
{
|
||||||
DiscIO::IBannerLoader* pBannerLoader = DiscIO::CreateBannerLoader(*pFileSystem, pVolume);
|
std::unique_ptr<DiscIO::IBannerLoader> pBannerLoader(DiscIO::CreateBannerLoader(*pFileSystem, pVolume));
|
||||||
|
|
||||||
if (pBannerLoader != nullptr)
|
if (pBannerLoader != nullptr && pBannerLoader->IsValid())
|
||||||
{
|
|
||||||
if (pBannerLoader->IsValid())
|
|
||||||
{
|
{
|
||||||
if (m_Platform != WII_WAD)
|
if (m_Platform != WII_WAD)
|
||||||
m_banner_names = pBannerLoader->GetNames();
|
m_banner_names = pBannerLoader->GetNames();
|
||||||
|
@ -103,8 +102,6 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
||||||
m_pImage[i * 3 + 2] = (pData[i] & 0x0000FF) >> 0;
|
m_pImage[i * 3 + 2] = (pData[i] & 0x0000FF) >> 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete pBannerLoader;
|
|
||||||
}
|
|
||||||
|
|
||||||
delete pFileSystem;
|
delete pFileSystem;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue