Some const-correctness.

const SLE::pointer & -> SLE::ref
This commit is contained in:
JoelKatz
2012-08-31 18:26:45 -07:00
parent 9ef0a5491b
commit 02bd898e51
16 changed files with 74 additions and 72 deletions

View File

@@ -340,7 +340,7 @@ std::vector<Peer::pointer> ConnectionPool::getPeerVector()
// Now know peer's node public key. Determine if we want to stay connected.
// <-- bNew: false = redundant
bool ConnectionPool::peerConnected(const Peer::pointer& peer, const NewcoinAddress& naPeer,
bool ConnectionPool::peerConnected(Peer::ref peer, const NewcoinAddress& naPeer,
const std::string& strIP, int iPort)
{
bool bNew = false;
@@ -399,7 +399,7 @@ bool ConnectionPool::peerConnected(const Peer::pointer& peer, const NewcoinAddre
}
// We maintain a map of public key to peer for connected and verified peers. Maintain it.
void ConnectionPool::peerDisconnected(const Peer::pointer& peer, const NewcoinAddress& naPeer)
void ConnectionPool::peerDisconnected(Peer::ref peer, const NewcoinAddress& naPeer)
{
if (naPeer.isValid())
{
@@ -486,7 +486,7 @@ bool ConnectionPool::peerScanSet(const std::string& strIp, int iPort)
}
// --> strIp: not empty
void ConnectionPool::peerClosed(const Peer::pointer& peer, const std::string& strIp, int iPort)
void ConnectionPool::peerClosed(Peer::ref peer, const std::string& strIp, int iPort)
{
ipPort ipPeer = make_pair(strIp, iPort);
bool bScanRefresh = false;
@@ -541,7 +541,7 @@ void ConnectionPool::peerClosed(const Peer::pointer& peer, const std::string& st
scanRefresh();
}
void ConnectionPool::peerVerified(const Peer::pointer& peer)
void ConnectionPool::peerVerified(Peer::ref peer)
{
if (mScanning && mScanning == peer)
{