]> git.sesse.net Git - stockfish/commitdiff
Small code style in headers
authorMarco Costalba <mcostalba@gmail.com>
Wed, 20 May 2009 13:11:41 +0000 (15:11 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 20 May 2009 13:11:41 +0000 (15:11 +0200)
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/endgame.h
src/evaluate.h
src/lock.h
src/material.h
src/move.h
src/movepick.h
src/pawns.h

index 73bfd188af69f103cd25fb7feafb4b82f0c97e3a..011299ac6493c012f353102b1e34c0301c666308 100644 (file)
@@ -65,7 +65,7 @@ enum EndgameType {
 template<typename T>
 class EndgameFunctionBase {
 public:
-  EndgameFunctionBase(Color c) : strongerSide(c) { weakerSide = opposite_color(strongerSide); }
+  EndgameFunctionBase(Color c) : strongerSide(c), weakerSide(opposite_color(c)) {}
   virtual ~EndgameFunctionBase() {}
   virtual T apply(const Position&) = 0;
 
index c295985eb490df75326872f2b46a3c8298dd8a23..2531182af244a95fe55cba173cbb5762b6568b63 100644 (file)
@@ -39,7 +39,7 @@
 /// arguments to the evaluation function, and the search can make use of its
 /// contents to make intelligent search decisions.
 ///
-/// At the moment, this is not utilized very much:  The only part of the
+/// At the moment, this is not utilized very much: The only part of the
 /// EvalInfo object which is used by the search is futilityMargin.
 class Position;
 
@@ -53,16 +53,16 @@ struct EvalInfo {
   PawnInfo* pi;
 
   // attackedBy[color][piece type] is a bitboard representing all squares
-  // attacked by a given color and piece type attackedBy[color][0] contains
+  // attacked by a given color and piece type, attackedBy[color][0] contains
   // all squares attacked by the given color.
   Bitboard attackedBy[2][8];
   Bitboard attacked_by(Color c) const { return attackedBy[c][0]; }
   Bitboard attacked_by(Color c, PieceType pt) const { return attackedBy[c][pt]; }
 
   // kingZone[color] is the zone around the enemy king which is considered
-  // by the king safety evaluation.  This consists of the squares directly
+  // by the king safety evaluation. This consists of the squares directly
   // adjacent to the king, and the three (or two, for a king on an edge file)
-  // squares two ranks in front of the king.  For instance, if black's king
+  // squares two ranks in front of the king. For instance, if black's king
   // is on g8, kingZone[WHITE] is a bitboard containing the squares f8, h8,
   // f7, g7, h7, f6, g6 and h6.
   Bitboard kingZone[2];
@@ -91,7 +91,7 @@ struct EvalInfo {
   // Middle game and endgame mobility scores.
   Value mgMobility, egMobility;
 
-  // Extra futility margin.  This is added to the standard futility margin
+  // Extra futility margin. This is added to the standard futility margin
   // in the quiescence search.
   Value futilityMargin;
 };
index 715755d36900c167ff390f2951ddf453458d06cf..cd4dfa702c87756c2cb1d11fde5a99b859163057 100644 (file)
@@ -23,7 +23,7 @@
 
 
 // x86 assembly language locks or OS spin locks may perform faster than
-// mutex locks on some platforms.  On my machine, mutexes seem to be the
+// mutex locks on some platforms. On my machine, mutexes seem to be the
 // best.
 
 //#define ASM_LOCK
index 27c93807068174ee4d945e392718c9b1baa7ccad..8b80ba1c5e6992694b5f21431520aafce1255e29 100644 (file)
@@ -129,7 +129,7 @@ inline void MaterialInfo::clear() {
 
 
 /// MaterialInfo::scale_factor takes a position and a color as input, and
-/// returns a scale factor for the given color.  We have to provide the
+/// returns a scale factor for the given color. We have to provide the
 /// position in addition to the color, because the scale factor need not
 /// to be a constant: It can also be a function which should be applied to
 /// the position. For instance, in KBP vs K endgames, a scaling function
@@ -167,7 +167,7 @@ inline bool MaterialInfo::specialized_eval_exists() const {
 
 
 /// MaterialInfo::evaluate applies a specialized evaluation function
-/// to a given position object.  It should only be called when
+/// to a given position object. It should only be called when
 /// specialized_eval_exists() returns 'true'.
 
 inline Value MaterialInfo::evaluate(const Position& pos) const {
index 6a5678f02c6f48a34a71a377ab94ef73b5886fbd..5a58afe69c6e09f66d79e886985f67a534430cd4 100644 (file)
@@ -119,7 +119,7 @@ inline Move make_ep_move(Square from, Square to) {
 //// Prototypes
 ////
 
-extern std::ostream &operator << (std::ostream &os, Move m);
+extern std::ostream& operator<<(std::ostream &os, Move m);
 extern Move move_from_string(const Position &pos, const std::string &str);
 extern const std::string move_to_string(Move m);
 extern bool move_is_ok(Move m);
index 0ac4bb6cd206799c11504f51194c470daa20101a..500ed8b99a3571aecece8502a3fd60dee36010cf 100644 (file)
@@ -40,8 +40,8 @@ struct SearchStack;
 extern SearchStack EmptySearchStack;
 
 /// MovePicker is a class which is used to pick one legal move at a time from
-/// the current position.  It is initialized with a Position object and a few
-/// moves we have reason to believe are good.  The most important method is
+/// the current position. It is initialized with a Position object and a few
+/// moves we have reason to believe are good. The most important method is
 /// MovePicker::pick_next_move(), which returns a new legal move each time it
 /// is called, until there are no legal moves left, when MOVE_NONE is returned.
 /// In order to improve the efficiency of the alpha beta algorithm, MovePicker
@@ -49,7 +49,7 @@ extern SearchStack EmptySearchStack;
 
 class MovePicker {
 
-  MovePicker& operator=(const MovePicker&); // Silence a warning under MSVC
+  MovePicker& operator=(const MovePicker&); // silence a warning under MSVC
 
 public:
 
@@ -63,15 +63,14 @@ public:
     PH_NONCAPTURES,    // Non-captures and underpromotions
     PH_EVASIONS,       // Check evasions
     PH_QCAPTURES,      // Captures in quiescence search
-    PH_QCHECKS,        // Checks in quiescence search
+    PH_QCHECKS,        // Non-capture checks in quiescence search
     PH_STOP
   };
 
   MovePicker(const Position& p, bool pvnode, Move ttm, const SearchStack& ss, Depth d);
   Move get_next_move();
-  Move get_next_move(Lock &lock);
+  Move get_next_move(Locklock);
   int number_of_moves() const;
-  int current_move_score() const;
   Bitboard discovered_check_candidates() const;
 
   static void init_phase_table();
@@ -110,7 +109,7 @@ inline int MovePicker::number_of_moves() const {
 }
 
 /// MovePicker::discovered_check_candidates() returns a bitboard containing
-/// all pieces which can possibly give discovered check.  This bitboard is
+/// all pieces which can possibly give discovered check. This bitboard is
 /// computed by the constructor function.
 
 inline Bitboard MovePicker::discovered_check_candidates() const {
index 8f88b57732001174120e35b4f21ca05ce068a0e5..abf686fc8ad58e56d534cbed9aa95e2a9662f210 100644 (file)
@@ -33,9 +33,9 @@
 ////
 
 /// PawnInfo is a class which contains various information about a pawn
-/// structure.  Currently, it only includes a middle game and an end game
-/// pawn structure evaluation, and a bitboard of passed pawns.  We may want
-/// to add further information in the future.  A lookup to the pawn hash table
+/// structure. Currently, it only includes a middle game and an end game
+/// pawn structure evaluation, and a bitboard of passed pawns. We may want
+/// to add further information in the future. A lookup to the pawn hash table
 /// (performed by calling the get_pawn_info method in a PawnInfoTable object)
 /// returns a pointer to a PawnInfo object.
 class Position;