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:
csoler 2014-10-21 22:33:02 +00:00
parent 491a655889
commit b593a918a0
99 changed files with 571 additions and 571 deletions

View file

@ -914,7 +914,7 @@ bool TcpStream::widle()
return false;
}
if ((lastWriteTF == int_wbytes()) && (inSize + inQueue.size() == 0))
if ((lastWriteTF == int_wbytes()) && (inSize == 0) && inQueue.empty())
{
wcount++;
if (wcount > ilevel)
@ -2438,7 +2438,7 @@ int TcpStream::send()
}
/* if inqueue empty, and enough window space, send partial stuff */
if ((!sent) && (inQueue.size() == 0) && (maxsend >= inSize) && (inSize))
if ((!sent) && (inQueue.empty()) && (maxsend >= inSize) && (inSize))
{
TcpPacket *pkt = new TcpPacket(inData, inSize);
#ifdef DEBUG_TCP_STREAM

View file

@ -480,8 +480,8 @@ int UdpRelayReceiver::installRelayClass_relayLocked(int &classIdx, uint32_t &ban
std::cerr << std::endl;
/* if we get here we can add one */
mClassCount[UDP_RELAY_CLASS_ALL]++;
mClassCount[classIdx]++;
++mClassCount[UDP_RELAY_CLASS_ALL];
++mClassCount[classIdx];
bandwidth = mClassBandwidth[classIdx];
return 1;