mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Clean up RootMove less operator
This is used by std::stable_sort() to sort moves from highest score to lowest score. 1) The comment is incorrect since highest to lowest means descending. 2) It's more natural to implement a less operator using another less operator rather than a greater operator. No functional change. Resolves #504
This commit is contained in:
parent
328098d027
commit
79f393084a
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ struct RootMove {
|
|||
|
||||
explicit RootMove(Move m) : pv(1, m) {}
|
||||
|
||||
bool operator<(const RootMove& m) const { return score > m.score; } // Ascending sort
|
||||
bool operator<(const RootMove& m) const { return m.score < score; } // Descending sort
|
||||
bool operator==(const Move& m) const { return pv[0] == m; }
|
||||
void insert_pv_in_tt(Position& pos);
|
||||
bool extract_ponder_from_tt(Position& pos);
|
||||
|
|
Loading…
Add table
Reference in a new issue