@@ -424,36 +424,20 @@ namespace {
424424 b2 = pos.attacks_from <BISHOP>(ksq) & safe;
425425
426426 // Enemy queen safe checks
427- b = (b1 | b2) & ei.attackedBy [Them][QUEEN];
428- if (b)
429- {
430- attackUnits += QueenCheck * popcount<Max15>(b);
431- score -= Checked;
432- }
427+ if ((b1 | b2) & ei.attackedBy [Them][QUEEN])
428+ attackUnits += QueenCheck, score -= Checked;
433429
434430 // Enemy rooks safe checks
435- b = b1 & ei.attackedBy [Them][ROOK];
436- if (b)
437- {
438- attackUnits += RookCheck * popcount<Max15>(b);
439- score -= Checked;
440- }
431+ if (b1 & ei.attackedBy [Them][ROOK])
432+ attackUnits += RookCheck, score -= Checked;
441433
442434 // Enemy bishops safe checks
443- b = b2 & ei.attackedBy [Them][BISHOP];
444- if (b)
445- {
446- attackUnits += BishopCheck * popcount<Max15>(b);
447- score -= Checked;
448- }
435+ if (b2 & ei.attackedBy [Them][BISHOP])
436+ attackUnits += BishopCheck, score -= Checked;
449437
450438 // Enemy knights safe checks
451- b = pos.attacks_from <KNIGHT>(ksq) & ei.attackedBy [Them][KNIGHT] & safe;
452- if (b)
453- {
454- attackUnits += KnightCheck * popcount<Max15>(b);
455- score -= Checked;
456- }
439+ if (pos.attacks_from <KNIGHT>(ksq) & ei.attackedBy [Them][KNIGHT] & safe)
440+ attackUnits += KnightCheck, score -= Checked;
457441
458442 // Finally, extract the king danger score from the KingDanger[]
459443 // array and subtract the score from the evaluation.
0 commit comments