]> git.sesse.net Git - stockfish/commitdiff
Another round of spelling fixes
authorJerry Donald <j1.donald1@gmail.com>
Mon, 2 Dec 2013 22:47:38 +0000 (23:47 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 2 Dec 2013 22:51:29 +0000 (23:51 +0100)
And also renamed a loop variable while there.

No functional change.

src/bitboard.cpp
src/evaluate.cpp
src/movepick.cpp
src/pawns.cpp
src/position.cpp
src/search.cpp
src/thread.cpp
src/thread.h
src/timeman.cpp
src/timeman.h
src/types.h

index 4847fcf533e68f6a5b30b79cd5944098d6aff4f9..19599a5124bdc54cf4e93a9b77c2b02a45a62b39 100644 (file)
@@ -198,9 +198,9 @@ void Bitboards::init() {
   for (Color c = WHITE; c <= BLACK; ++c)
       for (PieceType pt = PAWN; pt <= KING; ++pt)
           for (Square s = SQ_A1; s <= SQ_H8; ++s)
-              for (int k = 0; steps[pt][k]; ++k)
+              for (int i = 0; steps[pt][i]; ++i)
               {
-                  Square to = s + Square(c == WHITE ? steps[pt][k] : -steps[pt][k]);
+                  Square to = s + Square(c == WHITE ? steps[pt][i] : -steps[pt][i]);
 
                   if (is_ok(to) && square_distance(s, to) < 3)
                       StepAttacksBB[make_piece(c, pt)][s] |= to;
@@ -256,7 +256,7 @@ namespace {
   Bitboard pick_random(RKISS& rk, int booster) {
 
     // Values s1 and s2 are used to rotate the candidate magic of a
-    // quantity known to be the optimal to quickly find the magics.
+    // quantity known to be optimal to quickly find the magics.
     int s1 = booster & 63, s2 = (booster >> 6) & 63;
 
     Bitboard m = rk.rand<Bitboard>();
index cf033317c2d4e12d70ed4bbc63e5db1bb292f8d1..15fce527e902b26749a41accaaa6b406ebe9a7ab 100644 (file)
@@ -127,8 +127,8 @@ namespace {
        S( 25, 41), S( 25, 41), S(25, 41), S(25, 41) }
   };
 
-  // Outpost[PieceType][Square] contains bonuses of knights and bishops, indexed
-  // by piece type and square (from white's point of view).
+  // Outpost[PieceType][Square] contains bonuses for knights and bishops outposts,
+  // indexed by piece type and square (from white's point of view).
   const Value Outpost[][SQUARE_NB] = {
   {
   //  A     B     C     D     E     F     G     H
@@ -445,7 +445,7 @@ Value do_evaluate(const Position& pos) {
   }
 
 
-  // evaluate_outposts() evaluates bishop and knight outposts squares
+  // evaluate_outposts() evaluates bishop and knight outpost squares
 
   template<PieceType Piece, Color Us>
   Score evaluate_outposts(const Position& pos, EvalInfo& ei, Square s) {
@@ -764,7 +764,7 @@ Value do_evaluate(const Position& pos) {
 
     // Add bonus according to type of attacked enemy piece and to the
     // type of attacking piece, from knights to queens. Kings are not
-    // considered because are already handled in king evaluation.
+    // considered because they are already handled in king evaluation.
     if (weakEnemies)
         for (PieceType pt1 = KNIGHT; pt1 < KING; ++pt1)
         {
index ec36edfee5b278c859552c8e4b12f6a816f57b98..e2ae7d9591712dd5eabec2d767b72311843e0fd3 100644 (file)
@@ -284,7 +284,7 @@ void MovePicker::generate_next() {
 
 
 /// next_move() is the most important method of the MovePicker class. It returns
-/// a new pseudo legal move every time is called, until there are no more moves
+/// a new pseudo legal move every time it is called, until there are no more moves
 /// left. It picks the move with the biggest score from a list of generated moves
 /// taking care not returning the ttMove if has already been searched previously.
 template<>
index d9cfe409191a1b28dbf67b851fc8bdaf5cacb946..04ae01530e44c7611680fa0d2f05a16dd810221e 100644 (file)
@@ -188,7 +188,7 @@ namespace {
 
 namespace Pawns {
 
-/// init() initializes some tables by formula instead of hard-code their values
+/// init() initializes some tables by formula instead of hard-coding their values
 
 void init() {
 
index 6a5a577738393fafaf65dc47e7af54d2f8ff8a78..c4c6389dcf5bb2e9ef2974ab7c6070fe002e83b4 100644 (file)
@@ -56,7 +56,7 @@ Key Position::exclusion_key() const { return st->key ^ Zobrist::exclusion;}
 
 namespace {
 
-// min_attacker() is an helper function used by see() to locate the least
+// min_attacker() is a helper function used by see() to locate the least
 // valuable attacker for the side to move, remove the attacker we just found
 // from the bitboards and scan for new X-ray attacks behind it.
 
@@ -297,7 +297,7 @@ void Position::set(const string& fenStr, bool isChess960, Thread* th) {
 }
 
 
-/// Position::set_castling_flag() is an helper function used to set castling
+/// Position::set_castling_flag() is a helper function used to set castling
 /// flags given the corresponding color and the rook starting square.
 
 void Position::set_castling_flag(Color c, Square rfrom) {
@@ -415,9 +415,9 @@ const string Position::pretty(Move move) const {
 }
 
 
-/// Position:hidden_checkers() returns a bitboard of all pinned / discovery check
+/// Position:hidden_checkers() returns a bitboard of all pinned / discovered check
 /// pieces, according to the call parameters. Pinned pieces protect our king and
-/// discovery check pieces attack the enemy king.
+/// discovered check pieces attack the enemy king.
 
 Bitboard Position::hidden_checkers(Square ksq, Color c, Color toMove) const {
 
@@ -536,7 +536,7 @@ bool Position::pseudo_legal(const Move m) const {
           return false;
 
       // We have already handled promotion moves, so destination
-      // cannot be on the 8/1th rank.
+      // cannot be on the 8th/1st rank.
       if (rank_of(to) == RANK_8 || rank_of(to) == RANK_1)
           return false;
 
@@ -873,7 +873,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
           if (ci.checkSq[pt] & to)
               st->checkersBB |= to;
 
-          // Discovery checks
+          // Discovered checks
           if (ci.dcCandidates && (ci.dcCandidates & from))
           {
               if (pt != ROOK)
index 630c8ea28d206a2e9a884dcb3afaac774b4311b4..3d154889514c25529e61ea14800266c0198a931f 100644 (file)
@@ -359,7 +359,7 @@ namespace {
                     RootMoves[i].insert_pv_in_tt(pos);
 
                 // If search has been stopped break immediately. Sorting and
-                // writing PV back to TT is safe becuase RootMoves is still
+                // writing PV back to TT is safe because RootMoves is still
                 // valid, although it refers to previous iteration.
                 if (Signals.stop)
                     break;
index dc50686381fa5531db1055d79c8f04b3f58f703c..e495dc0300403bb43353b6c4bcf07a95aede7550 100644 (file)
@@ -161,7 +161,7 @@ bool Thread::cutoff_occurred() const {
 // thread 'master' at a split point. An obvious requirement is that thread must
 // be idle. With more than two threads, this is not sufficient: If the thread is
 // the master of some split point, it is only available as a slave to the slaves
-// which are busy searching the split point at the top of slaves split point
+// which are busy searching the split point at the top of slave's split point
 // stack (the "helpful master concept" in YBWC terminology).
 
 bool Thread::available_to(const Thread* master) const {
@@ -181,7 +181,7 @@ bool Thread::available_to(const Thread* master) const {
 
 // init() is called at startup to create and launch requested threads, that will
 // go immediately to sleep due to 'sleepWhileIdle' set to true. We cannot use
-// a c'tor becuase Threads is a static object and we need a fully initialized
+// a c'tor because Threads is a static object and we need a fully initialized
 // engine at this point due to allocation of Endgames in Thread c'tor.
 
 void ThreadPool::init() {
index 040b8727192ae41fe690b6f13a0819a4f4265b6f..dc8418dcca5795a06f6b0a7f90244c1cca34b497 100644 (file)
@@ -157,7 +157,7 @@ struct TimerThread : public ThreadBase {
 struct ThreadPool : public std::vector<Thread*> {
 
   void init(); // No c'tor and d'tor, threads rely on globals that should
-  void exit(); // be initialized and valid during the whole thread lifetime.
+  void exit(); // be initialized and are valid during the whole thread lifetime.
 
   MainThread* main() { return static_cast<MainThread*>((*this)[0]); }
   void read_uci_options();
index d624dfb26f8d07bbd8c81b9530453d4c19a0d0f7..7c3efb352a7b927fcdbabf45fc36e7340cdfd2b6 100644 (file)
@@ -108,7 +108,7 @@ void TimeManager::init(const Search::LimitsType& limits, int currentPly, Color u
   int minThinkingTime      = Options["Minimum Thinking Time"];
   int slowMover            = Options["Slow Mover"];
 
-  // Initialize to maximum values but unstablePVExtraTime that is reset
+  // Initialize all to maximum values but unstablePVExtraTime that is reset
   unstablePVExtraTime = 0;
   optimumSearchTime = maximumSearchTime = limits.time[us];
 
index 92ab0e7b1a9a21b506a86e4b4f0b59020f345483..3ee7b319787564d1c914220b9627247122276efe 100644 (file)
@@ -21,7 +21,7 @@
 #define TIMEMAN_H_INCLUDED
 
 /// The TimeManager class computes the optimal time to think depending on the
-/// maximum available time, the move game number and other parameters.
+/// maximum available time, the game move number and other parameters.
 
 class TimeManager {
 public:
index e0760ded99523e9fe1de6f2cb3767ce40b1efd2d..2766cb333857badd05fe2a7d0baa2d192b17ebb9 100644 (file)
@@ -249,14 +249,14 @@ enum Score {
 
 inline Score make_score(int mg, int eg) { return Score((mg << 16) + eg); }
 
-/// Extracting the signed lower and upper 16 bits it not so trivial because
+/// Extracting the signed lower and upper 16 bits is not so trivial because
 /// according to the standard a simple cast to short is implementation defined
 /// and so is a right shift of a signed integer.
 inline Value mg_value(Score s) { return Value(((s + 0x8000) & ~0xffff) / 0x10000); }
 
 /// On Intel 64 bit we have a small speed regression with the standard conforming
-/// version, so use a faster code in this case that, although not 100% standard
-/// compliant it seems to work for Intel and MSVC.
+/// version. Therefore, in this case we use a faster code in this case that,
+/// although not 100% standard compliant it seems to work for Intel and MSVC.
 #if defined(IS_64BIT) && (!defined(__GNUC__) || defined(__INTEL_COMPILER))
 
 inline Value eg_value(Score s) { return Value(int16_t(s & 0xffff)); }