mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Minor cleanup in full_threats.cpp
closes https://github.com/official-stockfish/Stockfish/pull/6509 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
5b9259e51f
commit
8815d1ef02
@@ -68,11 +68,11 @@ constexpr auto make_piece_indices_type() {
|
||||
|
||||
std::array<std::array<uint8_t, SQUARE_NB>, SQUARE_NB> out{};
|
||||
|
||||
for (int from = 0; from < SQUARE_NB; ++from)
|
||||
for (Square from = SQ_A1; from <= SQ_H8; ++from)
|
||||
{
|
||||
Bitboard attacks = PseudoAttacks[PT][Square(from)];
|
||||
Bitboard attacks = PseudoAttacks[PT][from];
|
||||
|
||||
for (int to = 0; to < SQUARE_NB; ++to)
|
||||
for (Square to = SQ_A1; to <= SQ_H8; ++to)
|
||||
{
|
||||
out[from][to] = constexpr_popcount(((1ULL << to) - 1) & attacks);
|
||||
}
|
||||
@@ -89,11 +89,11 @@ constexpr auto make_piece_indices_piece() {
|
||||
|
||||
constexpr Color C = color_of(P);
|
||||
|
||||
for (int from = 0; from < SQUARE_NB; ++from)
|
||||
for (Square from = SQ_A1; from <= SQ_H8; ++from)
|
||||
{
|
||||
Bitboard attacks = PseudoAttacks[C][from];
|
||||
|
||||
for (int to = 0; to < SQUARE_NB; ++to)
|
||||
for (Square to = SQ_A1; to <= SQ_H8; ++to)
|
||||
{
|
||||
out[from][to] = constexpr_popcount(((1ULL << to) - 1) & attacks);
|
||||
}
|
||||
@@ -323,11 +323,11 @@ void FullThreats::append_changed_indices(Color perspective,
|
||||
{
|
||||
if (first)
|
||||
{
|
||||
fusedData->dp2removedOriginBoard |= square_bb(to);
|
||||
fusedData->dp2removedOriginBoard |= to;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (fusedData->dp2removedOriginBoard & square_bb(to))
|
||||
else if (fusedData->dp2removedOriginBoard & to)
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -337,11 +337,11 @@ void FullThreats::append_changed_indices(Color perspective,
|
||||
{
|
||||
if (first)
|
||||
{
|
||||
fusedData->dp2removedTargetBoard |= square_bb(from);
|
||||
fusedData->dp2removedTargetBoard |= from;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (fusedData->dp2removedTargetBoard & square_bb(from))
|
||||
else if (fusedData->dp2removedTargetBoard & from)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user