Modules: use public API

Avoid accessing protected member variables directly, so
there's a chance of cleaning up the module API later.
This commit is contained in:
J-P Nurmi
2014-10-06 19:18:31 +02:00
parent d9ae3fa7c8
commit 1bacec1dd3
40 changed files with 291 additions and 270 deletions

View File

@@ -25,8 +25,9 @@ public:
MODCONSTRUCTOR(CClearBufferOnMsgMod) {}
void ClearAllBuffers() {
if (m_pNetwork) {
const vector<CChan*>& vChans = m_pNetwork->GetChans();
CIRCNetwork* pNetwork = GetNetwork();
if (pNetwork) {
const vector<CChan*>& vChans = pNetwork->GetChans();
for (vector<CChan*>::const_iterator it = vChans.begin(); it != vChans.end(); ++it) {
// Skip detached channels, they weren't read yet
@@ -39,10 +40,10 @@ public:
(*it)->SetAutoClearChanBuffer(false);
}
vector<CQuery*> VQueries = m_pNetwork->GetQueries();
vector<CQuery*> VQueries = pNetwork->GetQueries();
for (vector<CQuery*>::const_iterator it = VQueries.begin(); it != VQueries.end(); ++it) {
m_pNetwork->DelQuery((*it)->GetName());
pNetwork->DelQuery((*it)->GetName());
}
}
}