Permalink
Browse files

Use default arguments in evaluate()

No functional change.
  • Loading branch information...
1 parent 6513bea commit e0da04958b96f64346ba861b01ec4128f3ae91d1 @mcostalba committed Feb 16, 2013
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/evaluate.h
  2. +2 −2 src/search.cpp
View
@@ -27,9 +27,9 @@ class Position;
namespace Eval {
extern void init();
-extern Value evaluate(const Position& pos, Value& margin, Value alpha, Value beta);
extern std::string trace(const Position& pos);
-
+extern Value evaluate(const Position& pos, Value& margin,
+ Value alpha = -VALUE_INFINITE, Value beta = VALUE_INFINITE);
}
#endif // !defined(EVALUATE_H_INCLUDED)
View
@@ -596,7 +596,7 @@ namespace {
// Never assume anything on values stored in TT
if ( (ss->staticEval = eval = tte->eval_value()) == VALUE_NONE
||(ss->evalMargin = tte->eval_margin()) == VALUE_NONE)
- eval = ss->staticEval = evaluate(pos, ss->evalMargin, -VALUE_INFINITE, VALUE_INFINITE);
+ eval = ss->staticEval = evaluate(pos, ss->evalMargin);
// Can ttValue be used as a better position evaluation?
if (ttValue != VALUE_NONE)
@@ -606,7 +606,7 @@ namespace {
}
else
{
- eval = ss->staticEval = evaluate(pos, ss->evalMargin, -VALUE_INFINITE, VALUE_INFINITE);
+ eval = ss->staticEval = evaluate(pos, ss->evalMargin);
TT.store(posKey, VALUE_NONE, BOUND_NONE, DEPTH_NONE, MOVE_NONE,
ss->staticEval, ss->evalMargin);
}

0 comments on commit e0da049

Please sign in to comment.