mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-19 22:40:36 -04:00
changed post fixed operator++ into prefixed. More efficient on some systems. Patch from Phenom.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7630 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
880efee332
commit
d547cb6fdb
82 changed files with 717 additions and 718 deletions
|
@ -54,7 +54,7 @@ int p3BitDht::getDhtPeers(int lvl, std::list<RsDhtPeer> &peers)
|
|||
std::list<bdPeer>::iterator it;
|
||||
mUdpBitDht->getDhtBucket(lvl, int_peers);
|
||||
|
||||
for(it = int_peers.entries.begin(); it != int_peers.entries.end(); it++)
|
||||
for(it = int_peers.entries.begin(); it != int_peers.entries.end(); ++it)
|
||||
{
|
||||
RsDhtPeer peer;
|
||||
|
||||
|
@ -70,7 +70,7 @@ int p3BitDht::getNetPeerList(std::list<RsPeerId> &peerIds)
|
|||
{
|
||||
RsStackMutex stack(dhtMtx); /*********** LOCKED **********/
|
||||
std::map<bdNodeId, DhtPeerDetails>::iterator it;
|
||||
for(it = mPeers.begin(); it != mPeers.end(); it++)
|
||||
for(it = mPeers.begin(); it != mPeers.end(); ++it)
|
||||
{
|
||||
peerIds.push_back(it->second.mRsId);
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ int p3BitDht::getRelayEnds(std::list<RsDhtRelayEnd> &relayEnds)
|
|||
std::list<UdpRelayEnd>::iterator it;
|
||||
mRelay->getRelayEnds(int_relayEnds);
|
||||
|
||||
for(it = int_relayEnds.begin(); it != int_relayEnds.end(); it++)
|
||||
for(it = int_relayEnds.begin(); it != int_relayEnds.end(); ++it)
|
||||
{
|
||||
RsDhtRelayEnd end;
|
||||
convertUdpRelayEndtoRsDhtRelayEnd(end, *it);
|
||||
|
@ -129,7 +129,7 @@ int p3BitDht::getRelayProxies(std::list<RsDhtRelayProxy> &relayProxies)
|
|||
std::list<UdpRelayProxy>::iterator it;
|
||||
mRelay->getRelayProxies(int_relayProxies);
|
||||
|
||||
for(it = int_relayProxies.begin(); it != int_relayProxies.end(); it++)
|
||||
for(it = int_relayProxies.begin(); it != int_relayProxies.end(); ++it)
|
||||
{
|
||||
RsDhtRelayProxy proxy;
|
||||
convertUdpRelayProxytoRsDhtRelayProxy(proxy, *it);
|
||||
|
|
|
@ -2145,7 +2145,7 @@ void p3BitDht::monitorConnections()
|
|||
|
||||
std::map<bdNodeId, DhtPeerDetails>::iterator it;
|
||||
|
||||
for(it = mPeers.begin(); it != mPeers.end(); it++)
|
||||
for(it = mPeers.begin(); it != mPeers.end(); ++it)
|
||||
{
|
||||
/* ignore ones which aren't friends */
|
||||
if (it->second.mPeerType != RSDHT_PEERTYPE_FRIEND)
|
||||
|
|
|
@ -100,7 +100,7 @@ int p3BitDht::pushRelayServers()
|
|||
}
|
||||
|
||||
std::list<std::string>::iterator it;
|
||||
for(it = servers.begin(); it != servers.end(); it++)
|
||||
for(it = servers.begin(); it != servers.end(); ++it)
|
||||
{
|
||||
/* push it to dht */
|
||||
uint32_t bdflags = BITDHT_PEER_STATUS_DHT_RELAY_SERVER;
|
||||
|
@ -227,7 +227,7 @@ bool p3BitDht::saveList(bool &cleanup, std::list<RsItem *> &saveList)
|
|||
|
||||
/* Push Relay Class Stuff */
|
||||
int i;
|
||||
for(i = 0; i < RSDHT_RELAY_NUM_CLASS; i++)
|
||||
for(i = 0; i < RSDHT_RELAY_NUM_CLASS; ++i)
|
||||
{
|
||||
rs_sprintf(kv.key, "RELAY_CLASS%d_COUNT", i);
|
||||
rs_sprintf(kv.value, "%d", mRelay->getRelayClassMax(i));
|
||||
|
@ -247,7 +247,7 @@ bool p3BitDht::saveList(bool &cleanup, std::list<RsItem *> &saveList)
|
|||
|
||||
/* add Servers */
|
||||
std::list<std::string>::iterator it;
|
||||
for(i = 0, it = mRelayServerList.begin(); it != mRelayServerList.end(); it++, i++)
|
||||
for(i = 0, it = mRelayServerList.begin(); it != mRelayServerList.end(); ++it, ++i)
|
||||
{
|
||||
rs_sprintf(kv.key, "RELAY_SERVER%d", i);
|
||||
kv.value = *it;
|
||||
|
@ -306,7 +306,7 @@ bool p3BitDht::loadList(std::list<RsItem *>& load)
|
|||
int mode = 0;
|
||||
|
||||
std::list<RsTlvKeyValue>::iterator it;
|
||||
for(it = config->tlvkvs.pairs.begin(); it != config->tlvkvs.pairs.end(); it++)
|
||||
for(it = config->tlvkvs.pairs.begin(); it != config->tlvkvs.pairs.end(); ++it)
|
||||
{
|
||||
std::string key = it->key;
|
||||
std::string value = it->value;
|
||||
|
@ -383,7 +383,7 @@ bool p3BitDht::loadList(std::list<RsItem *>& load)
|
|||
}
|
||||
|
||||
int i;
|
||||
for(i = 0; i < RSDHT_RELAY_NUM_CLASS; i++)
|
||||
for(i = 0; i < RSDHT_RELAY_NUM_CLASS; ++i)
|
||||
{
|
||||
mRelay->setRelayClassMax(i, peers[i], bandwidth[i]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue