]> jfr.im git - irc/rizon/znc.git/commitdiff
Add some new constructors to CString
authorpsychon <redacted>
Thu, 9 Oct 2008 17:11:06 +0000 (17:11 +0000)
committerpsychon <redacted>
Thu, 9 Oct 2008 17:11:06 +0000 (17:11 +0000)
One of these converts bools into "true" / "false". Isn't that really useful?

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1243 726aef4b-f618-498e-8847-2d620e286838

ZNCString.h

index 950c6718f9e2f0b1b1ecd4ebceb13cf78bc58f26..b209f890521c5351823b1361c8e38024440f51c5 100644 (file)
@@ -59,6 +59,7 @@ public:
                ESQL
        } EEscape;
 
+       explicit CString(bool b) : string(b ? "true" : "false") {}
        explicit CString(char c);
        explicit CString(unsigned char c);
        explicit CString(short i);
@@ -74,6 +75,7 @@ public:
 
        CString() : string() {}
        CString(const char* c) : string(c) {}
+       CString(const char* c, size_t l) : string(c, l) {}
        CString(const string& s) : string(s) {}
        virtual ~CString() {}