aboutsummaryrefslogtreecommitdiff
path: root/guilib
diff options
context:
space:
mode:
authorCrystalPT <CrystalPT@svn>2010-07-03 04:04:42 +0000
committerCrystalPT <CrystalPT@svn>2010-07-03 04:04:42 +0000
commit465ecc010c8adfa73600cec0a8d1b9b73e6222ea (patch)
treefc97a8ad55c16749310611a85ccd6f0e0ad9a7bf /guilib
parent1c8dbe9f926871c86298782c343f017f3142a5b0 (diff)
reverse 31590: not necessary, CFile cleans up after itself
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31592 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib')
-rw-r--r--guilib/DDSImage.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/guilib/DDSImage.cpp b/guilib/DDSImage.cpp
index 5ff081e807..9163f94d8c 100644
--- a/guilib/DDSImage.cpp
+++ b/guilib/DDSImage.cpp
@@ -97,27 +97,23 @@ bool CDDSImage::ReadFile(const std::string &inputFile)
// read the header
uint32_t magic;
if (file.Read(&magic, 4) != 4)
- goto fail;
+ return false;
if (file.Read(&m_desc, sizeof(m_desc)) != sizeof(m_desc))
- goto fail;
+ return false;
if (!GetFormat())
- goto fail; // not supported
+ return false; // not supported
// allocate our data
m_data = new unsigned char[m_desc.linearSize];
if (!m_data)
- goto fail;
+ return false;
// and read it in
if (file.Read(m_data, m_desc.linearSize) != m_desc.linearSize)
- goto fail;
+ return false;
file.Close();
return true;
-
-fail:
- file.Close();
- return false;
}
bool CDDSImage::Create(const std::string &outputFile, unsigned int width, unsigned int height, unsigned int pitch, unsigned char const *brga, double maxMSE)