From 48577b46592d8e560110d7fac7c2577db5506aeb Mon Sep 17 00:00:00 2001 From: F5 Date: Sat, 11 Nov 2023 21:43:02 +0800 Subject: [PATCH] mtp: Fix deprecation usage since ns-3.37 --- src/mtp/model/logical-process.cc | 4 ++-- src/mtp/model/multithreaded-simulator-impl.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mtp/model/logical-process.cc b/src/mtp/model/logical-process.cc index 8b19193c4..6a128bdae 100644 --- a/src/mtp/model/logical-process.cc +++ b/src/mtp/model/logical-process.cc @@ -87,7 +87,7 @@ LogicalProcess::CalculateLookAhead() continue; } Ptr channel = localNetDevice->GetChannel(); - if (channel == 0) + if (!channel) { continue; } @@ -287,7 +287,7 @@ void LogicalProcess::SetScheduler(ObjectFactory schedulerFactory) { Ptr scheduler = schedulerFactory.Create(); - if (m_events != 0) + if (m_events) { while (!m_events->IsEmpty()) { diff --git a/src/mtp/model/multithreaded-simulator-impl.cc b/src/mtp/model/multithreaded-simulator-impl.cc index c7164fac1..0c9954964 100644 --- a/src/mtp/model/multithreaded-simulator-impl.cc +++ b/src/mtp/model/multithreaded-simulator-impl.cc @@ -293,7 +293,7 @@ MultithreadedSimulatorImpl::Partition() { Ptr localNetDevice = node->GetDevice(i); Ptr channel = localNetDevice->GetChannel(); - if (channel == 0) + if (!channel) { continue; } @@ -344,7 +344,7 @@ MultithreadedSimulatorImpl::Partition() { Ptr localNetDevice = node->GetDevice(i); Ptr channel = localNetDevice->GetChannel(); - if (channel == 0) + if (!channel) { continue; }