small cleanups

closes https://github.com/official-stockfish/Stockfish/pull/2695

No functional change
This commit is contained in:
Joost VandeVondele
2020-06-21 15:21:46 +02:00
parent bc3c215490
commit 6f15e7fab2
14 changed files with 50 additions and 61 deletions

View File

@@ -150,17 +150,17 @@ namespace {
&& !(theirPawns & adjacent_files_bb(s)))
score -= Doubled;
else
score -= Isolated
+ WeakUnopposed * !opposed;
score -= Isolated
+ WeakUnopposed * !opposed;
}
else if (backward)
score -= Backward
+ WeakUnopposed * !opposed;
score -= Backward
+ WeakUnopposed * !opposed;
if (!support)
score -= Doubled * doubled
+ WeakLever * more_than_one(lever);
score -= Doubled * doubled
+ WeakLever * more_than_one(lever);
}
return score;
@@ -196,7 +196,7 @@ Entry* probe(const Position& pos) {
/// penalty for a king, looking at the king file and the two closest files.
template<Color Us>
Score Entry::evaluate_shelter(const Position& pos, Square ksq) {
Score Entry::evaluate_shelter(const Position& pos, Square ksq) const {
constexpr Color Them = ~Us;