From 859088dac5b937208c7aff7fd3976bbc63329281 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 22 Oct 2022 20:45:22 +0100 Subject: More const correctness. --- src/modules.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules.cpp') diff --git a/src/modules.cpp b/src/modules.cpp index 308bbac0e..f30a980d8 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -213,13 +213,13 @@ bool ModuleManager::Detach(Implementation i, Module* mod) return stdalgo::erase(EventHandlers[i], mod); } -void ModuleManager::Attach(Implementation* i, Module* mod, size_t sz) +void ModuleManager::Attach(const Implementation* i, Module* mod, size_t sz) { for (size_t n = 0; n < sz; ++n) Attach(i[n], mod); } -void ModuleManager::Detach(Implementation* i, Module* mod, size_t sz) +void ModuleManager::Detach(const Implementation* i, Module* mod, size_t sz) { for (size_t n = 0; n < sz; ++n) Detach(i[n], mod); @@ -534,7 +534,7 @@ void ModuleManager::LoadAll() AddServices(servicemap[modname]); mod->init(); } - catch (CoreException& modexcept) + catch (const CoreException& modexcept) { LastModuleError = "Unable to initialize " + modname + ": " + modexcept.GetReason(); ServerInstance->Logs.Normal("MODULE", LastModuleError); @@ -556,7 +556,7 @@ void ModuleManager::LoadAll() ServerInstance->Logs.Debug("MODULE", "Reading configuration for %s", modname.c_str()); mod->ReadConfig(confstatus); } - catch (CoreException& modexcept) + catch (const CoreException& modexcept) { LastModuleError = "Unable to read the configuration for " + modname + ": " + modexcept.GetReason(); ServerInstance->Logs.Normal("MODULE", LastModuleError); -- cgit v1.3.1-10-gc9f91