mirror of
https://github.com/znc/znc.git
synced 2026-05-01 11:02:27 +02:00
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:
6
User.cpp
6
User.cpp
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user