From 28346e21ce5724fdfc8f4915e977e549010ba2b7 Mon Sep 17 00:00:00 2001 From: Craig Dowell Date: Sun, 13 Sep 2009 15:35:33 -0700 Subject: [PATCH] gcc 3.4 complained about virtual methods without virtual destructor --- src/node/packetbb.cc | 42 +++++++++++++++++++++++++++++++++++++++++- src/node/packetbb.h | 22 ++++++++++++++++++++-- 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/src/node/packetbb.cc b/src/node/packetbb.cc index 4eeb13356..19b6915fa 100644 --- a/src/node/packetbb.cc +++ b/src/node/packetbb.cc @@ -908,7 +908,7 @@ PbbPacket::operator!= (const PbbPacket &other) const /* End PbbPacket class */ -PbbMessage::PbbMessage (void) +PbbMessage::PbbMessage () { m_refCount = 1; /* Default to IPv4 */ @@ -919,6 +919,10 @@ PbbMessage::PbbMessage (void) m_hasSequenceNumber = false; } +PbbMessage::~PbbMessage () +{ +} + void PbbMessage::SetType (uint8_t type) { @@ -1558,6 +1562,14 @@ PbbMessage::operator!= (const PbbMessage &other) const /* End PbbMessage Class */ +PbbMessageIpv4::PbbMessageIpv4 () +{ +} + +PbbMessageIpv4::~PbbMessageIpv4 () +{ +} + PbbAddressLength PbbMessageIpv4::GetAddressLength (void) const { @@ -1596,6 +1608,14 @@ PbbMessageIpv4::AddressBlockDeserialize (Buffer::Iterator &start) const /* End PbbMessageIpv4 Class */ +PbbMessageIpv6::PbbMessageIpv6 () +{ +} + +PbbMessageIpv6::~PbbMessageIpv6 () +{ +} + PbbAddressLength PbbMessageIpv6::GetAddressLength (void) const { @@ -1639,6 +1659,10 @@ PbbAddressBlock::PbbAddressBlock () m_refCount = 1; } +PbbAddressBlock::~PbbAddressBlock () +{ +} + /* Manipulating the address block */ PbbAddressBlock::AddressIterator @@ -2307,6 +2331,14 @@ PbbAddressBlock::HasZeroTail (const uint8_t *tail, uint8_t taillen) const /* End PbbAddressBlock Class */ +PbbAddressBlockIpv4::PbbAddressBlockIpv4 () +{ +} + +PbbAddressBlockIpv4::~PbbAddressBlockIpv4 () +{ +} + uint8_t PbbAddressBlockIpv4::GetAddressLength (void) const { @@ -2333,6 +2365,14 @@ PbbAddressBlockIpv4::PrintAddress (std::ostream &os, ConstAddressIterator iter) /* End PbbAddressBlockIpv4 Class */ +PbbAddressBlockIpv6::PbbAddressBlockIpv6 () +{ +} + +PbbAddressBlockIpv6::~PbbAddressBlockIpv6 () +{ +} + uint8_t PbbAddressBlockIpv6::GetAddressLength (void) const { diff --git a/src/node/packetbb.h b/src/node/packetbb.h index 5802f43af..7cdca5074 100644 --- a/src/node/packetbb.h +++ b/src/node/packetbb.h @@ -655,7 +655,8 @@ public: typedef std::list< Ptr >::iterator AddressBlockIterator; typedef std::list< Ptr >::const_iterator ConstAddressBlockIterator; - PbbMessage (void); + PbbMessage (); + virtual ~PbbMessage (); /** * \brief Sets the type for this message. @@ -1049,6 +1050,10 @@ private: * This message will only contain IPv4 addresses. */ class PbbMessageIpv4 : public PbbMessage { +public: + PbbMessageIpv4 (); + virtual ~PbbMessageIpv4 (); + protected: virtual PbbAddressLength GetAddressLength (void) const; @@ -1065,6 +1070,10 @@ protected: * This message will only contain IPv6 addresses. */ class PbbMessageIpv6 : public PbbMessage { +public: + PbbMessageIpv6 (); + virtual ~PbbMessageIpv6 (); + protected: virtual PbbAddressLength GetAddressLength (void) const; @@ -1093,7 +1102,8 @@ public: typedef PbbAddressTlvBlock::Iterator TlvIterator; typedef PbbAddressTlvBlock::ConstIterator ConstTlvIterator; - PbbAddressBlock (void); + PbbAddressBlock (); + virtual ~PbbAddressBlock (); /* Manipulating the address block */ @@ -1468,6 +1478,10 @@ private: */ class PbbAddressBlockIpv4 : public PbbAddressBlock { +public: + PbbAddressBlockIpv4 (); + virtual ~PbbAddressBlockIpv4 (); + protected: virtual uint8_t GetAddressLength (void) const; @@ -1483,6 +1497,10 @@ protected: */ class PbbAddressBlockIpv6 : public PbbAddressBlock { +public: + PbbAddressBlockIpv6 (); + virtual ~PbbAddressBlockIpv6 (); + protected: virtual uint8_t GetAddressLength (void) const;