From 6f48367094082ad03526f6ffe24d7c3873ff7386 Mon Sep 17 00:00:00 2001 From: kinderchocolate Date: Tue, 3 Jun 2014 15:45:10 +1000 Subject: [PATCH] Add some const qualifier No functional change. --- src/search.cpp | 2 +- src/thread.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 85d702c4..cb502f07 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1552,7 +1552,7 @@ void Thread::idle_loop() { 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 diff --git a/src/thread.cpp b/src/thread.cpp index 344cfb79..62ff3764 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -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. - 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. -- 2.39.2