1
0
Fork 0

Rename MOVES_MAX in MAX_MOVES

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
sf_2.3.1_base
Marco Costalba 2011-04-24 08:54:36 +01:00
parent ccd5ccbcdb
commit c9d7e99de6
8 changed files with 14 additions and 14 deletions

View 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

View 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);

View 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
///

View 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:

View 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)

View 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;
}

View 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();

View 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)