mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix CppCheck in p3turtle.cc
/libretroshare/src/turtle/p3turtle.cc:1450: warning: Cppcheck(unusedVariable): Unused variable: info /libretroshare/src/turtle/p3turtle.cc:1875: warning: Cppcheck(redundantIfRemove): Redundant checking of STL container element existence before removing it.
This commit is contained in:
parent
2728880621
commit
2933861691
@ -1447,7 +1447,7 @@ void p3turtle::handleTunnelRequest(RsTurtleOpenTunnelItem *item)
|
||||
// We're off-mutex here.
|
||||
|
||||
bool found = false ;
|
||||
std::string info ;
|
||||
//std::string info ;
|
||||
RsTurtleClientService *service = NULL ;
|
||||
|
||||
if(item->PeerId() != _own_id)
|
||||
@ -1872,9 +1872,8 @@ void p3turtle::monitorTunnels(const RsFileHash& hash,RsTurtleClientService *clie
|
||||
|
||||
// First, check if the hash is tagged for removal (there's a delay)
|
||||
|
||||
if(_hashes_to_remove.find(hash) != _hashes_to_remove.end())
|
||||
if(_hashes_to_remove.erase(hash) > 0)
|
||||
{
|
||||
_hashes_to_remove.erase(hash) ;
|
||||
#ifdef P3TURTLE_DEBUG
|
||||
std::cerr << "p3turtle: File hash " << hash << " Was scheduled for removal. Canceling the removal." << std::endl ;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user