Mark some functions as const

Thanks to vBm for running cppcheck against znc and sharing the results.
This should fix all the "foo can be const" messages.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2081 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-07-10 07:51:35 +00:00
parent 6d33c5702b
commit 86f3d7c745
6 changed files with 35 additions and 35 deletions

View File

@@ -602,7 +602,7 @@ bool CUser::DelChan(const CString& sName) {
return false;
}
bool CUser::PrintLine(CFile& File, CString sName, CString sValue) {
bool CUser::PrintLine(CFile& File, CString sName, CString sValue) const {
sName.Trim();
sValue.Trim();
@@ -674,7 +674,7 @@ bool CUser::WriteConfig(CFile& File) {
// CTCP Replies
if (!m_mssCTCPReplies.empty()) {
for (MCString::iterator itb = m_mssCTCPReplies.begin(); itb != m_mssCTCPReplies.end(); ++itb) {
for (MCString::const_iterator itb = m_mssCTCPReplies.begin(); itb != m_mssCTCPReplies.end(); ++itb) {
PrintLine(File, "CTCPReply", itb->first.AsUpper() + " " + itb->second);
}
@@ -1177,7 +1177,7 @@ bool CUser::SetBufferCount(unsigned int u, bool bForce) {
return true;
}
void CUser::CheckIRCConnect() {
void CUser::CheckIRCConnect() const {
// Do we want to connect?
if (m_bIRCConnectEnabled && GetIRCSock() == NULL)
CZNC::Get().EnableConnectUser();