diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-24 21:12:21 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-24 21:12:21 +0000 |
commit | 9ab4ee2ea02372ffc1790a14124328e9b4c00ccc (patch) | |
tree | be7a23b3f36aa33820e51eddf130c2e860c24700 | |
parent | 417a4183d8b706a4099cdbabebd629d66c6f04be (diff) |
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
-rw-r--r-- | src/modules/extra/m_sqlv2.h | 8 |
1 files changed, 4 insertions, 4 deletions
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<typename T> 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<typename T> SQLquery& operator%(const T &foo) { - p.push_back(foo); + p.push_back(ConvToStr(foo)); return *this; } }; |