From f6efc88868a4b9fd62d87d1468a3b7a979c764cf Mon Sep 17 00:00:00 2001 From: psychon Date: Thu, 9 Oct 2008 17:11:06 +0000 Subject: [PATCH] Add some new constructors to CString 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ZNCString.h b/ZNCString.h index 950c6718..b209f890 100644 --- a/ZNCString.h +++ b/ZNCString.h @@ -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() {}