From 9ab4ee2ea02372ffc1790a14124328e9b4c00ccc Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 24 Dec 2006 21:12:21 +0000 Subject: SQLQuery operator% and operator, now support any data type (these are templated, and pass the type through ConvToStr()) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6105 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_sqlv2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/modules/extra/m_sqlv2.h b/src/modules/extra/m_sqlv2.h index 211133fcb..ba74fa57f 100644 --- a/src/modules/extra/m_sqlv2.h +++ b/src/modules/extra/m_sqlv2.h @@ -185,18 +185,18 @@ public: /** An overloaded operator for pushing parameters onto the parameter list */ - SQLquery& operator,(const std::string &foo) + template SQLquery& operator,(const T &foo) { - p.push_back(foo); + p.push_back(ConvToStr(foo)); return *this; } /** An overloaded operator for pushing parameters onto the parameter list. * This has higher precedence than 'operator,' and can save on parenthesis. */ - SQLquery& operator%(const std::string &foo) + template SQLquery& operator%(const T &foo) { - p.push_back(foo); + p.push_back(ConvToStr(foo)); return *this; } }; -- cgit v1.2.3