From 3e05d92dcb5f6c2017bc462554901ba27816bdb4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 17 Apr 2018 15:56:52 +0300 Subject: MNonCopyable - the common class to avoid declaring fake private constructors --- plugins/ClientChangeNotify/src/CString.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/ClientChangeNotify/src/CString.h') diff --git a/plugins/ClientChangeNotify/src/CString.h b/plugins/ClientChangeNotify/src/CString.h index decedaaac7..38d6080fba 100644 --- a/plugins/ClientChangeNotify/src/CString.h +++ b/plugins/ClientChangeNotify/src/CString.h @@ -68,16 +68,16 @@ public: T& operator [] (int nIndex) {_ASSERT(nIndex >= 0 && nIndex <= GetLen()); return pBuf[nIndex];} operator const T*() const {return pBuf;} operator T*() {return pBuf;} - TString& operator = (const T *pStr); - TString& operator = (const TString &Str) {return *this = Str.pBuf;} + TString& operator=(const T *pStr); + TString& operator=(const TString &Str) {return *this = Str.pBuf;} // TCString& operator + (const char *pStr) // {_ASSERT(pBuf && pStr); TCString Result(*this); return Result.Cat(pStr);} friend TString operator + (const TString &Str1, const T *Str2) {_ASSERT(Str1.pBuf && Str2); TString Result(Str1); return Result.Cat(Str2);} /* friend TCString operator + (const char *Str1, const TCString &Str2) {_ASSERT(Str1 && Str2.pBuf); TCString Result(Str1); return Result.Cat(Str2);}*/ - TString& operator += (const T *pStr) {_ASSERT(pBuf && pStr); return this->Cat(pStr);} - TString& operator += (const T c) {_ASSERT(pBuf); return this->Cat(c);} + TString& operator+=(const T *pStr) {_ASSERT(pBuf && pStr); return this->Cat(pStr);} + TString& operator+=(const T c) {_ASSERT(pBuf); return this->Cat(c);} int operator == (const T *pStr) const {return (!pBuf || !pStr) ? (pBuf == pStr) : !My_lstrcmp(pBuf, pStr);} int operator != (const T *pStr) const {return (!pBuf || !pStr) ? (pBuf != pStr) : My_lstrcmp(pBuf, pStr);} int operator < (const T *pStr) const {_ASSERT(pBuf && pStr); return My_lstrcmp(pBuf, pStr) > 0;} -- cgit v1.2.3