diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-21 23:44:27 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-21 23:44:27 +0000 |
commit | 355b17f151fe8258a025a3db3240339ab7cea445 (patch) | |
tree | 46774e8284ffa297f51196b7954c80d4363ffcaa /include/inspircd.h | |
parent | 6ff7e3bae02a466e10006908565dfb606970ede2 (diff) |
Update documentation and remove unused classes/functions
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11938 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/inspircd.h')
-rw-r--r-- | include/inspircd.h | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index f185104ae..b4f73d571 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -179,29 +179,7 @@ template<typename T> inline long ConvToInt(const T &in) { std::stringstream tmp; if (!(tmp << in)) return 0; - return atoi(tmp.str().c_str()); -} - -/** Template function to convert integer to char, storing result in *res and - * also returning the pointer to res. Based on Stuart Lowe's C/C++ Pages. - * @param T input value - * @param V result value - * @param R base to convert to - */ -template<typename T, typename V, typename R> inline char* itoa(const T &in, V *res, R base) -{ - if (base < 2 || base > 16) { *res = 0; return res; } - char* out = res; - int quotient = in; - while (quotient) { - *out = "0123456789abcdef"[ std::abs( quotient % base ) ]; - ++out; - quotient /= base; - } - if ( in < 0 && base == 10) *out++ = '-'; - std::reverse( res, out ); - *out = 0; - return res; + return atol(tmp.str().c_str()); } /** This class contains various STATS counters |