Fix member variable is not initialized in the constructor

This commit is contained in:
Calcitem 2020-11-01 10:42:10 +08:00
parent 4728aa625a
commit b6a72ff9db
2 changed files with 4 additions and 2 deletions

View File

@ -99,7 +99,8 @@ struct MoveList
inline static Square moveTable[SQUARE_NB][MD_NB] = { {SQ_0} };
private:
ExtMove moveList[MAX_MOVES], *last;
ExtMove moveList[MAX_MOVES] { {MOVE_NONE, 0} };
ExtMove *last {nullptr};
};
#endif // #ifndef MOVEGEN_H_INCLUDED

View File

@ -141,7 +141,8 @@ public:
Position &pos;
Move ttMove { MOVE_NONE };
ExtMove *cur, *endMoves;
ExtMove *cur { nullptr };
ExtMove *endMoves { nullptr };
ExtMove moves[MAX_MOVES]{ {MOVE_NONE, 0} };
int moveCount{ 0 };