mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Reformat SEE to better document the function
This is one of the most difficult to understand but also most important and speed critical functions of SF. This patch rewrites some part of it to hopefully make it clearer and drop some redundant variables in the process. Same speed than master (or even a bit more). Thanks to Chris Cain for useful feedback. No functional change.
This commit is contained in:
committed by
Stéphane Nicolet
parent
52f92d05a9
commit
a09eee5798
@@ -510,9 +510,9 @@ namespace {
|
||||
template<Tracing T> template<Color Us>
|
||||
Score Evaluation<T>::threats() const {
|
||||
|
||||
const Color Them = (Us == WHITE ? BLACK : WHITE);
|
||||
const Direction Up = (Us == WHITE ? NORTH : SOUTH);
|
||||
const Bitboard TRank3BB = (Us == WHITE ? Rank3BB : Rank6BB);
|
||||
const Color Them = (Us == WHITE ? BLACK : WHITE);
|
||||
const Direction Up = (Us == WHITE ? NORTH : SOUTH);
|
||||
const Bitboard TRank3BB = (Us == WHITE ? Rank3BB : Rank6BB);
|
||||
|
||||
Bitboard b, weak, defended, nonPawnEnemies, stronglyProtected, safeThreats;
|
||||
Score score = SCORE_ZERO;
|
||||
|
||||
Reference in New Issue
Block a user