mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-28 00:07:09 -05:00
Fix CppCheck in fttransfermodule
/libretroshare/src/ft/fttransfermodule.cc:158: warning: Cppcheck(unreadVariable): Variable 'mit' is assigned a value that is never used. /libretroshare/src/ft/fttransfermodule.h:59: warning: Cppcheck(noExplicitConstructor): Class 'peerInfo' has a constructor with 1 argument that is not explicit. /libretroshare/src/ft/fttransfermodule.h:114: warning: Cppcheck(noExplicitConstructor): Class 'ftFileStatus' has a constructor with 1 argument that is not explicit. /libretroshare/src/ft/fttransfermodule.cc:548: warning: Cppcheck(noExplicitConstructor): Class 'HashThread' has a constructor with 1 argument that is not explicit.
This commit is contained in:
parent
c8548b2a2d
commit
edfd2ad232
@ -155,7 +155,7 @@ bool ftTransferModule::addFileSource(const RsPeerId& peerId)
|
|||||||
/* add in new source */
|
/* add in new source */
|
||||||
peerInfo pInfo(peerId);
|
peerInfo pInfo(peerId);
|
||||||
mFileSources.insert(std::pair<RsPeerId,peerInfo>(peerId,pInfo));
|
mFileSources.insert(std::pair<RsPeerId,peerInfo>(peerId,pInfo));
|
||||||
mit = mFileSources.find(peerId);
|
//mit = mFileSources.find(peerId);
|
||||||
|
|
||||||
mMultiplexor->sendChunkMapRequest(peerId, mHash,false) ;
|
mMultiplexor->sendChunkMapRequest(peerId, mHash,false) ;
|
||||||
#ifdef FT_DEBUG
|
#ifdef FT_DEBUG
|
||||||
@ -545,7 +545,7 @@ bool ftTransferModule::isCheckingHash()
|
|||||||
class HashThread: public RsSingleJobThread
|
class HashThread: public RsSingleJobThread
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HashThread(ftFileCreator *m)
|
explicit HashThread(ftFileCreator *m)
|
||||||
: _hashThreadMtx("HashThread"), _m(m),_finished(false),_hash("") {}
|
: _hashThreadMtx("HashThread"), _m(m),_finished(false),_hash("") {}
|
||||||
|
|
||||||
virtual void run()
|
virtual void run()
|
||||||
|
@ -56,7 +56,7 @@ class HashThread ;
|
|||||||
class peerInfo
|
class peerInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
peerInfo(const RsPeerId& peerId_in):peerId(peerId_in),state(PQIPEER_NOT_ONLINE),desiredRate(0),actualRate(0),
|
explicit peerInfo(const RsPeerId& peerId_in):peerId(peerId_in),state(PQIPEER_NOT_ONLINE),desiredRate(0),actualRate(0),
|
||||||
lastTS(0),
|
lastTS(0),
|
||||||
recvTS(0), lastTransfers(0), nResets(0),
|
recvTS(0), lastTransfers(0), nResets(0),
|
||||||
rtt(0), rttActive(false), rttStart(0), rttOffset(0),
|
rtt(0), rttActive(false), rttStart(0), rttOffset(0),
|
||||||
@ -111,7 +111,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
ftFileStatus():hash(""),stat(PQIFILE_INIT) {}
|
ftFileStatus():hash(""),stat(PQIFILE_INIT) {}
|
||||||
ftFileStatus(const RsFileHash& hash_in):hash(hash_in),stat(PQIFILE_INIT) {}
|
explicit ftFileStatus(const RsFileHash& hash_in):hash(hash_in),stat(PQIFILE_INIT) {}
|
||||||
|
|
||||||
RsFileHash hash;
|
RsFileHash hash;
|
||||||
Status stat;
|
Status stat;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user