1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

Fix a warning with MSVC 2010

Warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data

No functional change.
This commit is contained in:
Marco Costalba 2014-07-26 16:01:09 +02:00 committed by lucasart
parent 68171ecaca
commit f2053ba19f

View file

@ -94,9 +94,9 @@ namespace {
string uci_pv(const Position& pos, int depth, Value alpha, Value beta);
struct Skill {
Skill(int l, int rootSize) : level(l),
candidates(l < 20 ? std::min(4, rootSize) : 0),
best(MOVE_NONE) {}
Skill(int l, size_t rootSize) : level(l),
candidates(l < 20 ? std::min(4, (int)rootSize) : 0),
best(MOVE_NONE) {}
~Skill() {
if (candidates) // Swap best PV line with the sub-optimal one
std::swap(RootMoves[0], *std::find(RootMoves.begin(),