mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
PawnInfo::clear() retire memset() and fix Ubuntu compile
Go back to original direct assignment, this allows to add an include in pawns.h to teach about memset() This fix a compile error under Ubuntu. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
8bef9e59a0
commit
225d89c51b
1 changed files with 4 additions and 3 deletions
|
@ -121,9 +121,10 @@ inline bool PawnInfo::has_open_file_to_right(Color c, File f) const {
|
|||
|
||||
inline void PawnInfo::clear() {
|
||||
|
||||
Key k = key;
|
||||
memset(this, 0, sizeof(PawnInfo));
|
||||
key = k;
|
||||
passedPawns = EmptyBoardBB;
|
||||
mgValue = egValue = 0;
|
||||
ksStormValue[WHITE] = ksStormValue[BLACK] = 0;
|
||||
qsStormValue[WHITE] = qsStormValue[BLACK] = 0;
|
||||
halfOpenFiles[WHITE] = halfOpenFiles[BLACK] = 0xFF;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue