Fix clang-tidy modernize-use-nullptr warnings

This commit is contained in:
Eduardo Almeida
2022-10-06 21:45:05 +00:00
parent be07b6487a
commit 4af0fe4b85
469 changed files with 1864 additions and 1864 deletions

View File

@@ -77,7 +77,7 @@ Sender::Sender()
{
NS_LOG_FUNCTION_NOARGS ();
m_interval = CreateObject<ConstantRandomVariable> ();
m_socket = 0;
m_socket = nullptr;
}
Sender::~Sender()
@@ -90,7 +90,7 @@ Sender::DoDispose ()
{
NS_LOG_FUNCTION_NOARGS ();
m_socket = 0;
m_socket = nullptr;
// chain up
Application::DoDispose ();
}
@@ -169,11 +169,11 @@ Receiver::GetTypeId ()
}
Receiver::Receiver() :
m_calc (0),
m_delay (0)
m_calc (nullptr),
m_delay (nullptr)
{
NS_LOG_FUNCTION_NOARGS ();
m_socket = 0;
m_socket = nullptr;
}
Receiver::~Receiver()
@@ -186,7 +186,7 @@ Receiver::DoDispose ()
{
NS_LOG_FUNCTION_NOARGS ();
m_socket = 0;
m_socket = nullptr;
// chain up
Application::DoDispose ();
}

View File

@@ -75,7 +75,7 @@ int main (int argc, char *argv[]) {
{
std::stringstream sstr;
sstr << "run-" << time (NULL);
sstr << "run-" << time (nullptr);
runID = sstr.str ();
}
@@ -299,7 +299,7 @@ int main (int argc, char *argv[]) {
//--------------------------------------------
// Pick an output writer based in the requested format.
Ptr<DataOutputInterface> output = 0;
Ptr<DataOutputInterface> output = nullptr;
if (format == "omnet") {
NS_LOG_INFO ("Creating omnet formatted data output.");
output = CreateObject<OmnetDataOutput>();