inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit e55277283800bfdfef86485a6b0c7a4e7755a15b
parent 7a58d288d0fd005795a8ac6908fc91bf350174d6
Author: Peter Powell <petpow@saberuk.com>
Date:   Mon, 13 May 2019 17:49:26 +0100

Fix an unnecessary string copy when reading the <link> tags.

Diffstat:
Msrc/modules/m_spanningtree/utils.cpp | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp @@ -258,13 +258,12 @@ void SpanningTreeUtilities::ReadConfiguration() { ConfigTag* tag = i->second; reference<Link> L = new Link(tag); - std::string linkname = tag->getString("name"); - L->Name = linkname.c_str(); irc::spacesepstream sep = tag->getString("allowmask"); for (std::string s; sep.GetToken(s);) L->AllowMasks.push_back(s); + L->Name = tag->getString("name"); L->IPAddr = tag->getString("ipaddr"); L->Port = tag->getUInt("port", 0); L->SendPass = tag->getString("sendpass", tag->getString("password"));