core, dsr: Fix clang-tidy warnings
This commit is contained in:
@@ -307,7 +307,7 @@ NamesPriv::Clear()
|
||||
++i)
|
||||
{
|
||||
delete i->second;
|
||||
i->second = 0;
|
||||
i->second = nullptr;
|
||||
}
|
||||
|
||||
m_objectMap.clear();
|
||||
|
||||
@@ -417,14 +417,11 @@ DsrOptionRreqHeader::Deserialize(Buffer::Iterator start)
|
||||
m_identification = i.ReadNtohU16();
|
||||
ReadFrom(i, m_target);
|
||||
|
||||
uint8_t index = 0;
|
||||
for (std::vector<Ipv4Address>::iterator it = m_ipv4Address.begin(); it != m_ipv4Address.end();
|
||||
it++)
|
||||
for (std::size_t index = 0; index < m_ipv4Address.size(); index++)
|
||||
{
|
||||
i.Read(buff, 4);
|
||||
m_address = it->Deserialize(buff);
|
||||
SetNodeAddress(index, m_address);
|
||||
++index;
|
||||
m_address = Ipv4Address::Deserialize(buff);
|
||||
SetNodeAddress(static_cast<uint8_t>(index), m_address);
|
||||
}
|
||||
|
||||
return GetSerializedSize();
|
||||
@@ -555,14 +552,11 @@ DsrOptionRrepHeader::Deserialize(Buffer::Iterator start)
|
||||
i.ReadU8();
|
||||
i.ReadU8();
|
||||
|
||||
uint8_t index = 0;
|
||||
for (std::vector<Ipv4Address>::iterator it = m_ipv4Address.begin(); it != m_ipv4Address.end();
|
||||
it++)
|
||||
for (std::size_t index = 0; index < m_ipv4Address.size(); index++)
|
||||
{
|
||||
i.Read(buff, 4);
|
||||
m_address = it->Deserialize(buff);
|
||||
SetNodeAddress(index, m_address);
|
||||
++index;
|
||||
m_address = Ipv4Address::Deserialize(buff);
|
||||
SetNodeAddress(static_cast<uint8_t>(index), m_address);
|
||||
}
|
||||
|
||||
return GetSerializedSize();
|
||||
@@ -718,14 +712,11 @@ DsrOptionSRHeader::Deserialize(Buffer::Iterator start)
|
||||
m_salvage = i.ReadU8();
|
||||
m_segmentsLeft = i.ReadU8();
|
||||
|
||||
uint8_t index = 0;
|
||||
for (std::vector<Ipv4Address>::iterator it = m_ipv4Address.begin(); it != m_ipv4Address.end();
|
||||
it++)
|
||||
for (std::size_t index = 0; index < m_ipv4Address.size(); index++)
|
||||
{
|
||||
i.Read(buff, 4);
|
||||
m_address = it->Deserialize(buff);
|
||||
SetNodeAddress(index, m_address);
|
||||
++index;
|
||||
m_address = Ipv4Address::Deserialize(buff);
|
||||
SetNodeAddress(static_cast<uint8_t>(index), m_address);
|
||||
}
|
||||
|
||||
return GetSerializedSize();
|
||||
|
||||
Reference in New Issue
Block a user