summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/voicefile.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/voicefile.cpp
parentf608de723c863abc0e32cd7584c046eceb910d78 (diff)
downloadrockbox-12764781c6053898925484dee07e71a52abc4f26.tar.gz
rockbox-12764781c6053898925484dee07e71a52abc4f26.tar.bz2
rockbox-12764781c6053898925484dee07e71a52abc4f26.zip
rbutil: Modernize code to use C++11 nullptr.
Change-Id: I112cf95122a896cdb30a823b4c1f49831273dc7e
Diffstat (limited to 'rbutil/rbutilqt/base/voicefile.cpp')
-rw-r--r--rbutil/rbutilqt/base/voicefile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/rbutil/rbutilqt/base/voicefile.cpp b/rbutil/rbutilqt/base/voicefile.cpp
index ec9ecbed33..c4edac64b9 100644
--- a/rbutil/rbutilqt/base/voicefile.cpp
+++ b/rbutil/rbutilqt/base/voicefile.cpp
@@ -300,7 +300,7 @@ void VoiceFileCreator::create(void)
//make voicefile
emit logItem(tr("Creating voicefiles..."),LOGINFO);
FILE* ids2 = fopen(m_filename.toLocal8Bit(), "r");
- if (ids2 == NULL)
+ if (ids2 == nullptr)
{
cleanup();
emit logItem(tr("Error opening downloaded file"),LOGERROR);
@@ -310,7 +310,7 @@ void VoiceFileCreator::create(void)
FILE* output = fopen(QString(m_mountpoint + "/.rockbox/langs/" + m_lang
+ ".voice").toLocal8Bit(), "wb");
- if (output == NULL)
+ if (output == nullptr)
{
cleanup();
fclose(ids2);
@@ -327,7 +327,7 @@ void VoiceFileCreator::create(void)
cleanup();
// Add Voice file to the install log
- QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0);
+ QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, nullptr);
installlog.beginGroup(QString("Voice (self created, %1)").arg(m_lang));
installlog.setValue("/.rockbox/langs/" + m_lang + ".voice", m_versionstring);
installlog.endGroup();