mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-12 00:23:08 -04:00
optim: changed postfixed ++ into prefix++ for non trivial operators, replaced test on std::list::size() by std::list::empty() (Patch from Phenom, modified)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7627 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
491a655889
commit
b593a918a0
99 changed files with 571 additions and 571 deletions
|
@ -1633,7 +1633,7 @@ bool p3PeerMgrIMPL::loadList(std::list<RsItem *>& load)
|
|||
std::string proxyIpAddress = kConfigDefaultProxyServerIpAddr;
|
||||
uint16_t proxyPort = kConfigDefaultProxyServerPort;
|
||||
|
||||
if (load.size() == 0) {
|
||||
if (load.empty()) {
|
||||
std::cerr << "p3PeerMgrIMPL::loadList() list is empty, it may be a configuration problem." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -487,13 +487,13 @@ int pqihandler::UpdateRates()
|
|||
float crate_in = mod -> pqi -> getRate(true);
|
||||
if (crate_in > 0.01 * avail_in || crate_in > 0.1)
|
||||
{
|
||||
effectiveDownloadsSm ++;
|
||||
++effectiveDownloadsSm;
|
||||
}
|
||||
|
||||
float crate_out = mod -> pqi -> getRate(false);
|
||||
if (crate_out > 0.01 * avail_out || crate_out > 0.1)
|
||||
{
|
||||
effectiveUploadsSm ++;
|
||||
++effectiveUploadsSm;
|
||||
}
|
||||
|
||||
used_bw_in += crate_in;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue