diff options
| author | 2022-10-22 20:45:22 +0100 | |
|---|---|---|
| committer | 2022-10-23 14:51:33 +0100 | |
| commit | 859088dac5b937208c7aff7fd3976bbc63329281 (patch) | |
| tree | 79b297813d7f2cb13e6967486340912ad72d0477 /src/modules.cpp | |
| parent | Avoid spamming opers with notices when a SQL log provider is down. (diff) | |
More const correctness.
Diffstat (limited to 'src/modules.cpp')
| -rw-r--r-- | src/modules.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); |
