From 648f813f8c89e6e7d0ed5bda2c2149bee2babb09 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 22 Jul 2022 18:33:38 +0100 Subject: Switch from NULL to nullptr. --- src/modules.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/modules.cpp') diff --git a/src/modules.cpp b/src/modules.cpp index ee2439fdc..dcba5bcb8 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -41,7 +41,7 @@ // Needs to be included after inspircd.h to avoid reincluding winsock. #include -static insp::intrusive_list* dynrefs = NULL; +static insp::intrusive_list* dynrefs = nullptr; void dynamic_reference_base::reset_all() { @@ -548,8 +548,8 @@ void ModuleManager::LoadAll() } } - this->NewServices = NULL; - ConfigStatus confstatus(NULL, true); + this->NewServices = nullptr; + ConfigStatus confstatus(nullptr, true); // Step 3: Read the configuration for the modules. This must be done as part of // its own step so that services provided by modules can be registered before @@ -648,7 +648,7 @@ ServiceProvider* ModuleManager::FindService(ServiceType type, const std::string& DataProviderMap::iterator i = DataProviders.find(name); if (i != DataProviders.end() && i->second->service == type) return i->second; - return NULL; + return nullptr; } // TODO implement finding of the other types default: @@ -695,7 +695,7 @@ dynamic_reference_base::~dynamic_reference_base() if (dynrefs->empty()) { delete dynrefs; - dynrefs = NULL; + dynrefs = nullptr; } } @@ -721,7 +721,7 @@ void dynamic_reference_base::resolve() } } else - value = NULL; + value = nullptr; } Module* ModuleManager::Find(const std::string &name) @@ -729,7 +729,7 @@ Module* ModuleManager::Find(const std::string &name) std::map::const_iterator modfind = Modules.find(ExpandModName(name)); if (modfind == Modules.end()) - return NULL; + return nullptr; else return modfind->second; } -- cgit v1.3.1-10-gc9f91