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 <cstdio>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <wx/bitmap.h>
|
||||
|
@ -80,11 +81,9 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
|||
|
||||
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->IsValid())
|
||||
if (pBannerLoader != nullptr && pBannerLoader->IsValid())
|
||||
{
|
||||
if (m_Platform != WII_WAD)
|
||||
m_banner_names = pBannerLoader->GetNames();
|
||||
|
@ -103,8 +102,6 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
|||
m_pImage[i * 3 + 2] = (pData[i] & 0x0000FF) >> 0;
|
||||
}
|
||||
}
|
||||
delete pBannerLoader;
|
||||
}
|
||||
|
||||
delete pFileSystem;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue