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<T>. 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
This commit is contained in:
tobi437a
2026-05-19 18:42:17 +02:00
committed by Joost VandeVondele
parent 94984fe5cb
commit 133731f331
2 changed files with 2 additions and 13 deletions
+1
View File
@@ -254,6 +254,7 @@ theo77186
TierynnB
Timothy Herchen (anematode)
Ting-Hsuan Huang (fffelix-huang)
tobi437a
Tobias Steinmann
Tomasz Sobczyk (Sopel97)
Tom Truscott
+1 -13
View File
@@ -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<CorrHistType>
struct CorrHistTypedef {
using type =
DynStats<Stats<std::int16_t, CORRECTION_HISTORY_LIMIT, COLOR_NB>, CORRHIST_BASE_SIZE>;
};
struct CorrHistTypedef;
template<>
struct CorrHistTypedef<PieceTo> {
@@ -198,12 +192,6 @@ struct CorrHistTypedef<Continuation> {
using type = MultiArray<CorrHistTypedef<PieceTo>::type, PIECE_NB, SQUARE_NB>;
};
template<>
struct CorrHistTypedef<NonPawn> {
using type = DynStats<Stats<std::int16_t, CORRECTION_HISTORY_LIMIT, COLOR_NB, COLOR_NB>,
CORRHIST_BASE_SIZE>;
};
}
using UnifiedCorrectionHistory =