From 133731f33166afcde7fb7a76c41e47c3cddcee8b Mon Sep 17 00:00:00 2001 From: tobi437a Date: Tue, 19 May 2026 18:42:17 +0200 Subject: [PATCH] Simplify away unused CorrHistType variants After the introduction of UnifiedCorrectionHistory, the Pawn, Minor and NonPawn entries in CorrHistType are dead - only PieceTo and Continuation are referenced via CorrectionHistory. Drop them, along with the now unreachable default template and the NonPawn specialization. Reduce the primary CorrHistTypedef template to a forward declaration so that any future stray use of an unsupported tag fails to compile. closes https://github.com/official-stockfish/Stockfish/pull/6828 No functional change --- AUTHORS | 1 + src/history.h | 14 +------------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/AUTHORS b/AUTHORS index b384d442c..da99ea806 100644 --- a/AUTHORS +++ b/AUTHORS @@ -254,6 +254,7 @@ theo77186 TierynnB Timothy Herchen (anematode) Ting-Hsuan Huang (fffelix-huang) +tobi437a Tobias Steinmann Tomasz Sobczyk (Sopel97) Tom Truscott diff --git a/src/history.h b/src/history.h index c98a7ee22..5ef359e0e 100644 --- a/src/history.h +++ b/src/history.h @@ -158,9 +158,6 @@ using PawnHistory = // used by some search heuristics. // see https://www.chessprogramming.org/Static_Evaluation_Correction_History enum CorrHistType { - Pawn, // By color and pawn structure - Minor, // By color and positions of minor pieces (Knight, Bishop) - NonPawn, // By non-pawn material positions and color PieceTo, // By [piece][to] move Continuation, // Combined history of move pairs }; @@ -183,10 +180,7 @@ struct CorrectionBundle { namespace Detail { template -struct CorrHistTypedef { - using type = - DynStats, CORRHIST_BASE_SIZE>; -}; +struct CorrHistTypedef; template<> struct CorrHistTypedef { @@ -198,12 +192,6 @@ struct CorrHistTypedef { using type = MultiArray::type, PIECE_NB, SQUARE_NB>; }; -template<> -struct CorrHistTypedef { - using type = DynStats, - CORRHIST_BASE_SIZE>; -}; - } using UnifiedCorrectionHistory =