summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-17 15:56:52 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-17 15:56:52 +0300
commit3e05d92dcb5f6c2017bc462554901ba27816bdb4 (patch)
tree3276a7c3527006b74afc00c197ab48a3a43b1e9e /plugins/NewAwaySysMod
parente285d61d903c2616f5a7ea3026a1068ceb59b513 (diff)
MNonCopyable - the common class to avoid declaring fake private constructors
Diffstat (limited to 'plugins/NewAwaySysMod')
-rw-r--r--plugins/NewAwaySysMod/src/CString.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/CString.h8
-rw-r--r--plugins/NewAwaySysMod/src/Options.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/Options.h4
-rw-r--r--plugins/NewAwaySysMod/src/Properties.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/Properties.h18
-rw-r--r--plugins/NewAwaySysMod/src/TMyArray.h8
7 files changed, 21 insertions, 23 deletions
diff --git a/plugins/NewAwaySysMod/src/CString.cpp b/plugins/NewAwaySysMod/src/CString.cpp
index 5a61b36edb..60b9ac0985 100644
--- a/plugins/NewAwaySysMod/src/CString.cpp
+++ b/plugins/NewAwaySysMod/src/CString.cpp
@@ -252,7 +252,7 @@ TString<T> TString<T>::ToLower() const
template <class T>
-TString<T>& TString<T>::operator = (const T *pStr)
+TString<T>& TString<T>::operator=(const T *pStr)
{
if (pStr)
{
diff --git a/plugins/NewAwaySysMod/src/CString.h b/plugins/NewAwaySysMod/src/CString.h
index 22cb0dd4c3..e079b740cd 100644
--- a/plugins/NewAwaySysMod/src/CString.h
+++ b/plugins/NewAwaySysMod/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<T>& operator = (const T *pStr);
- TString<T>& operator = (const TString<T> &Str) {return *this = Str.pBuf;}
+ TString<T>& operator=(const T *pStr);
+ TString<T>& operator=(const TString<T> &Str) {return *this = Str.pBuf;}
// TCString& operator + (const char *pStr)
// {_ASSERT(pBuf && pStr); TCString Result(*this); return Result.Cat(pStr);}
friend TString<T> operator + (const TString<T> &Str1, const T *Str2)
{_ASSERT(Str1.pBuf && Str2); TString<T> 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<T>& operator += (const T *pStr) {_ASSERT(pBuf && pStr); return this->Cat(pStr);}
- TString<T>& operator += (const T c) {_ASSERT(pBuf); return this->Cat(c);}
+ TString<T>& operator+=(const T *pStr) {_ASSERT(pBuf && pStr); return this->Cat(pStr);}
+ TString<T>& 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;}
diff --git a/plugins/NewAwaySysMod/src/Options.cpp b/plugins/NewAwaySysMod/src/Options.cpp
index f0cac57fb3..37481c2e51 100644
--- a/plugins/NewAwaySysMod/src/Options.cpp
+++ b/plugins/NewAwaySysMod/src/Options.cpp
@@ -101,7 +101,7 @@ COptItem *COptPage::Find(int m_dlgItemID)
return nullptr;
}
-COptPage& COptPage::operator = (const COptPage& Page)
+COptPage& COptPage::operator=(const COptPage& Page)
{
hWnd = Page.hWnd;
sModule = Page.sModule;
diff --git a/plugins/NewAwaySysMod/src/Options.h b/plugins/NewAwaySysMod/src/Options.h
index 2b06244c44..129a52a5bd 100644
--- a/plugins/NewAwaySysMod/src/Options.h
+++ b/plugins/NewAwaySysMod/src/Options.h
@@ -61,7 +61,6 @@ public:
int GetParam() { return lParam; }
int GetID() { return m_dlgItemID; }
- // virtual COptItem& operator = (const COptItem& Item) {return *this;};
virtual COptItem* Copy() { _ASSERT(0); return nullptr; } // Attention! Free Copy() result when it's not needed anymore!
CString sDBSetting;
@@ -107,7 +106,6 @@ public:
virtual INT_PTR GetValue() { return (INT_PTR)&sValue; }
virtual INT_PTR GetDefValue() { return (INT_PTR)&sDefValue; }
- // COptItem_Edit& operator = (const COptItem_Edit& Item) {return *this;};
virtual COptItem* Copy() { return new COptItem_Edit(*this); }
TCString sDefValue;
@@ -524,7 +522,7 @@ public:
bool GetModified();
void SetModified(bool m_bModified);
- COptPage& operator = (const COptPage& Page);
+ COptPage& operator=(const COptPage& Page);
HWND hWnd;
CString sModule, sDBSettingPrefix;
diff --git a/plugins/NewAwaySysMod/src/Properties.cpp b/plugins/NewAwaySysMod/src/Properties.cpp
index 16bc7a3fbb..077704fb56 100644
--- a/plugins/NewAwaySysMod/src/Properties.cpp
+++ b/plugins/NewAwaySysMod/src/Properties.cpp
@@ -45,7 +45,7 @@ void ResetSettingsOnStatusChange(const char *szProto = nullptr, int bResetPerson
}
-CProtoState::CStatus& CProtoState::CStatus::operator = (int Status)
+CProtoState::CStatus& CProtoState::CStatus::operator=(int Status)
{
_ASSERT(Status >= ID_STATUS_OFFLINE && Status <= ID_STATUS_OUTTOLUNCH);
if (Status < ID_STATUS_OFFLINE || Status > ID_STATUS_OUTTOLUNCH)
diff --git a/plugins/NewAwaySysMod/src/Properties.h b/plugins/NewAwaySysMod/src/Properties.h
index 5c7f42d718..f5b2f2d7fb 100644
--- a/plugins/NewAwaySysMod/src/Properties.h
+++ b/plugins/NewAwaySysMod/src/Properties.h
@@ -153,7 +153,7 @@ public:
{
public:
CStatus(const char* szProto, CProtoStates* GrandParent): m_szProto(szProto), m_grandParent(GrandParent), m_status(ID_STATUS_OFFLINE) {}
- CStatus& operator = (int Status);
+ CStatus& operator=(int Status);
operator int() {return m_status;}
friend class CProtoState;
private:
@@ -179,7 +179,7 @@ public:
{
public:
CCurStatusMsg() {*this = nullptr;}
- CCurStatusMsg& operator = (TCString Msg)
+ CCurStatusMsg& operator=(TCString Msg)
{
CurStatusMsg = Msg;
SYSTEMTIME st;
@@ -205,7 +205,7 @@ public:
{ // we use temporary messages to keep user-defined per-protocol messages intact, when changing messages through MS_NAS_SETSTATE, or when autoaway becomes active etc.. temporary messages are automatically resetted when protocol status changes
public:
CTempMsg(): iIsSet(0) {}
- CTempMsg& operator = (TCString _Msg) {this->Msg = _Msg; iIsSet = true; return *this;}
+ CTempMsg& operator=(TCString _Msg) {this->Msg = _Msg; iIsSet = true; return *this;}
operator TCString()
{
_ASSERT(iIsSet);
@@ -242,7 +242,7 @@ public:
CProtoStates() {}
CProtoStates(const CProtoStates &States) {*this = States;}
- CProtoStates& operator = (const CProtoStates& States)
+ CProtoStates& operator=(const CProtoStates& States)
{
ProtoStates = States.ProtoStates;
for (int i = 0; i < ProtoStates.GetSize(); i++)
@@ -323,7 +323,7 @@ public:
class CAutoreply
{
public:
- CAutoreply& operator = (const int m_value)
+ CAutoreply& operator=(const int m_value)
{
CString Setting(Parent->szProto ? Parent->ProtoStatusToDBSetting(DB_ENABLEREPLY, IDC_MOREOPTDLG_PERSTATUSPROTOSETTINGS) : DB_ENABLEREPLY);
if (db_get_b(NULL, MOD_NAME, Setting, VAL_USEDEFAULT) == m_value)
@@ -357,7 +357,7 @@ public:
{
public:
CStatus(int iStatus = 0, const char *szProto = nullptr): Status(iStatus), szProto(szProto) {}
- CStatus& operator = (int _Status) {this->Status = _Status; return *this;}
+ CStatus& operator=(int _Status) {this->Status = _Status; return *this;}
operator int()
{
if (!Status)
@@ -416,7 +416,7 @@ public:
class CIgnore
{
public:
- CIgnore& operator = (const int m_value)
+ CIgnore& operator=(const int m_value)
{
CString Setting(Parent->ContactStatusToDBSetting(DB_IGNOREREQUESTS, IDC_MOREOPTDLG_PERSTATUSPERSONALSETTINGS));
MCONTACT hContact = (Parent->m_hContact != INVALID_CONTACT_ID) ? Parent->m_hContact : NULL;
@@ -441,7 +441,7 @@ public:
class CAutoreply
{
public:
- CAutoreply& operator = (const int m_value)
+ CAutoreply& operator=(const int m_value)
{
CString Setting(Parent->ContactStatusToDBSetting(DB_ENABLEREPLY, IDC_MOREOPTDLG_PERSTATUSPERSONALSETTINGS));
MCONTACT hContact = (Parent->m_hContact != INVALID_CONTACT_ID) ? Parent->m_hContact : NULL;
@@ -483,7 +483,7 @@ public:
{
public:
CStatus(int iStatus = 0, MCONTACT _hContact = NULL): Status(iStatus), m_hContact(_hContact) {}
- CStatus& operator = (int _Status) {this->Status = _Status; return *this;}
+ CStatus& operator=(int _Status) {this->Status = _Status; return *this;}
operator int()
{
if (!Status) {
diff --git a/plugins/NewAwaySysMod/src/TMyArray.h b/plugins/NewAwaySysMod/src/TMyArray.h
index 45eeaf1563..7bca17fb68 100644
--- a/plugins/NewAwaySysMod/src/TMyArray.h
+++ b/plugins/NewAwaySysMod/src/TMyArray.h
@@ -49,8 +49,8 @@ public:
void RemoveAll();
const T& operator[](int nIndex) const;
T& operator[](int nIndex);
- TMyArray<T, ARG_T, GrowBy, FreeThreshold>& operator = (const TMyArray<T, ARG_T, GrowBy, FreeThreshold> &A);
- TMyArray<T, ARG_T, GrowBy, FreeThreshold>& operator += (const TMyArray<T, ARG_T, GrowBy, FreeThreshold> &A);
+ TMyArray<T, ARG_T, GrowBy, FreeThreshold>& operator=(const TMyArray<T, ARG_T, GrowBy, FreeThreshold> &A);
+ TMyArray<T, ARG_T, GrowBy, FreeThreshold>& operator+=(const TMyArray<T, ARG_T, GrowBy, FreeThreshold> &A);
private:
int SetAllocNum(int nNewAllocNum);
@@ -328,7 +328,7 @@ __forceinline T& TMyArray<T, ARG_T, GrowBy, FreeThreshold>::operator[](int nInde
}
template <class T, class ARG_T, int GrowBy, int FreeThreshold>
-__forceinline TMyArray<T, ARG_T, GrowBy, FreeThreshold>& TMyArray<T, ARG_T, GrowBy, FreeThreshold>::operator = (const TMyArray<T, ARG_T, GrowBy, FreeThreshold> &A)
+__forceinline TMyArray<T, ARG_T, GrowBy, FreeThreshold>& TMyArray<T, ARG_T, GrowBy, FreeThreshold>::operator=(const TMyArray<T, ARG_T, GrowBy, FreeThreshold> &A)
{
RemoveAll();
int I;
@@ -340,7 +340,7 @@ __forceinline TMyArray<T, ARG_T, GrowBy, FreeThreshold>& TMyArray<T, ARG_T, Grow
}
template <class T, class ARG_T, int GrowBy, int FreeThreshold>
-__forceinline TMyArray<T, ARG_T, GrowBy, FreeThreshold>& TMyArray<T, ARG_T, GrowBy, FreeThreshold>::operator += (const TMyArray<T, ARG_T, GrowBy, FreeThreshold> &A)
+__forceinline TMyArray<T, ARG_T, GrowBy, FreeThreshold>& TMyArray<T, ARG_T, GrowBy, FreeThreshold>::operator+=(const TMyArray<T, ARG_T, GrowBy, FreeThreshold> &A)
{
int I;
for (I = 0; I < A.GetSize(); I++)