mirror of
https://github.com/znc/znc.git
synced 2026-05-06 21:42:28 +02:00
const correctness fixes
This commit is contained in:
10
src/User.cpp
10
src/User.cpp
@@ -859,7 +859,7 @@ bool CUser::IsValid(CString& sErrMsg, bool bSkipPass) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
CConfig CUser::ToConfig() {
|
||||
CConfig CUser::ToConfig() const {
|
||||
CConfig config;
|
||||
CConfig passConfig;
|
||||
|
||||
@@ -923,7 +923,7 @@ CConfig CUser::ToConfig() {
|
||||
}
|
||||
|
||||
// Modules
|
||||
CModules& Mods = GetModules();
|
||||
const CModules& Mods = GetModules();
|
||||
|
||||
if (!Mods.empty()) {
|
||||
for (unsigned int a = 0; a < Mods.size(); a++) {
|
||||
@@ -976,11 +976,11 @@ bool CUser::CheckPass(const CString& sPass) const {
|
||||
return (CClient*) CZNC::Get().GetManager().FindSockByName(sSockName);
|
||||
}*/
|
||||
|
||||
CString CUser::GetLocalDCCIP() {
|
||||
CString CUser::GetLocalDCCIP() const {
|
||||
if (!GetDCCBindHost().empty())
|
||||
return GetDCCBindHost();
|
||||
|
||||
for (vector<CIRCNetwork*>::iterator it = m_vIRCNetworks.begin(); it != m_vIRCNetworks.end(); ++it) {
|
||||
for (vector<CIRCNetwork*>::const_iterator it = m_vIRCNetworks.begin(); it != m_vIRCNetworks.end(); ++it) {
|
||||
CIRCNetwork *pNetwork = *it;
|
||||
CIRCSock* pIRCSock = pNetwork->GetIRCSock();
|
||||
if (pIRCSock) {
|
||||
@@ -1167,7 +1167,7 @@ bool CUser::SetStatusPrefix(const CString& s) {
|
||||
// !Setters
|
||||
|
||||
// Getters
|
||||
vector<CClient*> CUser::GetAllClients() {
|
||||
vector<CClient*> CUser::GetAllClients() const {
|
||||
vector<CClient*> vClients;
|
||||
|
||||
for (unsigned int a = 0; a < m_vIRCNetworks.size(); a++) {
|
||||
|
||||
Reference in New Issue
Block a user