diff options
| author | 2026-04-04 18:15:30 +0100 | |
|---|---|---|
| committer | 2026-04-04 18:15:30 +0100 | |
| commit | ab48b941f222dcedb7e169c054a102005e1af03c (patch) | |
| tree | a481c70d1ae3073b1bc192e32e12010df20a2cc2 /src/extensible.cpp | |
| parent | Pass a server reference to OnRouteMessage. (diff) | |
Add insp::find_value, insp::to_ptr and switch code to use them.
Diffstat (limited to 'src/extensible.cpp')
| -rw-r--r-- | src/extensible.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/extensible.cpp b/src/extensible.cpp index 0e28799b8..40af97236 100644 --- a/src/extensible.cpp +++ b/src/extensible.cpp @@ -19,6 +19,7 @@ #include "inspircd.h" #include "extension.h" +#include "utility/container.h" namespace { @@ -59,11 +60,7 @@ void ExtensionManager::BeginUnregister(const ModulePtr& module, std::vector<Exte ExtensionItem* ExtensionManager::GetItem(const std::string& name) { - ExtMap::iterator iter = types.find(name); - if (iter == types.end()) - return nullptr; - - return iter->second; + return insp::find_value(types, name); } Extensible::Extensible(ExtensionType exttype) |
