From b6fccd1052cfcf7d624eed0c4bdbc31fe3d841df Mon Sep 17 00:00:00 2001 From: ChrisTX Date: Thu, 4 Oct 2012 08:31:38 +0200 Subject: Windows: Replace the unused function hack with explicit instantiation --- win/inspircd_win32wrapper.cpp | 45 ++++--------------------------------------- 1 file changed, 4 insertions(+), 41 deletions(-) diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp index 831cd311f..216364937 100644 --- a/win/inspircd_win32wrapper.cpp +++ b/win/inspircd_win32wrapper.cpp @@ -733,44 +733,7 @@ int gettimeofday(timeval *tv, void *) /* World's largest hack to make reference<> work */ #include "../src/modules/m_spanningtree/link.h" #include "../src/modules/ssl.h" -static void unused_function() -{ - reference unused_Link; - reference unused_Autoconnect; - reference unused_Cert; - reference unused_OperInfo; - - if (unused_Link) - unused_Link->Port = -1; - if (unused_Autoconnect) - unused_Autoconnect->NextConnectTime = -1; - if (unused_Cert) - unused_Cert->dn = ""; - if (unused_OperInfo) - unused_OperInfo->name = ""; - - Autoconnect *a = unused_Autoconnect; - Link *l = unused_Link; - ssl_cert *s = unused_Cert; - OperInfo *o = unused_OperInfo; - - unused_Link = reference(unused_Link); - unused_Autoconnect = reference(unused_Autoconnect); - unused_Cert = reference(unused_Cert); - unused_OperInfo = reference(unused_OperInfo); - - unused_Link = reference(l); - unused_Autoconnect = reference(a); - unused_Cert = reference(s); - unused_OperInfo = reference(o); - - unused_Link = l; - unused_Autoconnect = a; - unused_Cert = s; - unused_OperInfo = o; - - delete unused_Link; - delete unused_Autoconnect; - delete unused_Cert; - delete unused_OperInfo; -} +template class reference; +template class reference; +template class reference; +template class reference; -- cgit v1.2.3