diff options
| author | 2006-12-24 21:12:21 +0000 | |
|---|---|---|
| committer | 2006-12-24 21:12:21 +0000 | |
| commit | 9ab4ee2ea02372ffc1790a14124328e9b4c00ccc (patch) | |
| tree | be7a23b3f36aa33820e51eddf130c2e860c24700 /src/modules | |
| parent | Tidyup (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
Diffstat (limited to 'src/modules')
| -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; } }; |
