Remove CModule::m_bGlobal

This one is partly due to cppcheck, too, because it warned that one of CModule's
constructors didn't initialize m_bGlobal.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1765 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-02-18 12:51:59 +00:00
parent 7999cacf1c
commit b7450b0b21
3 changed files with 1 additions and 6 deletions
-2
View File
@@ -105,7 +105,6 @@ const CString& CTimer::GetDescription() const { return m_sDescription; }
CModule::CModule(ModHandle pDLL, CUser* pUser, const CString& sModName, const CString& sDataDir) {
m_bFake = false;
m_bGlobal = false;
m_pDLL = pDLL;
m_pManager = &(CZNC::Get().GetManager());;
m_pUser = pUser;
@@ -699,7 +698,6 @@ bool CModules::LoadModule(const CString& sModule, const CString& sArgs, CUser* p
}
pModule->SetDescription(sDesc);
pModule->SetGlobal(bIsGlobal);
pModule->SetArgs(sArgs);
push_back(pModule);
-3
View File
@@ -678,14 +678,12 @@ public:
// Setters
void SetFake(bool b) { m_bFake = b; }
void SetGlobal(bool b) { m_bGlobal = b; }
void SetDescription(const CString& s) { m_sDescription = s; }
void SetArgs(const CString& s) { m_sArgs = s; }
// !Setters
// Getters
bool IsFake() const { return m_bFake; }
bool IsGlobal() const { return m_bGlobal; }
const CString& GetDescription() const { return m_sDescription; }
const CString& GetArgs() const { return m_sArgs; }
@@ -704,7 +702,6 @@ public:
protected:
bool m_bFake;
bool m_bGlobal;
CString m_sDescription;
set<CTimer*> m_sTimers;
set<CSocket*> m_sSockets;
+1 -1
View File
@@ -50,7 +50,7 @@ CSocket::~CSocket() {
m_pModule->UnlinkSocket(this);
if (!m_pModule->IsGlobal() && pUser) {
if (pUser) {
pUser->AddBytesWritten(GetBytesWritten());
pUser->AddBytesRead(GetBytesRead());
} else {