mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
Use int conversion for Option class
The current implementation generates warnings on MSVC. However, we have no real use cases for double-typed UCI option values now. Also parameter tuning only accepts following three types: int, Value, Score closes https://github.com/official-stockfish/Stockfish/pull/4505 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
5d258e168f
commit
6e63dd63a4
+2
-2
@@ -87,7 +87,7 @@ void TranspositionTable::clear() {
|
||||
|
||||
std::vector<std::thread> threads;
|
||||
|
||||
for (size_t idx = 0; idx < Options["Threads"]; ++idx)
|
||||
for (size_t idx = 0; idx < size_t(Options["Threads"]); ++idx)
|
||||
{
|
||||
threads.emplace_back([this, idx]() {
|
||||
|
||||
@@ -98,7 +98,7 @@ void TranspositionTable::clear() {
|
||||
// Each thread will zero its part of the hash table
|
||||
const size_t stride = size_t(clusterCount / Options["Threads"]),
|
||||
start = size_t(stride * idx),
|
||||
len = idx != Options["Threads"] - 1 ?
|
||||
len = idx != size_t(Options["Threads"]) - 1 ?
|
||||
stride : clusterCount - start;
|
||||
|
||||
std::memset(&table[start], 0, len * sizeof(Cluster));
|
||||
|
||||
Reference in New Issue
Block a user