From bc1acff091e610ad7a6c7127b364fe9b6339f51a Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 8 Mar 2006 11:28:03 +0000 Subject: Added ConvToStr git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3546 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index f022d48c6..c40e99b40 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -468,6 +468,13 @@ class Link ConfigReader *Conf; std::vector LinkBlocks; +template inline string ConvToStr(const T &in) +{ + stringstream tmp; + if (!(tmp << in)) return string(); + return tmp.str(); +} + /* Yay for fast searches! * This is hundreds of times faster than recursion * or even scanning a linked list, especially when -- cgit v1.2.3