ip: remove unneeded assignment operator

the constructor handles this for us
This commit is contained in:
Danny Robson 2016-05-12 17:54:17 +10:00
parent 5e597eef25
commit 7f19e2bcce
2 changed files with 1 additions and 15 deletions

View File

@ -54,19 +54,6 @@ ipv4::ip::ip (uint8_t a, uint8_t b, uint8_t c, uint8_t d)
///////////////////////////////////////////////////////////////////////////////
ipv4::ip&
ipv4::ip::operator= (const ipv4::ip &rhs)
{
m_octets[0] = rhs.m_octets[0];
m_octets[1] = rhs.m_octets[1];
m_octets[2] = rhs.m_octets[2];
m_octets[3] = rhs.m_octets[3];
return *this;
}
//-----------------------------------------------------------------------------
bool
ipv4::ip::operator== (const ipv4::ip &rhs) const
{

3
ip.hpp
View File

@ -34,8 +34,7 @@ namespace ipv4 {
explicit ip (uint32_t i);
ip (uint8_t a, uint8_t b, uint8_t c, uint8_t d);
ip& operator = (const ip &);
bool operator == (const ip &) const;
bool operator== (const ip &) const;
explicit operator uint32_t (void);