Merge pull request #888 from jpnurmi/weffc++

Fix copy ctor/assignment oper warnings of -Weffc++ (#270)
This commit is contained in:
Alexey Sokolov
2015-02-24 21:16:04 -08:00
12 changed files with 54 additions and 0 deletions
+3
View File
@@ -59,6 +59,9 @@ public:
CChan(const CString& sName, CIRCNetwork* pNetwork, bool bInConfig, CConfig *pConfig = NULL);
~CChan();
CChan(const CChan&) = delete;
CChan& operator=(const CChan&) = delete;
void Reset();
CConfig ToConfig() const;
void Clone(CChan& chan);
+9
View File
@@ -39,6 +39,9 @@ public:
virtual ~CAuthBase() {}
CAuthBase(const CAuthBase&) = delete;
CAuthBase& operator=(const CAuthBase&) = delete;
virtual void SetLoginInfo(const CString& sUsername, const CString& sPassword,
CZNCSock* pSock) {
m_sUsername = sUsername;
@@ -74,6 +77,9 @@ public:
CClientAuth(CClient* pClient, const CString& sUsername, const CString& sPassword);
virtual ~CClientAuth() {}
CClientAuth(const CClientAuth&) = delete;
CClientAuth& operator=(const CClientAuth&) = delete;
void Invalidate() { m_pClient = NULL; CAuthBase::Invalidate(); }
void AcceptedLogin(CUser& User);
void RefusedLogin(const CString& sReason);
@@ -108,6 +114,9 @@ public:
virtual ~CClient();
CClient(const CClient&) = delete;
CClient& operator=(const CClient&) = delete;
void SendRequiredPasswordNotice();
void AcceptLogin(CUser& User);
void RefuseLogin(const CString& sReason);
+3
View File
@@ -44,6 +44,9 @@ public:
CIRCNetwork(CUser *pUser, const CIRCNetwork& Network);
~CIRCNetwork();
CIRCNetwork(const CIRCNetwork&) = delete;
CIRCNetwork& operator=(const CIRCNetwork&) = delete;
enum {
JOIN_FREQUENCY = 30,
/** How long must an IRC connection be idle before ZNC sends a ping */
+3
View File
@@ -36,6 +36,9 @@ public:
CIRCSock(CIRCNetwork* pNetwork);
virtual ~CIRCSock();
CIRCSock(const CIRCSock&) = delete;
CIRCSock& operator=(const CIRCSock&) = delete;
typedef enum {
// These values must line up with their position in the CHANMODE argument to raw 005
ListArg = 0,
+3
View File
@@ -44,6 +44,9 @@ public:
~CListener();
CListener(const CListener&) = delete;
CListener& operator=(const CListener&) = delete;
// Getters
bool IsSSL() const { return m_bSSL; }
EAddrType GetAddrType() const { return m_eAddr; }
+12
View File
@@ -142,6 +142,9 @@ public:
virtual ~CTimer();
CTimer(const CTimer&) = delete;
CTimer& operator=(const CTimer&) = delete;
// Setters
void SetModule(CModule* p);
void SetDescription(const CString& s);
@@ -191,6 +194,9 @@ public:
}
virtual ~CModuleJob();
CModuleJob(const CModuleJob&) = delete;
CModuleJob& operator=(const CModuleJob&) = delete;
// Getters
CModule* GetModule() const { return m_pModule; }
const CString& GetName() const { return m_sName; }
@@ -354,6 +360,9 @@ public:
const CString& sDataDir);
virtual ~CModule();
CModule(const CModule&) = delete;
CModule& operator=(const CModule&) = delete;
/** This enum is just used for return from module hooks. Based on this
* return, ZNC then decides what to do with the event which caused the
* module hook.
@@ -1127,6 +1136,9 @@ public:
CModules();
~CModules();
CModules(const CModules&) = default;
CModules& operator=(const CModules&) = default;
void SetUser(CUser* pUser) { m_pUser = pUser; }
void SetNetwork(CIRCNetwork* pNetwork) { m_pNetwork = pNetwork; }
void SetClient(CClient* pClient) { m_pClient = pClient; }
+3
View File
@@ -33,6 +33,9 @@ public:
CNick(const CString& sNick);
~CNick();
CNick(const CNick&) = default;
CNick& operator=(const CNick&) = default;
void Reset();
void Parse(const CString& sNickMask);
CString GetHostMask() const;
+3
View File
@@ -197,6 +197,9 @@ public:
CSocket(CModule* pModule, const CString& sHostname, unsigned short uPort, int iTimeout = 60);
virtual ~CSocket();
CSocket(const CSocket&) = delete;
CSocket& operator=(const CSocket&) = delete;
using Csock::Connect;
using Csock::Listen;
+6
View File
@@ -83,6 +83,9 @@ public:
virtual ~CTemplateLoopContext() {}
CTemplateLoopContext(const CTemplateLoopContext&) = default;
CTemplateLoopContext& operator=(const CTemplateLoopContext&) = default;
// Setters
void SetHasData(bool b = true) { m_bHasData = b; }
void SetName(const CString& s) { m_sName = s; }
@@ -132,6 +135,9 @@ public:
virtual ~CTemplate();
CTemplate(const CTemplate& other) = default;
CTemplate& operator=(const CTemplate& other) = default;
//! Class for implementing custom tags in subclasses
void AddTagHandler(std::shared_ptr<CTemplateTagHandler> spTagHandler) {
m_vspTagHandlers.push_back(spTagHandler);
+3
View File
@@ -39,6 +39,9 @@ public:
CUser(const CString& sUserName);
~CUser();
CUser(const CUser&) = delete;
CUser& operator=(const CUser&) = delete;
bool ParseConfig(CConfig* Config, CString& sError);
// TODO refactor this
+3
View File
@@ -47,6 +47,9 @@ public:
CWebSession(const CString& sId, const CString& sIP);
~CWebSession();
CWebSession(const CWebSession&) = delete;
CWebSession& operator=(const CWebSession&) = delete;
const CString& GetId() const { return m_sId; }
const CString& GetIP() const { return m_sIP; }
CUser* GetUser() const { return m_pUser; }
+3
View File
@@ -37,6 +37,9 @@ public:
CZNC();
~CZNC();
CZNC(const CZNC&) = delete;
CZNC& operator=(const CZNC&) = delete;
enum ConfigState {
ECONFIG_NOTHING,
ECONFIG_NEED_REHASH,