summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/mspackutil.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-19 20:36:57 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-19 21:32:41 +0100
commit12764781c6053898925484dee07e71a52abc4f26 (patch)
tree3f89294c8053770ac4e1e4769bfd28a234554ee6 /rbutil/rbutilqt/base/mspackutil.cpp
parentf608de723c863abc0e32cd7584c046eceb910d78 (diff)
downloadrockbox-12764781c6.tar.gz
rockbox-12764781c6.tar.bz2
rockbox-12764781c6.zip
rbutil: Modernize code to use C++11 nullptr.
Change-Id: I112cf95122a896cdb30a823b4c1f49831273dc7e
Diffstat (limited to 'rbutil/rbutilqt/base/mspackutil.cpp')
-rw-r--r--rbutil/rbutilqt/base/mspackutil.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/rbutil/rbutilqt/base/mspackutil.cpp b/rbutil/rbutilqt/base/mspackutil.cpp
index 1ee250cd6d..b794272199 100644
--- a/rbutil/rbutilqt/base/mspackutil.cpp
+++ b/rbutil/rbutilqt/base/mspackutil.cpp
@@ -24,8 +24,8 @@
MsPackUtil::MsPackUtil(QObject* parent)
:ArchiveUtil(parent)
{
- m_cabd = mspack_create_cab_decompressor(NULL);
- m_cabinet = NULL;
+ m_cabd = mspack_create_cab_decompressor(nullptr);
+ m_cabinet = nullptr;
if(!m_cabd)
LOG_ERROR() << "CAB decompressor creation failed!";
}
@@ -41,20 +41,20 @@ bool MsPackUtil::open(QString& mspackfile)
{
close();
- if(m_cabd == NULL)
+ if(m_cabd == nullptr)
{
LOG_ERROR() << "No CAB decompressor available: cannot open file!";
return false;
}
m_cabinet = m_cabd->search(m_cabd, QFile::encodeName(mspackfile).constData());
- return m_cabinet != NULL;
+ return m_cabinet != nullptr;
}
bool MsPackUtil::close(void)
{
if(m_cabd && m_cabinet)
m_cabd->close(m_cabd, m_cabinet);
- m_cabinet = NULL;
+ m_cabinet = nullptr;
return true;
}
@@ -76,7 +76,7 @@ bool MsPackUtil::extractArchive(const QString& dest, QString file)
else if(!file.isEmpty())
singleoutfile = dest;
struct mscabd_file *f = m_cabinet->files;
- if(f == NULL)
+ if(f == nullptr)
{
LOG_WARNING() << "CAB doesn't contain file" << file;
return true;