From e7095999dfc66c3577c0c04da4e8d4b2ece4910e Mon Sep 17 00:00:00 2001 From: "Marco Antonio J. Costa" Date: Wed, 22 Jul 2026 11:51:27 -0300 Subject: [PATCH] delete four out-of-line declarations that repeat the class body Each of these says again, outside the class, what the class already declares: template void TestTableTemplate::SetRefresh(); SetRefresh and Init are declared as members a few dozen lines above, so these add nothing. A member named out of line has to be a definition; MSVC lets the declaration through, clang does not. None of the three templates ever defines these members generically. Every instantiation supplies its own, as an explicit specialization next to the screen that uses it, and those are untouched: template<> void DropDownTemplate::SetRefresh() { gfIMPPrejudice_Redraw = TRUE; } The mpSelf lines that follow each of these look similar but are definitions of a static data member, so they stay. Verification: grep -rn 'Template::' --include=*.h Laptop/ # only mpSelf definitions ninja -C build parse # out-of-line class gone: 28 -> 24 sites ninja -C build -k 0 # Release, four applications, green ninja -C build-debug -k 0 # Debug, four applications, green Co-Authored-By: Claude Opus 4.8 --- Laptop/BaseTable.h | 9 --------- Laptop/DropDown.h | 3 --- 2 files changed, 12 deletions(-) diff --git a/Laptop/BaseTable.h b/Laptop/BaseTable.h index 933bba7a0..d76fdc746 100644 --- a/Laptop/BaseTable.h +++ b/Laptop/BaseTable.h @@ -448,12 +448,6 @@ private: void operator=(TestTableTemplate const&); }; -template -void TestTableTemplate::SetRefresh(); - -template -void TestTableTemplate::Init( UINT16 sX, UINT16 sY, UINT16 sX_End, UINT16 sY_End ); - template void* TestTableTemplate::mpSelf = NULL; @@ -520,9 +514,6 @@ private: void operator=(TabBoxTemplate const&); }; -template -void TabBoxTemplate::SetRefresh( ); - template void* TabBoxTemplate::mpSelf = NULL; diff --git a/Laptop/DropDown.h b/Laptop/DropDown.h index dd5e36de1..c1848b9f9 100644 --- a/Laptop/DropDown.h +++ b/Laptop/DropDown.h @@ -417,9 +417,6 @@ private: void operator=(DropDownTemplate const&); }; -template -void DropDownTemplate::SetRefresh(); - template void* DropDownTemplate::mpSelf = NULL;