diff options
| author | 2020-02-04 12:26:25 +0000 | |
|---|---|---|
| committer | 2020-02-04 12:26:25 +0000 | |
| commit | 6da4987073aad99061360bc54022e342e3a0f555 (patch) | |
| tree | d4e8cca5270013eed9915fe740f346cd6890a7c4 /src/inspircd.cpp | |
| parent | Various CI improvements. (diff) | |
| parent | Include the ABI version with the incompatible module error message. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/inspircd.cpp')
| -rw-r--r-- | src/inspircd.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 8331a3c0e..06172f251 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -36,7 +36,6 @@ #ifndef _WIN32 #include <unistd.h> #include <sys/resource.h> - #include <dlfcn.h> #include <getopt.h> #include <pwd.h> // setuid #include <grp.h> // setgid @@ -136,15 +135,6 @@ namespace #endif } - // Deletes a pointer and then zeroes it. - template<typename T> - void DeleteZero(T*& pr) - { - T* p = pr; - pr = NULL; - delete p; - } - // Drops to the unprivileged user/group specified in <security:runas{user,group}>. void DropRoot() { @@ -423,9 +413,9 @@ void InspIRCd::Cleanup() delete FakeClient->server; FakeClient->cull(); } - DeleteZero(this->FakeClient); - DeleteZero(this->XLines); - DeleteZero(this->Config); + stdalgo::delete_zero(this->FakeClient); + stdalgo::delete_zero(this->XLines); + stdalgo::delete_zero(this->Config); SocketEngine::Deinit(); Logs.CloseLogs(); } @@ -658,7 +648,7 @@ void InspIRCd::Run() /* Rehash has completed */ this->Logs.Log("CONFIG", LOG_DEBUG, "New configuration has been read, applying..."); ConfigThread->Stop(); - DeleteZero(ConfigThread); + stdalgo::delete_zero(ConfigThread); } UpdateTime(); |
