mtp: Fix deprecation usage since ns-3.37

This commit is contained in:
F5
2023-11-11 21:43:02 +08:00
parent 0d4617a5c6
commit 48577b4659
2 changed files with 4 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ LogicalProcess::CalculateLookAhead()
continue;
}
Ptr<Channel> channel = localNetDevice->GetChannel();
if (channel == 0)
if (!channel)
{
continue;
}
@@ -287,7 +287,7 @@ void
LogicalProcess::SetScheduler(ObjectFactory schedulerFactory)
{
Ptr<Scheduler> scheduler = schedulerFactory.Create<Scheduler>();
if (m_events != 0)
if (m_events)
{
while (!m_events->IsEmpty())
{

View File

@@ -293,7 +293,7 @@ MultithreadedSimulatorImpl::Partition()
{
Ptr<NetDevice> localNetDevice = node->GetDevice(i);
Ptr<Channel> channel = localNetDevice->GetChannel();
if (channel == 0)
if (!channel)
{
continue;
}
@@ -344,7 +344,7 @@ MultithreadedSimulatorImpl::Partition()
{
Ptr<NetDevice> localNetDevice = node->GetDevice(i);
Ptr<Channel> channel = localNetDevice->GetChannel();
if (channel == 0)
if (!channel)
{
continue;
}