We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a40107a commit 736498cCopy full SHA for 736498c
smithlab_utils.hpp
@@ -429,7 +429,7 @@ class ProgressBar {
429
bar = std::string(bar_width, ' ');
430
}
431
bool time_to_report(const size_t i) const {
432
- return (static_cast<size_t>((100.0*i)/total) > prev);
+ return std::round((100.0*std::min(i, total))/total) > prev;
433
434
void
435
report(std::ostream &out, const size_t i);
0 commit comments