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:
MinetaS
2023-04-07 15:23:04 +00:00
committed by Joost VandeVondele
parent 5d258e168f
commit 6e63dd63a4
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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));