]> git.sesse.net Git - stockfish/blobdiff - src/search.h
Rename and de-templetize sort()
[stockfish] / src / search.h
index 600d7a75198500dfd4582f48e76c239ebb5b2a50..4a66b11f48d8bcaf76d1ca95901f975b1143b699 100644 (file)
@@ -56,12 +56,11 @@ struct Stack {
 /// all non-pv moves.
 struct RootMove {
 
-  RootMove(){} // Needed by sort()
   RootMove(Move m) : score(-VALUE_INFINITE), prevScore(-VALUE_INFINITE) {
     pv.push_back(m); pv.push_back(MOVE_NONE);
   }
 
-  bool operator<(const RootMove& m) const { return score < m.score; }
+  bool operator<(const RootMove& m) const { return score > m.score; } // Ascending sort
   bool operator==(const Move& m) const { return pv[0] == m; }
 
   void extract_pv_from_tt(Position& pos);