]> git.sesse.net Git - stockfish/commitdiff
Rename MOVES_MAX in MAX_MOVES
authorMarco Costalba <mcostalba@gmail.com>
Sun, 24 Apr 2011 07:54:36 +0000 (08:54 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 24 Apr 2011 07:54:36 +0000 (08:54 +0100)
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/book.cpp
src/move.cpp
src/move.h
src/movepick.cpp
src/movepick.h
src/position.cpp
src/search.cpp
src/uci.cpp

index 091767b3ae7c566ee691f1b44f0c3549d8ee52ac..8c7cd52c5ca39c482101d87f245bafcca9ef944e 100644 (file)
@@ -459,7 +459,7 @@ Move Book::get_move(const Position& pos, bool findBestMove) {
                  move_to(Move(bookMove)), PieceType(p + 1)));
 
   // Verify the book move (if any) is legal
-  MoveStack mlist[MOVES_MAX];
+  MoveStack mlist[MAX_MOVES];
   MoveStack* last = generate<MV_LEGAL>(pos, mlist);
   for (MoveStack* cur = mlist; cur != last; cur++)
       if ((int(cur->move) & ~(3 << 14)) == bookMove) // Mask out special flags
index f915feecc1c5412974f25cf37de4d86f80d8918a..96215e82478e7348654c1ce9ad5dd1e84946d874 100644 (file)
@@ -70,7 +70,7 @@ const string move_to_uci(Move m, bool chess960) {
 
 Move move_from_uci(const Position& pos, const string& str) {
 
-  MoveStack mlist[MOVES_MAX];
+  MoveStack mlist[MAX_MOVES];
   MoveStack* last = generate<MV_LEGAL>(pos, mlist);
 
   for (MoveStack* cur = mlist; cur != last; cur++)
@@ -90,7 +90,7 @@ const string move_to_san(Position& pos, Move m) {
   assert(pos.is_ok());
   assert(move_is_ok(m));
 
-  MoveStack mlist[MOVES_MAX];
+  MoveStack mlist[MAX_MOVES];
   Square from = move_from(m);
   Square to = move_to(m);
   PieceType pt = pos.type_of_piece_on(from);
index ada89a4e14791869ac83f95b1dd3d296347141fb..299379e2003b57f8375435e90e7fbf7059148ff5 100644 (file)
@@ -26,7 +26,7 @@
 #include "types.h"
 
 // Maximum number of allowed moves per position
-const int MOVES_MAX = 256;
+const int MAX_MOVES = 256;
 
 /// A move needs 16 bits to be stored
 ///
index fa30de554b59de4864821326c8b5765d83b7a22f..8872e39f3691a8740a8ba1244f8fc3c4664951c5 100644 (file)
@@ -59,7 +59,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h,
   int searchTT = ttm;
   ttMoves[0].move = ttm;
   badCaptureThreshold = 0;
-  badCaptures = moves + MOVES_MAX;
+  badCaptures = moves + MAX_MOVES;
 
   assert(d > DEPTH_ZERO);
 
@@ -153,7 +153,7 @@ void MovePicker::go_next_phase() {
       // Bad captures SEE value is already calculated so just pick
       // them in order to get SEE move ordering.
       curMove = badCaptures;
-      lastMove = moves + MOVES_MAX;
+      lastMove = moves + MAX_MOVES;
       return;
 
   case PH_EVASIONS:
index adae851dc87d7387f336eb8eeb82d04f48b30f28..765cae29033de7bb1080a29b6506f6b88925d282 100644 (file)
@@ -57,7 +57,7 @@ private:
   int badCaptureThreshold, phase;
   const uint8_t* phasePtr;
   MoveStack *curMove, *lastMove, *lastGoodNonCapture, *badCaptures;
-  MoveStack moves[MOVES_MAX];
+  MoveStack moves[MAX_MOVES];
 };
 
 #endif // !defined(MOVEPICK_H_INCLUDED)
index e3bf4aee3e17863c55ca862ff15607443d395512..3f6400a80daeda5ae7f8af243726f138ff322a4b 100644 (file)
@@ -649,7 +649,7 @@ bool Position::pl_move_is_evasion(Move m, Bitboard pinned) const
 
 bool Position::move_is_legal(const Move m) const {
 
-  MoveStack mlist[MOVES_MAX];
+  MoveStack mlist[MAX_MOVES];
   MoveStack *cur, *last = generate<MV_PSEUDO_LEGAL>(*this, mlist);
 
    for (cur = mlist; cur != last; cur++)
@@ -1795,7 +1795,7 @@ bool Position::is_draw() const {
 
 bool Position::is_mate() const {
 
-  MoveStack moves[MOVES_MAX];
+  MoveStack moves[MAX_MOVES];
   return is_check() && generate<MV_LEGAL>(*this, moves) == moves;
 }
 
index e6903f1d69cab6d053d999ebeda1e145c3f102e6..df1c9b506d7c8e79f957bf90e1d9dcfe3f5c0aa4 100644 (file)
@@ -214,7 +214,7 @@ namespace {
 
   inline int futility_move_count(Depth d) {
 
-      return d < 16 * ONE_PLY ? FutilityMoveCountArray[d] : MOVES_MAX;
+      return d < 16 * ONE_PLY ? FutilityMoveCountArray[d] : MAX_MOVES;
   }
 
   // Step 14. Reduced search
@@ -418,7 +418,7 @@ void exit_threads() { ThreadsMgr.exit_threads(); }
 
 int64_t perft(Position& pos, Depth depth) {
 
-  MoveStack mlist[MOVES_MAX];
+  MoveStack mlist[MAX_MOVES];
   StateInfo st;
   Move m;
   int64_t sum = 0;
@@ -764,7 +764,7 @@ namespace {
     assert(PvNode || alpha == beta - 1);
     assert(pos.thread() >= 0 && pos.thread() < ThreadsMgr.active_threads());
 
-    Move movesSearched[MOVES_MAX];
+    Move movesSearched[MAX_MOVES];
     int64_t nodes;
     StateInfo st;
     const TTEntry *tte;
@@ -2490,7 +2490,7 @@ split_point_start: // At split points actual search starts from here
 
   void RootMoveList::init(Position& pos, Move searchMoves[]) {
 
-    MoveStack mlist[MOVES_MAX];
+    MoveStack mlist[MAX_MOVES];
     Move* sm;
 
     clear();
index 9593b593c897fd1d626d452d62fdb8b8dc6b5df9..248601b5de3b5db960a664f589b7ccdb0c47ecc4 100644 (file)
@@ -205,7 +205,7 @@ namespace {
     string token;
     int time[] = { 0, 0 }, inc[] = { 0, 0 };
     SearchLimits limits(0, 0, 0, 0, 0, 0, false, false);
-    Move searchMoves[MOVES_MAX] = { MOVE_NONE };
+    Move searchMoves[MAX_MOVES] = { MOVE_NONE };
     Move* cur = searchMoves;
 
     while (up >> token)