diff options
50 files changed, 109 insertions, 175 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h index f3168a7fba..f366ca4052 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -399,8 +399,8 @@ EXTERN_C MIR_APP_DLL(LRESULT) CALLBACK stubNicklistProc(HWND hwnd, UINT msg, WPA class MIR_APP_EXPORT CSrmmBaseDialog : public CDlgBase
{
- CSrmmBaseDialog(const CSrmmBaseDialog&);
- CSrmmBaseDialog& operator=(const CSrmmBaseDialog&);
+ CSrmmBaseDialog(const CSrmmBaseDialog&) = delete;
+ CSrmmBaseDialog& operator=(const CSrmmBaseDialog&) = delete;
protected:
CSrmmBaseDialog(HINSTANCE hInst, int idDialog, SESSION_INFO *si = nullptr);
diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h index b0f15305de..1135678859 100644 --- a/include/m_system_cpp.h +++ b/include/m_system_cpp.h @@ -45,7 +45,7 @@ public: __inline explicit mir_ptr(T *_p) : data(_p) {}
__inline ~mir_ptr() { mir_free(data); }
__inline T* get() const { return data; }
- __inline T* operator = (T *_p) { if (data) mir_free(data); data = _p; return data; }
+ __inline T* operator=(T *_p) { if (data) mir_free(data); data = _p; return data; }
__inline T* operator->() const { return data; }
__inline operator T*() const { return data; }
__inline operator INT_PTR() const { return (INT_PTR)data; }
@@ -75,7 +75,7 @@ public: class mir_cslock
{
CRITICAL_SECTION &cs;
- __inline mir_cslock& operator = (const mir_cslock&) { return *this; }
+ __inline mir_cslock& operator=(const mir_cslock&) { return *this; }
public:
__inline mir_cslock(CRITICAL_SECTION &_cs) : cs(_cs) { ::EnterCriticalSection(&cs); }
@@ -91,7 +91,7 @@ public: __inline explicit pass_ptrA() : mir_ptr(){}
__inline explicit pass_ptrA(char *_p) : mir_ptr(_p) {}
__inline ~pass_ptrA() { zero(); }
- __inline char* operator = (char *_p){ zero(); return mir_ptr::operator=(_p); }
+ __inline char* operator=(char *_p){ zero(); return mir_ptr::operator=(_p); }
__inline void zero() {
if (data) SecureZeroMemory(data, mir_strlen(data));
}
@@ -103,7 +103,7 @@ public: __inline explicit pass_ptrW() : mir_ptr(){}
__inline explicit pass_ptrW(wchar_t *_p) : mir_ptr(_p) {}
__inline ~pass_ptrW() { zero(); }
- __inline wchar_t* operator = (wchar_t *_p){ zero(); return mir_ptr::operator=(_p); }
+ __inline wchar_t* operator=(wchar_t *_p){ zero(); return mir_ptr::operator=(_p); }
__inline void zero() {
if (data) SecureZeroMemory(data, mir_wstrlen(data)*sizeof(wchar_t));
}
@@ -146,6 +146,17 @@ public: ///////////////////////////////////////////////////////////////////////////////
// general lists' templates
+struct MNonCopyable
+{
+ MNonCopyable() {}
+
+ MNonCopyable(const MNonCopyable&) = delete;
+ MNonCopyable& operator=(const MNonCopyable&) = delete;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// general lists' templates
+
#define NumericKeySortT -1
#define HandleKeySortT -2
#define PtrKeySortT -3
diff --git a/libs/libjson/src/JSONChildren.h b/libs/libjson/src/JSONChildren.h index ce697ffd77..04922d9a1b 100644 --- a/libs/libjson/src/JSONChildren.h +++ b/libs/libjson/src/JSONChildren.h @@ -120,7 +120,7 @@ public: }
private:
iteratorKeeper(const iteratorKeeper &);
- iteratorKeeper & operator = (const iteratorKeeper &);
+ iteratorKeeper & operator=(const iteratorKeeper &);
jsonChildren * myChildren;
JSONNode ** & myPos;
@@ -218,7 +218,7 @@ public: JSON_PRIVATE
//to make sure it's not copyable
jsonChildren(const jsonChildren &);
- jsonChildren & operator = (const jsonChildren &);
+ jsonChildren & operator=(const jsonChildren &);
void deleteAll(void); //implemented in JSONNode.cpp
void doerase(JSONNode ** position, json_index_t number);
diff --git a/libs/libjson/src/JSONMemory.h b/libs/libjson/src/JSONMemory.h index 32e8c3f4ef..28ae563f9f 100644 --- a/libs/libjson/src/JSONMemory.h +++ b/libs/libjson/src/JSONMemory.h @@ -119,7 +119,7 @@ class json_auto { T * ptr;
private:
json_auto(const json_auto &);
- json_auto & operator = (const json_auto &);
+ json_auto & operator=(const json_auto &);
};
//Clears a string, if required, frees the memory
diff --git a/libs/libjson/src/JSONNode.h b/libs/libjson/src/JSONNode.h index 8c48d24dbe..21889ca903 100644 --- a/libs/libjson/src/JSONNode.h +++ b/libs/libjson/src/JSONNode.h @@ -158,8 +158,8 @@ public: JSONNode JSON_PTR_LIB pop_back_nocase(const json_string & name_t);
#endif
- DECLARE_FOR_ALL_TYPES(JSONNode & operator = )
- JSONNode & operator = (const JSONNode &);
+ DECLARE_FOR_ALL_TYPES(JSONNode & operator=)
+ JSONNode & operator=(const JSONNode &);
DECLARE_FOR_ALL_TYPES_CONST(bool operator ==)
DECLARE_FOR_ALL_TYPES_CONST(bool operator !=)
@@ -208,7 +208,7 @@ public: inline bool operator >= (const iterator & other) const { return it >= other.it; }
inline bool operator < (const iterator & other) const { return it < other.it; }
inline bool operator <= (const iterator & other) const { return it <= other.it; }
- inline iterator & operator = (const iterator & orig){ it = orig.it; return *this; }
+ inline iterator & operator=(const iterator & orig){ it = orig.it; return *this; }
iterator (const iterator & orig) : it(orig.it) {}
private:
JSONNode ** it;
@@ -250,7 +250,7 @@ public: inline bool operator >= (const const_iterator & other) const { return it >= other.it; }
inline bool operator < (const const_iterator & other) const { return it < other.it; }
inline bool operator <= (const const_iterator & other) const { return it <= other.it; }
- inline const_iterator & operator = (const const_iterator & orig){ it = orig.it; return *this; }
+ inline const_iterator & operator=(const const_iterator & orig){ it = orig.it; return *this; }
const_iterator (const const_iterator & orig) : it(orig.it) {}
private:
JSONNode ** it;
@@ -293,7 +293,7 @@ public: inline bool operator <= (const reverse_iterator & other) const { return it >= other.it; }
inline bool operator > (const reverse_iterator & other) const { return it < other.it; }
inline bool operator >= (const reverse_iterator & other) const { return it <= other.it; }
- inline reverse_iterator & operator = (const reverse_iterator & orig){ it = orig.it; return *this; }
+ inline reverse_iterator & operator=(const reverse_iterator & orig){ it = orig.it; return *this; }
reverse_iterator (const reverse_iterator & orig) : it(orig.it) {}
private:
JSONNode ** it;
@@ -336,7 +336,7 @@ public: inline bool operator <= (const reverse_const_iterator & other) const { return it >= other.it; }
inline bool operator > (const reverse_const_iterator & other) const { return it < other.it; }
inline bool operator >= (const reverse_const_iterator & other) const { return it <= other.it; }
- inline reverse_const_iterator & operator = (const reverse_const_iterator & orig){ it = orig.it; return *this; }
+ inline reverse_const_iterator & operator=(const reverse_const_iterator & orig){ it = orig.it; return *this; }
reverse_const_iterator (const reverse_const_iterator & orig) : it(orig.it) {}
private:
JSONNode ** it;
@@ -404,7 +404,7 @@ public: mynode -> unlock(mythread);
}
private:
- auto_lock & operator = (const auto_lock &);
+ auto_lock & operator=(const auto_lock &);
auto_lock(const auto_lock &);
JSONNode * mynode;
int mythread;
diff --git a/libs/libjson/src/internalJSONNode.h b/libs/libjson/src/internalJSONNode.h index 26e279764e..2ad616fbcd 100644 --- a/libs/libjson/src/internalJSONNode.h +++ b/libs/libjson/src/internalJSONNode.h @@ -67,7 +67,7 @@ public: internalJSONNode(const json_string & unparsed);
internalJSONNode(const json_string & name_t, const json_string & value_t);
internalJSONNode(const internalJSONNode & orig);
- internalJSONNode & operator = (const internalJSONNode &);
+ internalJSONNode & operator=(const internalJSONNode &);
~internalJSONNode(void);
static internalJSONNode * newInternal(char mytype = JSON_NULL);
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib Binary files differindex 2e610be4ea..774a9af7ca 100644 --- a/libs/win32/mir_app.lib +++ b/libs/win32/mir_app.lib diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib Binary files differindex 1c82dde576..4f3519a10d 100644 --- a/libs/win64/mir_app.lib +++ b/libs/win64/mir_app.lib diff --git a/plugins/Boltun/src/Engine/PerContactData.h b/plugins/Boltun/src/Engine/PerContactData.h index f573423bd3..5eb276ab28 100644 --- a/plugins/Boltun/src/Engine/PerContactData.h +++ b/plugins/Boltun/src/Engine/PerContactData.h @@ -24,10 +24,8 @@ static std::map<unsigned, void*> perContactDataObjects;
template <class Source, class Data, class ContactHandle>
-class PerContactData
+class PerContactData : private MNonCopyable
{
- PerContactData& operator=(const PerContactData&);
-
template <class Source, class Data>
struct InternalData
{
diff --git a/plugins/Boltun/src/Engine/TalkEngine.h b/plugins/Boltun/src/Engine/TalkEngine.h index 3ddeaf87b9..cd54199a90 100644 --- a/plugins/Boltun/src/Engine/TalkEngine.h +++ b/plugins/Boltun/src/Engine/TalkEngine.h @@ -26,9 +26,8 @@ #include "PerContactData.h"
#include "UnrecentChooser.h"
-class TalkBot
+class TalkBot : private MNonCopyable
{
- TalkBot& operator=(const TalkBot&);
public:
struct MessageInfo
diff --git a/plugins/Boltun/src/Engine/ValueChooser.h b/plugins/Boltun/src/Engine/ValueChooser.h index e442f14530..6ddfc00a5a 100644 --- a/plugins/Boltun/src/Engine/ValueChooser.h +++ b/plugins/Boltun/src/Engine/ValueChooser.h @@ -22,7 +22,7 @@ #define StringChooserH
template<class container = std::vector<std::wstring> >
-class ValueChooser
+class ValueChooser : private MNonCopyable
{
private:
int freeNumbers;
@@ -30,8 +30,6 @@ private: const container data;
bool notifyOnReset;
- ValueChooser& operator=(const ValueChooser&);
-
public:
ValueChooser(const container& vec, bool NotifyOnReset = false)
:data(vec), notifyOnReset(NotifyOnReset)
diff --git a/plugins/Boltun/src/config.h b/plugins/Boltun/src/config.h index eeb697d4b0..b7b4243963 100644 --- a/plugins/Boltun/src/config.h +++ b/plugins/Boltun/src/config.h @@ -24,7 +24,7 @@ class BoltunConfig;
template <class T, class BaseClass>
-class Property
+class Property : private MNonCopyable
{
public:
typedef const T(__thiscall BaseClass::*Getter)();
@@ -37,8 +37,6 @@ private: bool cacheValid;
T cached;
- Property& operator=(const Property&);
-
public:
Property(Getter g, Setter s)
:getter(g), setter(s), cacheValid(false)
@@ -67,7 +65,7 @@ public: };
template <class T, class BaseClass>
-class PtrProperty
+class PtrProperty : private MNonCopyable
{
public:
typedef const T* (__thiscall BaseClass::*Getter)();
@@ -80,8 +78,6 @@ private: bool cacheValid;
const T* cached;
- PtrProperty& operator=(const PtrProperty&);
-
public:
PtrProperty(Getter g, Setter s)
:getter(g), setter(s), cacheValid(false), cached(nullptr)
diff --git a/plugins/ClientChangeNotify/src/CString.cpp b/plugins/ClientChangeNotify/src/CString.cpp index 2ed5f49062..d664213498 100644 --- a/plugins/ClientChangeNotify/src/CString.cpp +++ b/plugins/ClientChangeNotify/src/CString.cpp @@ -253,7 +253,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/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<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/ClientChangeNotify/src/Options.cpp b/plugins/ClientChangeNotify/src/Options.cpp index cc1e3e6d96..e9674592a7 100644 --- a/plugins/ClientChangeNotify/src/Options.cpp +++ b/plugins/ClientChangeNotify/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/ClientChangeNotify/src/Options.h b/plugins/ClientChangeNotify/src/Options.h index aac3e9d1c0..35f62f817c 100644 --- a/plugins/ClientChangeNotify/src/Options.h +++ b/plugins/ClientChangeNotify/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 NULL; } // 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/ClientChangeNotify/src/TMyArray.h b/plugins/ClientChangeNotify/src/TMyArray.h index 3e676bf816..27bff9fd44 100644 --- a/plugins/ClientChangeNotify/src/TMyArray.h +++ b/plugins/ClientChangeNotify/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++)
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++)
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h index e3a4f0a354..6a3c73c00a 100644 --- a/plugins/PluginUpdater/src/stdafx.h +++ b/plugins/PluginUpdater/src/stdafx.h @@ -172,10 +172,9 @@ extern IconItemT iconList[]; void UninitCheck(void);
void UninitListNew(void);
-class AutoHandle
+class AutoHandle : private MNonCopyable
{
HANDLE &m_handle;
- AutoHandle& operator=(const AutoHandle&) { return *this; }
public:
AutoHandle(HANDLE &_handle) : m_handle(_handle) {}
diff --git a/plugins/SmileyAdd/src/smileys.h b/plugins/SmileyAdd/src/smileys.h index 4f02daed07..d75d40c418 100644 --- a/plugins/SmileyAdd/src/smileys.h +++ b/plugins/SmileyAdd/src/smileys.h @@ -104,13 +104,13 @@ template<class T> struct SMOBJLIST : public OBJLIST<T> {
SMOBJLIST() : OBJLIST<T>(5) {};
- SMOBJLIST<T>& operator = (const SMOBJLIST<T>& lst)
+ SMOBJLIST<T>& operator=(const SMOBJLIST<T>& lst)
{
OBJLIST<T>::destroy();
- return operator += (lst);
+ return operator+=(lst);
}
- SMOBJLIST<T>& operator += (const SMOBJLIST<T>& lst)
+ SMOBJLIST<T>& operator+=(const SMOBJLIST<T>& lst)
{
for (auto &it : lst)
insert(new T(*it));
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.h b/plugins/UserInfoEx/src/classMAnnivDate.h index 987408cb63..1dcfda6124 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.h +++ b/plugins/UserInfoEx/src/classMAnnivDate.h @@ -118,6 +118,6 @@ public: BYTE operator == (const SYSTEMTIME &st) { return IsEqual(st); };
BYTE operator == (const MAnnivDate &mda) { return IsEqual(mda); };
- void operator = (SYSTEMTIME &st) { SetDate(st); };
- void operator = (MAnnivDate &mda) { SetDate(mda); };
+ void operator=(SYSTEMTIME &st) { SetDate(st); };
+ void operator=(MAnnivDate &mda) { SetDate(mda); };
};
diff --git a/plugins/UserInfoEx/src/classMTime.h b/plugins/UserInfoEx/src/classMTime.h index 3388611c2f..eff510421a 100644 --- a/plugins/UserInfoEx/src/classMTime.h +++ b/plugins/UserInfoEx/src/classMTime.h @@ -105,11 +105,11 @@ public: int DBWriteStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
// operatoren
- void operator = (DWORD& dwTimeStamp) { FromStampAsUTC(dwTimeStamp); };
- void operator = (FILETIME &ftFileTime) { Set(ftFileTime, FALSE); };
- void operator = (LARGE_INTEGER &liFileTime) { Set(liFileTime, FALSE); };
- void operator = (SYSTEMTIME &st) { Set(st, FALSE); };
- void operator = (const MTime &mt) { Set(mt); };
+ void operator=(DWORD& dwTimeStamp) { FromStampAsUTC(dwTimeStamp); };
+ void operator=(FILETIME &ftFileTime) { Set(ftFileTime, FALSE); };
+ void operator=(LARGE_INTEGER &liFileTime) { Set(liFileTime, FALSE); };
+ void operator=(SYSTEMTIME &st) { Set(st, FALSE); };
+ void operator=(const MTime &mt) { Set(mt); };
};
/**
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h index ad89480259..e34d77d338 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h @@ -83,5 +83,5 @@ public: MCONTACT toDB();
void toIni(FILE* file, int modCount);
- BYTE operator = (MCONTACT hContact) { return fromDB(hContact); }
+ BYTE operator=(MCONTACT hContact) { return fromDB(hContact); }
};
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.h b/plugins/UserInfoEx/src/ex_import/classExImContactXML.h index 759f8d756a..7b2a255929 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.h +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.h @@ -81,7 +81,7 @@ public: int LoadXmlElemnt(TiXmlElement *xContact);
int Import(BYTE keepMetaSubContact = FALSE);
- BYTE operator = (TiXmlElement* xmlContact) {
+ BYTE operator=(TiXmlElement* xmlContact) {
return LoadXmlElemnt(xmlContact) == ERROR_OK;
}
};
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp index eab2949fe4..eda76bb29d 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp @@ -113,7 +113,7 @@ BYTE CLineBuffer::_resizeBuf(const size_t cbReq) *
* return: length of the string, added
**/
-size_t CLineBuffer::operator = (const CHAR *szVal)
+size_t CLineBuffer::operator=(const CHAR *szVal)
{
if (szVal) {
size_t cbLength = mir_strlen(szVal);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h index 0636d37dd4..7ea59290ce 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h @@ -35,7 +35,7 @@ public: CLineBuffer();
~CLineBuffer();
- size_t operator = (const CHAR *szVal);
+ size_t operator=(const CHAR *szVal);
size_t operator + (const CHAR *szVal);
size_t operator + (const WCHAR *wszVal);
diff --git a/plugins/UserInfoEx/src/ex_import/tinystr.h b/plugins/UserInfoEx/src/ex_import/tinystr.h index a5d85d11dc..3f5dbf9308 100644 --- a/plugins/UserInfoEx/src/ex_import/tinystr.h +++ b/plugins/UserInfoEx/src/ex_import/tinystr.h @@ -100,32 +100,32 @@ class TiXmlString } // = operator - TiXmlString& operator = (const char * copy) + TiXmlString& operator=(const char * copy) { return assign(copy, (size_type)mir_strlen(copy)); } // = operator - TiXmlString& operator = (const TiXmlString & copy) + TiXmlString& operator=(const TiXmlString & copy) { return assign(copy.start(), copy.length()); } // += operator. Maps to append - TiXmlString& operator += (const char * suffix) + TiXmlString& operator+=(const char * suffix) { return append(suffix, static_cast<size_type>(mir_strlen(suffix))); } // += operator. Maps to append - TiXmlString& operator += (char single) + TiXmlString& operator+=(char single) { return append(&single, 1); } // += operator. Maps to append - TiXmlString& operator += (const TiXmlString & suffix) + TiXmlString& operator+=(const TiXmlString & suffix) { return append(suffix.data(), suffix.length()); } diff --git a/plugins/UserInfoEx/src/ex_import/tinyxml.h b/plugins/UserInfoEx/src/ex_import/tinyxml.h index ac98ee8d74..dc9087cc8c 100644 --- a/plugins/UserInfoEx/src/ex_import/tinyxml.h +++ b/plugins/UserInfoEx/src/ex_import/tinyxml.h @@ -151,7 +151,7 @@ const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN; #include "ticpprc.h" class TiXmlBase : public TiCppRC #else -class TiXmlBase +class TiXmlBase : private MNonCopyable #endif { friend class TiXmlNode; @@ -366,9 +366,6 @@ protected: static void ConvertUTF32ToUTF8(unsigned long input, char* output, int* length); private: - TiXmlBase(const TiXmlBase&); // not implemented. - void operator=(const TiXmlBase& base); // not allowed. - struct Entity { const char* str; @@ -392,7 +389,7 @@ private: in a document, or stand on its own. The type of a TiXmlNode can be queried, and it can be cast to its more defined type. */ -class TiXmlNode : public TiXmlBase +class TiXmlNode : public TiXmlBase, private MNonCopyable { friend class TiXmlDocument; friend class TiXmlElement; @@ -686,10 +683,6 @@ protected: TiXmlNode* prev; TiXmlNode* next; - -private: - TiXmlNode(const TiXmlNode&); // not implemented. - void operator=(const TiXmlNode& base); // not allowed. }; /** An attribute is a name-value pair. Elements have an arbitrary @@ -699,7 +692,7 @@ private: part of the tinyXML document object model. There are other suggested ways to look at this problem. */ -class TiXmlAttribute : public TiXmlBase +class TiXmlAttribute : public TiXmlBase, private MNonCopyable { friend class TiXmlAttributeSet; @@ -795,9 +788,6 @@ public: void SetDocument(TiXmlDocument* doc) { document = doc; } private: - TiXmlAttribute(const TiXmlAttribute&); // not implemented. - void operator=(const TiXmlAttribute& base); // not allowed. - TiXmlDocument* document; // A pointer back to a document, for error reporting. TIXML_STRING name; TIXML_STRING value; @@ -818,7 +808,7 @@ private: - I like circular lists - it demonstrates some independence from the (typical) doubly linked list. */ -class TiXmlAttributeSet +class TiXmlAttributeSet : private MNonCopyable { public: TiXmlAttributeSet(); @@ -836,11 +826,6 @@ public: TiXmlAttribute* Find(const TIXML_STRING& name); private: - //*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element), - //*ME: this class must be also use a hidden/disabled copy-constructor !!! - TiXmlAttributeSet(const TiXmlAttributeSet&); // not allowed - void operator=(const TiXmlAttributeSet&); // not allowed (as TiXmlAttribute) - TiXmlAttribute sentinel; }; diff --git a/plugins/WinterSpeak/src/AnnounceDialog.h b/plugins/WinterSpeak/src/AnnounceDialog.h index 994e75d524..cc9d5fd94f 100644 --- a/plugins/WinterSpeak/src/AnnounceDialog.h +++ b/plugins/WinterSpeak/src/AnnounceDialog.h @@ -4,8 +4,6 @@ class AnnounceDialog : public MirandaDialog
{
- AnnounceDialog& operator=(const AnnounceDialog&);
-
public:
AnnounceDialog(AnnounceDatabase &db);
~AnnounceDialog();
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.h b/plugins/WinterSpeak/src/DialogConfigActive.h index 28978787f8..77eae56e07 100644 --- a/plugins/WinterSpeak/src/DialogConfigActive.h +++ b/plugins/WinterSpeak/src/DialogConfigActive.h @@ -3,8 +3,6 @@ class DialogConfigActive : public MirandaDialog
{
- DialogConfigActive& operator=(const DialogConfigActive&);
-
public:
//--------------------------------------------------------------------------
// Description : Initialise
diff --git a/plugins/WinterSpeak/src/DialogConfigEngine.h b/plugins/WinterSpeak/src/DialogConfigEngine.h index e103ec1003..5d585bf6cf 100644 --- a/plugins/WinterSpeak/src/DialogConfigEngine.h +++ b/plugins/WinterSpeak/src/DialogConfigEngine.h @@ -7,8 +7,6 @@ class TextToSpeech; class DialogConfigEngine : public MirandaDialog
{
- DialogConfigEngine& operator=(const DialogConfigEngine&);
-
public:
DialogConfigEngine(ConfigDatabase &db);
virtual ~DialogConfigEngine();
diff --git a/plugins/WinterSpeak/src/MirandaDialog.h b/plugins/WinterSpeak/src/MirandaDialog.h index 22424a6f30..5b66634eb4 100644 --- a/plugins/WinterSpeak/src/MirandaDialog.h +++ b/plugins/WinterSpeak/src/MirandaDialog.h @@ -1,5 +1,5 @@ #pragma once
-class MirandaDialog
+class MirandaDialog : private MNonCopyable
{
public:
MirandaDialog(void);
diff --git a/plugins/WinterSpeak/src/Subject.h b/plugins/WinterSpeak/src/Subject.h index f4bba3b075..d3ae97fba6 100644 --- a/plugins/WinterSpeak/src/Subject.h +++ b/plugins/WinterSpeak/src/Subject.h @@ -3,7 +3,7 @@ #include "Observer.h"
#include <list>
-class Subject
+class Subject : private MNonCopyable
{
public:
Subject();
@@ -27,12 +27,6 @@ public: void detach(const Observer &observer);
private:
- //--------------------------------------------------------------------------
- // Description : Disallow assignment operator and copy constructor
- //--------------------------------------------------------------------------
- Subject(const Subject &rhs);
- const Subject & operator=(const Subject &rhs);
-
std::list<Observer *> m_observer_list;
};
diff --git a/protocols/FacebookRM/src/http_request.h b/protocols/FacebookRM/src/http_request.h index df79b87b68..f21e5be78c 100644 --- a/protocols/FacebookRM/src/http_request.h +++ b/protocols/FacebookRM/src/http_request.h @@ -18,15 +18,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef _HTTP_REQUEST_H_ #define _HTTP_REQUEST_H_ -class HttpRequest : public NETLIBHTTPREQUEST, public MZeroedObject +class HttpRequest : public NETLIBHTTPREQUEST, public MZeroedObject, private MNonCopyable { - HttpRequest& operator=(const HttpRequest&); // to prevent copying; - va_list formatArgs; CMStringA url; protected: - class HttpRequestUrl + class HttpRequestUrl : private MNonCopyable { friend HttpRequest; @@ -45,8 +43,6 @@ protected: request.szUrl = request.url.GetBuffer(); } - HttpRequestUrl& operator=(const HttpRequestUrl&); // to prevent copying; - public: HttpRequestUrl& operator<<(const char *param); HttpRequestUrl& operator<<(const BOOL_PARAM ¶m); @@ -60,10 +56,8 @@ protected: } }; - class HttpRequestHeaders + class HttpRequestHeaders : private MNonCopyable { - HttpRequestHeaders& operator=(const HttpRequestHeaders&); // to prevent copying; - HttpRequest &request; void Add(LPCSTR szName) diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp index 5cd1451059..5ffb9c22f1 100644 --- a/protocols/IRCG/src/irclib.cpp +++ b/protocols/IRCG/src/irclib.cpp @@ -75,7 +75,7 @@ void CIrcMessage::Reset() parameters.destroy(); } -CIrcMessage& CIrcMessage::operator = (const CIrcMessage& m) +CIrcMessage& CIrcMessage::operator=(const CIrcMessage& m) { if (&m != this) { sCommand = m.sCommand; @@ -89,7 +89,7 @@ CIrcMessage& CIrcMessage::operator = (const CIrcMessage& m) return *this; } -CIrcMessage& CIrcMessage::operator = (const wchar_t* lpszCmdLine) +CIrcMessage& CIrcMessage::operator=(const wchar_t* lpszCmdLine) { Reset(); ParseIrcCommand(lpszCmdLine); diff --git a/protocols/IRCG/src/irclib.h b/protocols/IRCG/src/irclib.h index dcb6fccf00..7677956762 100644 --- a/protocols/IRCG/src/irclib.h +++ b/protocols/IRCG/src/irclib.h @@ -81,8 +81,8 @@ public : void Reset();
- CIrcMessage& operator = (const CIrcMessage& m);
- CIrcMessage& operator = (const wchar_t* lpszCmdLine);
+ CIrcMessage& operator=(const CIrcMessage& m);
+ CIrcMessage& operator=(const wchar_t* lpszCmdLine);
private :
void ParseIrcCommand(const wchar_t* lpszCmdLine);
diff --git a/protocols/SkypeWeb/src/http_request.h b/protocols/SkypeWeb/src/http_request.h index 65bafa00fd..7b67fe44c6 100644 --- a/protocols/SkypeWeb/src/http_request.h +++ b/protocols/SkypeWeb/src/http_request.h @@ -58,17 +58,15 @@ struct FORMAT_VALUE : public VALUE }
};
-class HttpRequest : public NETLIBHTTPREQUEST, public MZeroedObject
+class HttpRequest : public NETLIBHTTPREQUEST, public MZeroedObject, private MNonCopyable
{
- HttpRequest& operator=(const HttpRequest&); // to prevent copying;
-
va_list formatArgs;
CMStringA url;
protected:
enum HttpRequestUrlFormat { FORMAT };
- class HttpRequestUrl
+ class HttpRequestUrl : private MNonCopyable
{
friend HttpRequest;
@@ -87,8 +85,6 @@ protected: request.szUrl = request.url.GetBuffer();
}
- HttpRequestUrl& operator=(const HttpRequestUrl&); // to prevent copying;
-
public:
HttpRequestUrl &operator<<(const VALUE ¶m)
{
@@ -120,10 +116,8 @@ protected: }
};
- class HttpRequestHeaders
+ class HttpRequestHeaders : private MNonCopyable
{
- HttpRequestHeaders& operator=(const HttpRequestHeaders&); // to prevent copying;
-
HttpRequest &request;
void Add(LPCSTR szName)
diff --git a/protocols/Steam/src/http_request.h b/protocols/Steam/src/http_request.h index 64849f2983..3d87defe43 100644 --- a/protocols/Steam/src/http_request.h +++ b/protocols/Steam/src/http_request.h @@ -4,7 +4,7 @@ class HttpRequest; class HttpResponse; -class HttpUri +class HttpUri : private MNonCopyable { friend class HttpRequest; @@ -53,8 +53,6 @@ private: } public: - HttpUri& operator=(const HttpUri&); // to prevent copying; - operator const char*() const { return m_request @@ -87,7 +85,7 @@ public: } }; -class HttpHeaders +class HttpHeaders : private MNonCopyable { friend class HttpContent; friend class HttpRequest; @@ -119,8 +117,6 @@ private: } public: - HttpHeaders& operator=(const HttpHeaders&); // to prevent copying; - const NETLIBHTTPHEADER* operator[](size_t idx) const { return m_request @@ -158,7 +154,7 @@ public: } }; -class HttpContent +class HttpContent : private MNonCopyable { friend class HttpRequest; friend class HttpResponse; @@ -182,8 +178,6 @@ protected: } public: - HttpContent& operator=(const HttpContent&); // to prevent copying; - operator bool() const { return m_request && m_request->pData && m_request->dataLength; diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index b449c2a281..e85f2d2561 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -387,9 +387,7 @@ ProtoGetAvatarFormatByMimeType @400 ProtoGetAvatarMimeType @401
?set_uin@DB_AUTH_BLOB@@QAEXK@Z @402 NONAME
??0CSrmmBaseDialog@@IAE@PAUHINSTANCE__@@HPAUSESSION_INFO@@@Z @403 NONAME
-??0CSrmmBaseDialog@@AAE@ABV0@@Z @404 NONAME
??1CSrmmBaseDialog@@UAE@XZ @405 NONAME
-??4CSrmmBaseDialog@@AAEAAV0@ABV0@@Z @406 NONAME
??_7CSrmmBaseDialog@@6B@ @407 NONAME
?DlgProc@CSrmmBaseDialog@@MAEHIIJ@Z @408 NONAME
??2CSrmmBaseDialog@@SAPAXI@Z @409 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index bd05a3184e..62f9fe8672 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -387,9 +387,7 @@ ProtoGetAvatarFormatByMimeType @400 ProtoGetAvatarMimeType @401
?set_uin@DB_AUTH_BLOB@@QEAAXK@Z @402 NONAME
??0CSrmmBaseDialog@@IEAA@PEAUHINSTANCE__@@HPEAUSESSION_INFO@@@Z @403 NONAME
-??0CSrmmBaseDialog@@AEAA@AEBV0@@Z @404 NONAME
??1CSrmmBaseDialog@@UEAA@XZ @405 NONAME
-??4CSrmmBaseDialog@@AEAAAEAV0@AEBV0@@Z @406 NONAME
??_7CSrmmBaseDialog@@6B@ @407 NONAME
?DlgProc@CSrmmBaseDialog@@MEAA_JI_K_J@Z @408 NONAME
??2CSrmmBaseDialog@@SAPEAX_K@Z @409 NONAME
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index 22ca38c0a0..b370c80072 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -385,7 +385,7 @@ class COptionsDlg : public CDlgBase CCtrlCombo m_keywordFilter;
CCtrlButton m_btnApply, m_btnCancel;
- COptionsDlg& operator=(const COptionsDlg&);
+ COptionsDlg& operator=(const COptionsDlg&) = delete;
HTREEITEM FindNamedTreeItem(HTREEITEM hParent, const wchar_t *name)
{
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index 0275fb1c04..76d653ad52 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -28,8 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "skin.h" #include <m_history.h> -CSrmmBaseDialog::CSrmmBaseDialog(HINSTANCE hInst, int idDialog, SESSION_INFO *si) - : CDlgBase(hInst, idDialog), +CSrmmBaseDialog::CSrmmBaseDialog(HINSTANCE hInst, int idDialog, SESSION_INFO *si) : + CDlgBase(hInst, idDialog), m_log(this, IDC_SRMM_LOG), m_message(this, IDC_SRMM_MESSAGE), m_nickList(this, IDC_SRMM_NICKLIST), @@ -80,20 +80,6 @@ CSrmmBaseDialog::CSrmmBaseDialog(HINSTANCE hInst, int idDialog, SESSION_INFO *si } } -CSrmmBaseDialog::CSrmmBaseDialog(const CSrmmBaseDialog&) : - CDlgBase(nullptr, 0), - m_btnColor(nullptr, 0), m_btnBkColor(nullptr, 0), - m_btnBold(nullptr, 0), m_btnItalic(nullptr, 0), m_btnUnderline(nullptr, 0), - m_btnFilter(nullptr, 0), m_btnChannelMgr(nullptr, 0), m_btnHistory(nullptr, 0), m_btnNickList(nullptr, 0), - m_nickList(nullptr, 0), m_log(nullptr, 0), m_message(nullptr, 0) -{ -} - -CSrmmBaseDialog& CSrmmBaseDialog::operator=(const CSrmmBaseDialog&) -{ - return *this; -} - void CSrmmBaseDialog::RunUserMenu(HWND hwndOwner, USERINFO *ui, const POINT &pt) { USERINFO uinew; diff --git a/src/mir_app/src/xmlParser.cpp b/src/mir_app/src/xmlParser.cpp index 26add898ee..fbacef5451 100644 --- a/src/mir_app/src/xmlParser.cpp +++ b/src/mir_app/src/xmlParser.cpp @@ -2260,7 +2260,7 @@ void XMLNode::invalidateInnerText() d->pInnerText = nullptr; } -XMLNode& XMLNode::operator = (const XMLNode& A) +XMLNode& XMLNode::operator=(const XMLNode& A) { // shallow copy if (this != &A) diff --git a/src/mir_app/src/xmlParser.h b/src/mir_app/src/xmlParser.h index eeeabf7d0a..0f1e477fe9 100644 --- a/src/mir_app/src/xmlParser.h +++ b/src/mir_app/src/xmlParser.h @@ -317,7 +317,7 @@ public: ~XMLNode();
XMLNode(const XMLNode &A); ///< to allow shallow/fast copy:
- XMLNode& operator = (const XMLNode& A); ///< to allow shallow/fast copy:
+ XMLNode& operator=(const XMLNode& A); ///< to allow shallow/fast copy:
XMLNode(): d(nullptr) {};
static XMLNode emptyXMLNode;
|