summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-19 08:46:17 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-19 08:46:17 +0000
commit8e4b5230e3d00697daae08e5685479b9fbd55f09 (patch)
tree46ab464c45f695576e75b769f10834657e0d75a3
parent2f6276a2bb91652d2d481dcb8ffa9e5455470d47 (diff)
More stuff changed to const ref
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5502 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_spanningtree.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 43d397ca7..e651d55c9 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -175,16 +175,16 @@ class SpanningTreeUtilities
void GetListOfServersForChannel(chanrec* c, std::deque<TreeServer*> &list);
/** Find a server by name
*/
- TreeServer* FindServer(std::string ServerName);
+ TreeServer* FindServer(const std::string &ServerName);
/** Find a route to a server by name
*/
- TreeServer* BestRouteTo(std::string ServerName);
+ TreeServer* BestRouteTo(const std::string &ServerName);
/** Find a server by glob mask
*/
- TreeServer* FindServerMask(std::string ServerName);
+ TreeServer* FindServerMask(const std::string &ServerName);
/** Returns true if this is a server name we recognise
*/
- bool IsServer(std::string ServerName);
+ bool IsServer(const std::string &ServerName);
/** Attempt to connect to the failover link of link x
*/
void DoFailOver(Link* x);
@@ -519,7 +519,7 @@ class TreeServer : public classbase
* there are more than a few servers to deal with.
* (read as: lots).
*/
-TreeServer* SpanningTreeUtilities::FindServer(std::string ServerName)
+TreeServer* SpanningTreeUtilities::FindServer(const std::string &ServerName)
{
server_hash::iterator iter;
iter = serverlist.find(ServerName.c_str());
@@ -539,7 +539,7 @@ TreeServer* SpanningTreeUtilities::FindServer(std::string ServerName)
* See the comments for the constructor of TreeServer
* for more details.
*/
-TreeServer* SpanningTreeUtilities::BestRouteTo(std::string ServerName)
+TreeServer* SpanningTreeUtilities::BestRouteTo(const std::string &ServerName)
{
if (ServerName.c_str() == TreeRoot->GetName())
return NULL;
@@ -560,7 +560,7 @@ TreeServer* SpanningTreeUtilities::BestRouteTo(std::string ServerName)
* and match each one until we get a hit. Yes its slow,
* deal with it.
*/
-TreeServer* SpanningTreeUtilities::FindServerMask(std::string ServerName)
+TreeServer* SpanningTreeUtilities::FindServerMask(const std::string &ServerName)
{
for (server_hash::iterator i = serverlist.begin(); i != serverlist.end(); i++)
{
@@ -571,7 +571,7 @@ TreeServer* SpanningTreeUtilities::FindServerMask(std::string ServerName)
}
/* A convenient wrapper that returns true if a server exists */
-bool SpanningTreeUtilities::IsServer(std::string ServerName)
+bool SpanningTreeUtilities::IsServer(const std::string &ServerName)
{
return (FindServer(ServerName) != NULL);
}