if (progress) {
int pc = total ? (offset * 100ull / total) : 0;
if (pc > last_pc) {
- cerr << "\r" << operation << ": "
- << pc << "% complete...";
- cerr.flush();
+ std::cerr << "\r" << operation << ": "
+ << pc << "% complete..." << std::flush;
last_pc = pc;
}
}
void ProgressContext::finish() {
if (progress) {
- cerr << "\r" << operation << ": 100% complete...done." << std::endl;
+ std::cerr << "\r" << operation << ": 100% complete...done." << std::endl;
}
}
void ProgressContext::fail() {
if (progress) {
- cerr << "\r" << operation << ": " << last_pc << "% complete...failed."
- << std::endl;
+ std::cerr << "\r" << operation << ": " << last_pc << "% complete...failed."
+ << std::endl;
}
}