1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00

Explicitly qualify STL functions

Suggested by Rein Halbersma.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2012-08-18 11:00:56 +01:00
parent 9de4ee6d32
commit bc4de9edae

View file

@ -51,11 +51,6 @@ using std::endl;
using Eval::evaluate; using Eval::evaluate;
using namespace Search; using namespace Search;
// For some reason argument-dependent lookup (ADL) doesn't work for Android's
// STLPort, so explicitly qualify following functions.
using std::count;
using std::find;
namespace { namespace {
// Set to true to force running with one thread. Used for debugging // Set to true to force running with one thread. Used for debugging
@ -253,9 +248,9 @@ void Search::think() {
{ {
Move bookMove = book.probe(pos, Options["Book File"], Options["Best Book Move"]); Move bookMove = book.probe(pos, Options["Book File"], Options["Best Book Move"]);
if (bookMove && count(RootMoves.begin(), RootMoves.end(), bookMove)) if (bookMove && std::count(RootMoves.begin(), RootMoves.end(), bookMove))
{ {
std::swap(RootMoves[0], *find(RootMoves.begin(), RootMoves.end(), bookMove)); std::swap(RootMoves[0], *std::find(RootMoves.begin(), RootMoves.end(), bookMove));
goto finalize; goto finalize;
} }
} }
@ -496,7 +491,7 @@ namespace {
if (skillBest == MOVE_NONE) // Still unassigned ? if (skillBest == MOVE_NONE) // Still unassigned ?
skillBest = do_skill_level(); skillBest = do_skill_level();
std::swap(RootMoves[0], *find(RootMoves.begin(), RootMoves.end(), skillBest)); std::swap(RootMoves[0], *std::find(RootMoves.begin(), RootMoves.end(), skillBest));
} }
} }
@ -815,7 +810,7 @@ split_point_start: // At split points actual search starts from here
// At root obey the "searchmoves" option and skip moves not listed in Root // At root obey the "searchmoves" option and skip moves not listed in Root
// Move List, as a consequence any illegal move is also skipped. In MultiPV // Move List, as a consequence any illegal move is also skipped. In MultiPV
// mode we also skip PV moves which have been already searched. // mode we also skip PV moves which have been already searched.
if (RootNode && !count(RootMoves.begin() + PVIdx, RootMoves.end(), move)) if (RootNode && !std::count(RootMoves.begin() + PVIdx, RootMoves.end(), move))
continue; continue;
// At PV and SpNode nodes we want all moves to be legal since the beginning // At PV and SpNode nodes we want all moves to be legal since the beginning
@ -991,7 +986,7 @@ split_point_start: // At split points actual search starts from here
// be trusted, and we don't update the best move and/or PV. // be trusted, and we don't update the best move and/or PV.
if (RootNode && !Signals.stop) if (RootNode && !Signals.stop)
{ {
RootMove& rm = *find(RootMoves.begin(), RootMoves.end(), move); RootMove& rm = *std::find(RootMoves.begin(), RootMoves.end(), move);
// PV move or new best move ? // PV move or new best move ?
if (isPvMove || value > alpha) if (isPvMove || value > alpha)