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]() {
// 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));
Option& operator=(const std::string&);
void operator<<(const Option&);
- operator double() const;
+ operator int() const;
operator std::string() const;
bool operator==(const char*) const;
Option::Option(const char* v, const char* cur, OnChange f) : type("combo"), min(0), max(0), on_change(f)
{ defaultValue = v; currentValue = cur; }
-Option::operator double() const {
+Option::operator int() const {
assert(type == "check" || type == "spin");
- return (type == "spin" ? stof(currentValue) : currentValue == "true");
+ return (type == "spin" ? std::stoi(currentValue) : currentValue == "true");
}
Option::operator std::string() const {