We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0373926 commit 4f07db0Copy full SHA for 4f07db0
progress_bar.cpp
@@ -52,9 +52,8 @@ ProgressBar::ProgressBar(uint64_t total,
52
out = &out_;
53
54
if ((logging_mode_ = !to_terminal(*out)))
55
- *out << description_ + '\n' << std::flush;
+ *out << description_ << std::endl;
56
57
- assert(description_.size() <= kMessageSize);
58
description_.resize(kMessageSize, ' ');
59
60
ShowProgress();
@@ -104,7 +103,7 @@ int ProgressBar::GetBarLength() const {
104
103
- 9
105
- description_.size()
106
- kCharacterWidthPercentage
107
- - std::ceil(std::log10(std::max(uint64_t(1), total_))) * 2;
+ - std::ceil(std::log10(std::max(uint64_t(2), total_))) * 4;
108
109
return std::min(max_size / 2, kMaxBarWidth);
110
}
0 commit comments