summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
66d5c13)
Value is never used un-initialized, but MSVC is not
smart enough to detect itself :-(
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Value root_search(Position& pos, SearchStack ss[], RootMoveList& rml, Value alpha, Value beta) {
Value oldAlpha = alpha;
Value root_search(Position& pos, SearchStack ss[], RootMoveList& rml, Value alpha, Value beta) {
Value oldAlpha = alpha;
+ Value value = -VALUE_INFINITE;
CheckInfo ci(pos);
// Loop through all the moves in the root move list
CheckInfo ci(pos);
// Loop through all the moves in the root move list
Value oldAlpha, value;
bool isCheck, mateThreat, singleEvasion, moveIsCheck, captureOrPromotion, dangerous;
int moveCount = 0;
Value oldAlpha, value;
bool isCheck, mateThreat, singleEvasion, moveIsCheck, captureOrPromotion, dangerous;
int moveCount = 0;
- Value bestValue = -VALUE_INFINITE;
+ Value bestValue = value = -VALUE_INFINITE;
if (depth < OnePly)
return qsearch(pos, ss, alpha, beta, Depth(0), ply, threadID);
if (depth < OnePly)
return qsearch(pos, ss, alpha, beta, Depth(0), ply, threadID);
bool isCheck, useFutilityPruning, singleEvasion, moveIsCheck, captureOrPromotion, dangerous;
bool mateThreat = false;
int moveCount = 0;
bool isCheck, useFutilityPruning, singleEvasion, moveIsCheck, captureOrPromotion, dangerous;
bool mateThreat = false;
int moveCount = 0;
- futilityValue = staticValue = bestValue = -VALUE_INFINITE;
+ futilityValue = staticValue = bestValue = value = -VALUE_INFINITE;
if (depth < OnePly)
return qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);
if (depth < OnePly)
return qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);
Position pos = Position(sp->pos);
CheckInfo ci(pos);
SearchStack* ss = sp->sstack[threadID];
Position pos = Position(sp->pos);
CheckInfo ci(pos);
SearchStack* ss = sp->sstack[threadID];
+ Value value = -VALUE_INFINITE;
Move move;
bool isCheck = pos.is_check();
bool useFutilityPruning = sp->depth < SelectiveDepth
Move move;
bool isCheck = pos.is_check();
bool useFutilityPruning = sp->depth < SelectiveDepth
Position pos = Position(sp->pos);
CheckInfo ci(pos);
SearchStack* ss = sp->sstack[threadID];
Position pos = Position(sp->pos);
CheckInfo ci(pos);
SearchStack* ss = sp->sstack[threadID];
+ Value value = -VALUE_INFINITE;
Move move;
while ( sp->alpha < sp->beta
Move move;
while ( sp->alpha < sp->beta