Virtual destructor for QAMQP::Frame::Base
To solve the GCC warning: deleting object of polymorphic class type ‘QAMQP::Frame::Method’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
This commit is contained in:
parent
e2c77e13d8
commit
4d02fe7383
|
|
@ -19,6 +19,9 @@ Type Base::type() const
|
||||||
return Type(type_);
|
return Type(type_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Base::~Base()
|
||||||
|
{}
|
||||||
|
|
||||||
void Base::setChannel( qint16 channel )
|
void Base::setChannel( qint16 channel )
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
|
|
@ -343,7 +346,7 @@ void QAMQP::Frame::writeField( qint8 valueType, QDataStream &s, const QVariant &
|
||||||
{
|
{
|
||||||
QByteArray tmp;
|
QByteArray tmp;
|
||||||
if(withType)
|
if(withType)
|
||||||
s << valueType; // Запишем тип поля
|
s << valueType;
|
||||||
|
|
||||||
switch(valueType)
|
switch(valueType)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,11 @@ namespace QAMQP
|
||||||
*/
|
*/
|
||||||
Base(QDataStream& raw);
|
Base(QDataStream& raw);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Base class virtual destructor
|
||||||
|
*/
|
||||||
|
virtual ~Base();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Frame type
|
Frame type
|
||||||
@detailed Return type of current frame.
|
@detailed Return type of current frame.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue