mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 14:27:45 +00:00
Retire PieceValueXXX[] getters
They don't add any value given that the corresponding table has global visibility anyhow. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+4
-4
@@ -284,7 +284,7 @@ namespace {
|
||||
if ( captureOrPromotion
|
||||
&& type_of(pos.piece_on(move_to(m))) != PAWN
|
||||
&& ( pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK)
|
||||
- piece_value_midgame(pos.piece_on(move_to(m))) == VALUE_ZERO)
|
||||
- PieceValueMidgame[pos.piece_on(move_to(m))] == VALUE_ZERO)
|
||||
&& !is_special(m))
|
||||
{
|
||||
result += PawnEndgameExtension[PvNode];
|
||||
@@ -1399,7 +1399,7 @@ split_point_start: // At split points actual search starts from here
|
||||
&& !pos.is_passed_pawn_push(move))
|
||||
{
|
||||
futilityValue = futilityBase
|
||||
+ piece_value_endgame(pos.piece_on(move_to(move)))
|
||||
+ PieceValueEndgame[pos.piece_on(move_to(move))]
|
||||
+ (is_enpassant(move) ? PawnValueEndgame : VALUE_ZERO);
|
||||
|
||||
if (futilityValue < beta)
|
||||
@@ -1532,7 +1532,7 @@ split_point_start: // At split points actual search starts from here
|
||||
while (b)
|
||||
{
|
||||
victimSq = pop_1st_bit(&b);
|
||||
futilityValue = futilityBase + piece_value_endgame(pos.piece_on(victimSq));
|
||||
futilityValue = futilityBase + PieceValueEndgame[pos.piece_on(victimSq)];
|
||||
|
||||
// Note that here we generate illegal "double move"!
|
||||
if ( futilityValue >= beta
|
||||
@@ -1656,7 +1656,7 @@ split_point_start: // At split points actual search starts from here
|
||||
// Case 2: If the threatened piece has value less than or equal to the
|
||||
// value of the threatening piece, don't prune moves which defend it.
|
||||
if ( pos.is_capture(threat)
|
||||
&& ( piece_value_midgame(pos.piece_on(tfrom)) >= piece_value_midgame(pos.piece_on(tto))
|
||||
&& ( PieceValueMidgame[pos.piece_on(tfrom)] >= PieceValueMidgame[pos.piece_on(tto)]
|
||||
|| type_of(pos.piece_on(tfrom)) == KING)
|
||||
&& pos.move_attacks_square(m, tto))
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user