]> git.sesse.net Git - stockfish/commitdiff
PSQT access functions can be static
authorMarco Costalba <mcostalba@gmail.com>
Sat, 3 Jul 2010 04:48:43 +0000 (05:48 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 3 Jul 2010 04:49:13 +0000 (05:49 +0100)
Also renamed history access value in something more
in line with the meaning.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/history.cpp
src/history.h
src/movepick.cpp
src/position.h

index a57e6de8da5a5324d09f586304130b64881573f1..75b19709fb45c7e1769b74f3fd248305715e84ea 100644 (file)
@@ -85,10 +85,10 @@ void History::failure(Piece p, Square to, Depth d) {
 }
 
 
-/// History::move_ordering_score() returns an integer value used to order the
+/// History::value() returns an integer value used to order the
 /// non-capturing moves in the MovePicker class.
 
-int History::move_ordering_score(Piece p, Square to) const {
+int History::value(Piece p, Square to) const {
 
   assert(piece_is_ok(p));
   assert(square_is_ok(to));
index fdc77ada3b4e4eac9117ef0a77167308b929aee4..2abd26b17dbdeb5e07dcf378dab28d1324963516 100644 (file)
@@ -49,7 +49,7 @@ public:
   void clear();
   void success(Piece p, Square to, Depth d);
   void failure(Piece p, Square to, Depth d);
-  int move_ordering_score(Piece p, Square to) const;
+  int value(Piece p, Square to) const;
   void set_gain(Piece p, Square to, Value delta);
   Value gain(Piece p, Square to) const;
 
index 20681108c0bd7ca8e3db1c94254dcd3b10d96236..dcc94015d67560b916bdaa01b3775c982edef8ac 100644 (file)
@@ -228,7 +228,7 @@ void MovePicker::score_noncaptures() {
       from = move_from(m);
       to = move_to(m);
       piece = pos.piece_on(from);
-      cur->score = H.move_ordering_score(piece, to);
+      cur->score = H.value(piece, to);
   }
 }
 
@@ -253,7 +253,7 @@ void MovePicker::score_evasions_or_checks() {
           cur->score =  pos.midgame_value_of_piece_on(move_to(m))
                       - pos.type_of_piece_on(move_from(m)) + HistoryMax;
       else
-          cur->score = H.move_ordering_score(pos.piece_on(move_from(m)), move_to(m));
+          cur->score = H.value(pos.piece_on(move_from(m)), move_to(m));
   }
 }
 
index 88090ad2227232394e9a5ce81cbb6fb6fe9535d8..be43c2e41e2bf13c2926f2a163f54725726f9cae 100644 (file)
@@ -258,7 +258,7 @@ public:
   // Incremental evaluation
   Score value() const;
   Value non_pawn_material(Color c) const;
-  Score pst_delta(Piece piece, Square from, Square to) const;
+  static Score pst_delta(Piece piece, Square from, Square to);
 
   // Game termination checks
   bool is_mate() const;
@@ -310,7 +310,7 @@ private:
   Key compute_material_key() const;
 
   // Computing incremental evaluation scores and material counts
-  Score pst(Color c, PieceType pt, Square s) const;
+  static Score pst(Color c, PieceType pt, Square s);
   Score compute_value() const;
   Value compute_non_pawn_material(Color c) const;
 
@@ -507,11 +507,11 @@ inline Key Position::get_material_key() const {
   return st->materialKey;
 }
 
-inline Score Position::pst(Color c, PieceType pt, Square s) const {
+inline Score Position::pst(Color c, PieceType pt, Square s) {
   return PieceSquareTable[piece_of_color_and_type(c, pt)][s];
 }
 
-inline Score Position::pst_delta(Piece piece, Square from, Square to) const {
+inline Score Position::pst_delta(Piece piece, Square from, Square to) {
   return PieceSquareTable[piece][to] - PieceSquareTable[piece][from];
 }