]> git.sesse.net Git - stockfish/commitdiff
Add some const qualifier
authorkinderchocolate <WongMingYin@gmail.com>
Tue, 3 Jun 2014 05:45:10 +0000 (15:45 +1000)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 3 Jun 2014 09:43:52 +0000 (11:43 +0200)
No functional change.

src/search.cpp
src/thread.cpp

index 85d702c4d4c410e0eb4e5eb045977c6d891e5114..cb502f077109ef58c3500ea2c3cd0bdbd24a66cb 100644 (file)
@@ -1552,7 +1552,7 @@ void Thread::idle_loop() {
           if (Threads.size() > 2)
               for (size_t i = 0; i < Threads.size(); ++i)
               {
           if (Threads.size() > 2)
               for (size_t i = 0; i < Threads.size(); ++i)
               {
-                  int size = Threads[i]->splitPointsSize; // Local copy
+                  const int size = Threads[i]->splitPointsSize; // Local copy
                   sp = size ? &Threads[i]->splitPoints[size - 1] : NULL;
 
                   if (   sp
                   sp = size ? &Threads[i]->splitPoints[size - 1] : NULL;
 
                   if (   sp
index 344cfb794782d7a559194ccf7007645c2bc63bd2..62ff37641c7cb013fb3376d795382ca4d1aaae9f 100644 (file)
@@ -119,7 +119,7 @@ bool Thread::available_to(const Thread* master) const {
 
   // Make a local copy to be sure it doesn't become zero under our feet while
   // testing next condition and so leading to an out of bounds access.
 
   // Make a local copy to be sure it doesn't become zero under our feet while
   // testing next condition and so leading to an out of bounds access.
-  int size = splitPointsSize;
+  const int size = splitPointsSize;
 
   // No split points means that the thread is available as a slave for any
   // other thread otherwise apply the "helpful master" concept if possible.
 
   // No split points means that the thread is available as a slave for any
   // other thread otherwise apply the "helpful master" concept if possible.