From 8e4b5230e3d00697daae08e5685479b9fbd55f09 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 19 Oct 2006 08:46:17 +0000 Subject: More stuff changed to const ref git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5502 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 16 ++++++++-------- 1 file 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 &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); } -- cgit v1.2.3