]> git.sesse.net Git - stockfish/commitdiff
Evaluate: weight_option() is static
authorMarco Costalba <mcostalba@gmail.com>
Wed, 24 Sep 2008 19:17:28 +0000 (21:17 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 24 Sep 2008 19:17:28 +0000 (21:17 +0200)
Declare function under local namespace. This removes a
warning from the picky Intel compiler.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/evaluate.cpp

index 94e807f5d2aa5afc584b14d424ed4583d7dfd15e..f44173445bac916afc72090d68d5a217b0d4cc2d 100644 (file)
@@ -275,6 +275,7 @@ namespace {
   int count_1s_8bit(Bitboard b);
 
   int compute_weight(int uciWeight, int internalWeight);
+  int weight_option(const std::string& opt, int weight);
   void init_safety();
 
 }
@@ -539,11 +540,6 @@ void quit_eval() {
 /// read_weights() reads evaluation weights from the corresponding UCI
 /// parameters.
 
-int weight_option(const std::string& opt, int weight) {
-
-    return compute_weight(get_option_value_int(opt), weight);
-}
-
 void read_weights(Color us) {
 
   WeightMobilityMidgame      = weight_option("Mobility (Middle Game)", WeightMobilityMidgameInternal);
@@ -681,7 +677,7 @@ namespace {
     // king has lost right to castle
     if (mob > 6 || ei.pi->file_is_half_open(us, f))
         return;
-    
+
     Square ksq = p.king_square(us);
 
     if (    square_file(ksq) >= FILE_E
@@ -1147,6 +1143,13 @@ namespace {
   }
 
 
+  // helper used in read_weights()
+  int weight_option(const std::string& opt, int weight) {
+
+    return compute_weight(get_option_value_int(opt), weight);
+  }
+
+
   // init_safety() initizes the king safety evaluation, based on UCI
   // parameters.  It is called from read_weights().