Mercurial > hg > svcore
diff data/fileio/BZipFileDevice.cpp @ 1582:70e172e6cc59 fix-static-analysis
Use nullptr throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 14:33:41 +0000 |
parents | 48e9f538e6e9 |
children |
line wrap: on
line diff
--- a/data/fileio/BZipFileDevice.cpp Mon Nov 26 13:51:36 2018 +0000 +++ b/data/fileio/BZipFileDevice.cpp Mon Nov 26 14:33:41 2018 +0000 @@ -31,8 +31,8 @@ BZipFileDevice::BZipFileDevice(QString fileName) : m_fileName(fileName), m_qfile(fileName), - m_file(0), - m_bzFile(0), + m_file(nullptr), + m_bzFile(nullptr), m_atEnd(true), m_ok(true) { @@ -120,7 +120,7 @@ if (!m_bzFile) { fclose(m_file); - m_file = 0; + m_file = nullptr; m_qfile.close(); setErrorString(tr("Failed to open bzip2 stream for writing")); m_ok = false; @@ -150,11 +150,11 @@ } int bzError = BZ_OK; - m_bzFile = BZ2_bzReadOpen(&bzError, m_file, 0, 0, NULL, 0); + m_bzFile = BZ2_bzReadOpen(&bzError, m_file, 0, 0, nullptr, 0); if (!m_bzFile) { fclose(m_file); - m_file = 0; + m_file = nullptr; m_qfile.close(); setErrorString(tr("Failed to open bzip2 stream for reading")); m_ok = false; @@ -195,8 +195,8 @@ } fclose(m_file); m_qfile.close(); - m_bzFile = 0; - m_file = 0; + m_bzFile = nullptr; + m_file = nullptr; m_ok = false; return; } @@ -208,8 +208,8 @@ } fclose(m_file); m_qfile.close(); - m_bzFile = 0; - m_file = 0; + m_bzFile = nullptr; + m_file = nullptr; m_ok = false; return; }