Fix CppCheck in rsrttitems.h

/libretroshare/src/rsitems/rsrttitems.h:56: warning:
Cppcheck(uninitMemberVar): Member variable 'RsRttPingItem::mSeqNo' is
not initialized in the constructor.
/libretroshare/src/rsitems/rsrttitems.h:56: warning:
Cppcheck(uninitMemberVar): Member variable 'RsRttPingItem::mPingTS' is
not initialized in the constructor.
/libretroshare/src/rsitems/rsrttitems.h:70: warning:
Cppcheck(uninitMemberVar): Member variable 'RsRttPongItem::mSeqNo' is
not initialized in the constructor.
/libretroshare/src/rsitems/rsrttitems.h:70: warning:
Cppcheck(uninitMemberVar): Member variable 'RsRttPongItem::mPingTS' is
not initialized in the constructor.
/libretroshare/src/rsitems/rsrttitems.h:70: warning:
Cppcheck(uninitMemberVar): Member variable 'RsRttPongItem::mPongTS' is
not initialized in the constructor.
/libretroshare/src/rsitems/rsrttitems.h:46: warning:
Cppcheck(noExplicitConstructor): Class 'RsRttItem' has a constructor
with 1 argument that is not explicit.
This commit is contained in:
Phenom 2017-07-28 09:38:24 +02:00 committed by csoler
parent 7e47be56ea
commit f82ec64d29

View File

@ -43,17 +43,20 @@ const uint8_t RS_PKT_SUBTYPE_RTT_PONG = 0x02;
class RsRttItem: public RsItem
{
public:
RsRttItem(uint8_t subtype) : RsItem(RS_PKT_VERSION_SERVICE,RS_SERVICE_TYPE_RTT,subtype)
{ setPriorityLevel(QOS_PRIORITY_RS_RTT_PING) ;} // should be refined later.
explicit RsRttItem(uint8_t subtype) : RsItem(RS_PKT_VERSION_SERVICE,RS_SERVICE_TYPE_RTT,subtype)
{ setPriorityLevel(QOS_PRIORITY_RS_RTT_PING) ;} // should be refined later.
virtual ~RsRttItem() {};
virtual void clear() {};
virtual ~RsRttItem() {}
virtual void clear() {}
};
class RsRttPingItem: public RsRttItem
{
public:
RsRttPingItem() :RsRttItem(RS_PKT_SUBTYPE_RTT_PING) {}
RsRttPingItem()
: RsRttItem(RS_PKT_SUBTYPE_RTT_PING)
, mSeqNo(0), mPingTS(0)
{}
virtual ~RsRttPingItem(){}
virtual void clear(){}
@ -67,7 +70,10 @@ class RsRttPingItem: public RsRttItem
class RsRttPongItem: public RsRttItem
{
public:
RsRttPongItem() :RsRttItem(RS_PKT_SUBTYPE_RTT_PONG) {}
RsRttPongItem()
: RsRttItem(RS_PKT_SUBTYPE_RTT_PONG)
, mSeqNo(0), mPingTS(0), mPongTS(0)
{}
virtual ~RsRttPongItem(){}
virtual void clear(){}