mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 15:09:23 +08:00
Convert to C++ nullptr from NULL.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020,2021 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2020,2021,2025 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -39,11 +39,11 @@ m_preEmphasisOn(preEmphasisOn),
|
||||
m_deEmphasisOn(deEmphasisOn),
|
||||
m_enabled(false),
|
||||
m_incomingRFAudio(1600U, "Incoming RF FM Audio"),
|
||||
m_preEmphasis(NULL),
|
||||
m_deEmphasis(NULL),
|
||||
m_filterStage1(NULL),
|
||||
m_filterStage2(NULL),
|
||||
m_filterStage3(NULL)
|
||||
m_preEmphasis(nullptr),
|
||||
m_deEmphasis(nullptr),
|
||||
m_filterStage1(nullptr),
|
||||
m_filterStage2(nullptr),
|
||||
m_filterStage3(nullptr)
|
||||
{
|
||||
assert(txAudioGain > 0.0F);
|
||||
assert(rxAudioGain > 0.0F);
|
||||
@@ -69,10 +69,10 @@ CFMControl::~CFMControl()
|
||||
|
||||
bool CFMControl::writeModem(const unsigned char* data, unsigned int length)
|
||||
{
|
||||
assert(data != NULL);
|
||||
assert(data != nullptr);
|
||||
assert(length > 0U);
|
||||
|
||||
if (m_network == NULL)
|
||||
if (m_network == nullptr)
|
||||
return true;
|
||||
|
||||
if (data[0U] == TAG_HEADER)
|
||||
@@ -124,7 +124,7 @@ bool CFMControl::writeModem(const unsigned char* data, unsigned int length)
|
||||
|
||||
#if defined(DUMP_RF_AUDIO)
|
||||
FILE * audiofile = fopen("./audiodump.bin", "ab");
|
||||
if (audiofile != NULL) {
|
||||
if (audiofile != nullptr) {
|
||||
fwrite(out, sizeof(float), nOut, audiofile);
|
||||
fclose(audiofile);
|
||||
}
|
||||
@@ -137,10 +137,10 @@ bool CFMControl::writeModem(const unsigned char* data, unsigned int length)
|
||||
|
||||
unsigned int CFMControl::readModem(unsigned char* data, unsigned int space)
|
||||
{
|
||||
assert(data != NULL);
|
||||
assert(data != nullptr);
|
||||
assert(space > 0U);
|
||||
|
||||
if (m_network == NULL)
|
||||
if (m_network == nullptr)
|
||||
return 0U;
|
||||
|
||||
if (space > 240U) // 160 samples 12-bit
|
||||
|
||||
Reference in New Issue
Block a user