diff options
author | Adam <adam@sigterm.info> | 2012-10-03 23:59:56 -0700 |
---|---|---|
committer | Adam <adam@sigterm.info> | 2012-10-03 23:59:56 -0700 |
commit | 6f5414e1bf63228471e078f29a5889f44e598a8c (patch) | |
tree | 91b7822a1e5d149e95739c090c929314aa7ec42d | |
parent | 4f9cc281d5f12ff1fdebc733b641c5e25cb460f9 (diff) | |
parent | b6fccd1052cfcf7d624eed0c4bdbc31fe3d841df (diff) |
Merge pull request #313 from ChrisTX/insp20+explicittemps
Windows: Replace the unused function hack with explicit instantiation
-rw-r--r-- | win/inspircd_win32wrapper.cpp | 45 |
1 files 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<Link> unused_Link; - reference<Autoconnect> unused_Autoconnect; - reference<ssl_cert> unused_Cert; - reference<OperInfo> 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<Link>(unused_Link); - unused_Autoconnect = reference<Autoconnect>(unused_Autoconnect); - unused_Cert = reference<ssl_cert>(unused_Cert); - unused_OperInfo = reference<OperInfo>(unused_OperInfo); - - unused_Link = reference<Link>(l); - unused_Autoconnect = reference<Autoconnect>(a); - unused_Cert = reference<ssl_cert>(s); - unused_OperInfo = reference<OperInfo>(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<Link>; +template class reference<Autoconnect>; +template class reference<ssl_cert>; +template class reference<OperInfo>; |