From c120a4e37f8d13f0e2540e2534bd7cc36e1f1950 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Mon, 12 Apr 2010 18:22:44 -0500 Subject: Make irc::string faster and less wasteful Change irc::string from an std::basic_string typedef to a wrapper around an std::string, to avoid unneeded copies in assign(). --- src/modules/m_spanningtree/utils.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules/m_spanningtree/utils.cpp') diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 444fd4825..1cdfa3015 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -387,10 +387,10 @@ void SpanningTreeUtilities::ReadConfiguration() L->Hidden = tag->getBool("hidden"); if (L->Name.find('.') == std::string::npos) - throw CoreException("The link name '"+assign(L->Name)+"' is invalid and must contain at least one '.' character"); + throw CoreException("The link name '"+L->Name+"' is invalid and must contain at least one '.' character"); if (L->Name.length() > 64) - throw CoreException("The link name '"+assign(L->Name)+"' is longer than 64 characters!"); + throw CoreException("The link name '"+L->Name+"' is longer than 64 characters!"); if (L->Fingerprint.find(':') != std::string::npos) { @@ -411,17 +411,17 @@ void SpanningTreeUtilities::ReadConfiguration() { L->IPAddr = "*"; ValidIPs.push_back("*"); - ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Configuration warning: Link block " + assign(L->Name) + " has no IP defined! This will allow any IP to connect as this server, and MAY not be what you want."); + ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Configuration warning: Link block " + L->Name + " has no IP defined! This will allow any IP to connect as this server, and MAY not be what you want."); } if (L->RecvPass.empty()) { - throw CoreException("Invalid configuration for server '"+assign(L->Name)+"', recvpass not defined!"); + throw CoreException("Invalid configuration for server '"+L->Name+"', recvpass not defined!"); } if (L->SendPass.empty()) { - throw CoreException("Invalid configuration for server '"+assign(L->Name)+"', sendpass not defined!"); + throw CoreException("Invalid configuration for server '"+L->Name+"', sendpass not defined!"); } if (L->Name.empty()) @@ -431,7 +431,7 @@ void SpanningTreeUtilities::ReadConfiguration() if (!L->Port) { - ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Configuration warning: Link block " + assign(L->Name) + " has no port defined, you will not be able to /connect it."); + ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Configuration warning: Link block " + L->Name + " has no port defined, you will not be able to /connect it."); } } -- cgit v1.3.1-10-gc9f91