]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Move various static functions into an anonymous namespace.
authorPeter Powell <petpow@saberuk.com>
Sun, 8 Dec 2019 18:44:27 +0000 (18:44 +0000)
committerPeter Powell <petpow@saberuk.com>
Sun, 8 Dec 2019 18:51:52 +0000 (18:51 +0000)
src/inspircd.cpp

index 4f4c0be86d39dbe4552c91eec48ff26636f3ee49..3ce5e553f0d094337ec703b095a0c1e140b8b3c5 100644 (file)
@@ -76,11 +76,22 @@ const char* ExitCodes[] =
                "Received SIGTERM"                                              // 10
 };
 
-template<typename T> static void DeleteZero(T*&n)
+namespace
 {
-       T* t = n;
-       n = NULL;
-       delete t;
+       // Deletes a pointer and then zeroes it.
+       template<typename T>
+       void DeleteZero(T*& pr)
+       {
+               T* p = pr;
+               pr = NULL;
+               delete p;
+       }
+
+       // Required for returning the proper value of EXIT_SUCCESS for the parent process.
+       void VoidSignalHandler(int)
+       {
+               exit(EXIT_STATUS_NOERROR);
+       }
 }
 
 void InspIRCd::Cleanup()
@@ -133,12 +144,6 @@ void InspIRCd::SetSignals()
        signal(SIGTERM, InspIRCd::SetSignal);
 }
 
-// Required for returning the proper value of EXIT_SUCCESS for the parent process
-static void VoidSignalHandler(int signalreceived)
-{
-       exit(EXIT_STATUS_NOERROR);
-}
-
 bool InspIRCd::DaemonSeed()
 {
 #ifdef _WIN32