diff --git a/Laptop/FacilityProduction.cpp b/Laptop/FacilityProduction.cpp index e195b14ed..7dbac7864 100644 --- a/Laptop/FacilityProduction.cpp +++ b/Laptop/FacilityProduction.cpp @@ -18,6 +18,11 @@ #include "strategic.h" #include "BaseTable.h" +// Every member below is specialised for each table, and nothing else defines them. +// The specialisations have to be visible before the first use instantiates one. +template<> void TestTableTemplate<4>::SetRefresh(); +template<> void TestTableTemplate<4>::Init( UINT16 sX, UINT16 sY, UINT16 sX_End, UINT16 sY_End ); + /*#define MERCOMP_FONT_COLOR 2 #define CAMPHIS_FONT_BIG FONT14ARIAL #define CAMPHIS_FONT_MED FONT12ARIAL diff --git a/Laptop/MilitiaWebsite.cpp b/Laptop/MilitiaWebsite.cpp index 96e093d0a..ff72c023e 100644 --- a/Laptop/MilitiaWebsite.cpp +++ b/Laptop/MilitiaWebsite.cpp @@ -46,6 +46,15 @@ #include "InterfaceItemImages.h" #include "CampaignStats.h" +// Every member below is specialised for each table, and nothing else defines them. +// The specialisations have to be visible before the first use instantiates one. +template<> void TestTableTemplate<1>::SetRefresh(); +template<> void TestTableTemplate<1>::Init( UINT16 sX, UINT16 sY, UINT16 sX_End, UINT16 sY_End ); +template<> void TestTableTemplate<2>::SetRefresh(); +template<> void TestTableTemplate<2>::Init( UINT16 sX, UINT16 sY, UINT16 sX_End, UINT16 sY_End ); +template<> void TestTableTemplate<3>::SetRefresh(); +template<> void TestTableTemplate<3>::Init( UINT16 sX, UINT16 sY, UINT16 sX_End, UINT16 sY_End ); + #define MERCOMP_FONT_COLOR 2 #define CAMPHIS_FONT_COLOR_RED FONT_MCOLOR_RED