-inline void PawnInfo::clear() {
-
- passedPawns = EmptyBoardBB;
- mgValue = egValue = 0;
- ksStormValue[WHITE] = ksStormValue[BLACK] = 0;
- qsStormValue[WHITE] = qsStormValue[BLACK] = 0;
- halfOpenFiles[WHITE] = halfOpenFiles[BLACK] = 0xFF;
+inline int PawnInfo::get_king_shelter(const Position& pos, Color c, Square ksq) {
+ return (kingSquares[c] == ksq ? kingShelters[c] : updateShelter(pos, c, ksq));