Small code reformat in TranspositionTable::extract_pv()

In particular don't use an array of StateInfo, this
avoids a possible overflow and is in any case redundant.

Also pass as argument the pv[] array size to avoid a second
possible overflow on this one.

Fix suggested by Joona.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-10-05 12:00:35 +01:00
parent 32dfaa56b0
commit 60bc30275d
3 changed files with 18 additions and 19 deletions

View File

@@ -102,7 +102,7 @@ public:
void prefetch(const Key posKey) const;
void new_search();
void insert_pv(const Position& pos, Move pv[]);
void extract_pv(const Position& pos, Move pv[]);
void extract_pv(const Position& pos, Move pv[], int pvSize);
int full() const;
private: