From 78a627afc590bc4fcd5424a6c672969e0b5f5822 Mon Sep 17 00:00:00 2001 From: sowle Date: Fri, 20 Mar 2020 13:51:37 +0300 Subject: [PATCH] fixed std::out state change --- src/common/pre_download.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/pre_download.h b/src/common/pre_download.h index a894bff2..d4598207 100644 --- a/src/common/pre_download.h +++ b/src/common/pre_download.h @@ -79,6 +79,7 @@ namespace tools auto dif = std::chrono::system_clock::now() - last_update; if (dif >= std::chrono::milliseconds(300)) { + boost::io::ios_flags_saver ifs(std::cout); std::cout << "Received " << received_bytes / 1048576 << " of " << total_bytes / 1048576 << " MiB ( " << std::fixed << std::setprecision(1) << 100.0 * received_bytes / total_bytes << " %)\r"; last_update = std::chrono::system_clock::now(); }