]> git.sesse.net Git - stockfish/commitdiff
Trivial code style fixes
authorMarco Costalba <mcostalba@gmail.com>
Tue, 30 Sep 2014 07:05:20 +0000 (09:05 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 30 Sep 2014 07:05:20 +0000 (09:05 +0200)
Mainly to sync mine and official repo.

No functional change.

src/bitboard.h
src/evaluate.cpp
src/position.cpp
src/search.cpp
src/tt.h
src/ucioption.cpp

index 7330a199e1fba11a416da7a37fe379f543eaa9de..6a1755b662891b26051dad911b1c42bcf2c7de86 100644 (file)
@@ -22,6 +22,7 @@
 #define BITBOARD_H_INCLUDED
 
 #include <string>
 #define BITBOARD_H_INCLUDED
 
 #include <string>
+
 #include "types.h"
 
 namespace Bitboards {
 #include "types.h"
 
 namespace Bitboards {
index ce98af6f8e01b50eb57ad84537dca8a533b756b3..7892f3155c57e64fc2feff79d56569511c6eb92c 100644 (file)
@@ -507,7 +507,7 @@ namespace {
                       & ei.attackedBy[Them][PAWN]
                       & (ei.attackedBy[Us][KNIGHT] | ei.attackedBy[Us][BISHOP]);
 
                       & ei.attackedBy[Them][PAWN]
                       & (ei.attackedBy[Us][KNIGHT] | ei.attackedBy[Us][BISHOP]);
 
-    if(protectedEnemies)
+    if (protectedEnemies)
         score += Threat[Minor][type_of(pos.piece_on(lsb(protectedEnemies)))];
 
     // Enemies not defended by a pawn and under our attack
         score += Threat[Minor][type_of(pos.piece_on(lsb(protectedEnemies)))];
 
     // Enemies not defended by a pawn and under our attack
@@ -608,7 +608,7 @@ namespace {
 
                 mbonus += k * rr, ebonus += k * rr;
             }
 
                 mbonus += k * rr, ebonus += k * rr;
             }
-            else if(pos.pieces(Us) & blockSq)
+            else if (pos.pieces(Us) & blockSq)
                 mbonus += rr * 3 + r * 2 + 3, ebonus += rr + r * 2;
         } // rr != 0
 
                 mbonus += rr * 3 + r * 2 + 3, ebonus += rr + r * 2;
         } // rr != 0
 
index db4c857b0d25401cf97e3f70b56c8aeb10a46ee1..b00bda24b0596b56a4661a315cfebc2e6c0195e0 100644 (file)
 
 #include "bitcount.h"
 #include "movegen.h"
 
 #include "bitcount.h"
 #include "movegen.h"
+#include "notation.h"
 #include "position.h"
 #include "psqtab.h"
 #include "rkiss.h"
 #include "thread.h"
 #include "tt.h"
 #include "position.h"
 #include "psqtab.h"
 #include "rkiss.h"
 #include "thread.h"
 #include "tt.h"
-#include "notation.h"
 
 using std::string;
 
 
 using std::string;
 
index 1317fc239ddc46c22f89167b2516f645ed33aa13..152de13c861d6689f803327424c8a419db79b19c 100644 (file)
@@ -126,6 +126,7 @@ void Search::init() {
   {
       double    pvRed = 0.00 + log(double(hd)) * log(double(mc)) / 3.00;
       double nonPVRed = 0.33 + log(double(hd)) * log(double(mc)) / 2.25;
   {
       double    pvRed = 0.00 + log(double(hd)) * log(double(mc)) / 3.00;
       double nonPVRed = 0.33 + log(double(hd)) * log(double(mc)) / 2.25;
+
       Reductions[1][1][hd][mc] = int8_t(   pvRed >= 1.0 ?    pvRed + 0.5: 0);
       Reductions[0][1][hd][mc] = int8_t(nonPVRed >= 1.0 ? nonPVRed + 0.5: 0);
 
       Reductions[1][1][hd][mc] = int8_t(   pvRed >= 1.0 ?    pvRed + 0.5: 0);
       Reductions[0][1][hd][mc] = int8_t(nonPVRed >= 1.0 ? nonPVRed + 0.5: 0);
 
index 30a9389788d51979944130042dba489d22ec26c4..8ec09a7c8e75865eaaf1251d1c2aaa2ed48b58a4 100644 (file)
--- a/src/tt.h
+++ b/src/tt.h
@@ -50,8 +50,8 @@ private:
     move16    = (uint16_t)m;
     value16   = (int16_t)v;
     evalValue = (int16_t)ev;
     move16    = (uint16_t)m;
     value16   = (int16_t)v;
     evalValue = (int16_t)ev;
+    genBound8 = (uint8_t)(g | b);
     depth8    = (uint8_t)(d - DEPTH_NONE);
     depth8    = (uint8_t)(d - DEPTH_NONE);
-    genBound8 = g | (uint8_t)b;
   }
 
   uint16_t key16;
   }
 
   uint16_t key16;
@@ -70,7 +70,6 @@ private:
 const unsigned TTClusterSize = 3;
 
 struct TTCluster {
 const unsigned TTClusterSize = 3;
 
 struct TTCluster {
-
   TTEntry entry[TTClusterSize];
   char padding[2];
 };
   TTEntry entry[TTClusterSize];
   char padding[2];
 };
index 59b50d3cfe6dd6bc96ab9278bee01ce674098799..94a38896680af3d764545be2b89f1c0bde9ce26c 100644 (file)
@@ -55,7 +55,7 @@ bool CaseInsensitiveLess::operator() (const string& s1, const string& s2) const
 void init(OptionsMap& o) {
 
   o["Write Debug Log"]       << Option(false, on_logger);
 void init(OptionsMap& o) {
 
   o["Write Debug Log"]       << Option(false, on_logger);
-  o["Contempt"]              << Option(0, -100,  100);
+  o["Contempt"]              << Option(0, -100, 100);
   o["Min Split Depth"]       << Option(0, 0, 12, on_threads);
   o["Threads"]               << Option(1, 1, MAX_THREADS, on_threads);
   o["Hash"]                  << Option(16, 1, 1024 * 1024, on_hash_size);
   o["Min Split Depth"]       << Option(0, 0, 12, on_threads);
   o["Threads"]               << Option(1, 1, MAX_THREADS, on_threads);
   o["Hash"]                  << Option(16, 1, 1024 * 1024, on_hash_size);