Commit 282c9ba4 authored by Gauthier Quesnel's avatar Gauthier Quesnel
Browse files

gui: fix real conversion warnings

parent a34b5c46
......@@ -98,7 +98,8 @@ generate(std::ostream& os,
}
for (std::size_t sz = 0; sz < size; ++sz) {
status = sz * 100.0 / static_cast<double>(size);
status =
static_cast<double>(sz) * 100.0 / static_cast<double>(size);
if (!(os << dist(gen) << '\n')) {
status = -2.0;
return;
......@@ -113,7 +114,8 @@ generate(std::ostream& os,
}
for (std::size_t sz = 0; sz < size; ++sz) {
status = sz * 100.0 / static_cast<double>(size);
status =
static_cast<double>(sz) * 100.0 / static_cast<double>(size);
const double value = dist(gen);
os.write(reinterpret_cast<const char*>(&value), sizeof(value));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment