From 0e6355329f241a3e3c8b38cb4146fda4470e6ed0 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 26 Mar 2018 15:33:06 -0400 Subject: Whitespace changes --- generator/progress.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'generator/progress.h') diff --git a/generator/progress.h b/generator/progress.h index f42f701..e5cc13d 100644 --- a/generator/progress.h +++ b/generator/progress.h @@ -5,20 +5,20 @@ namespace cadence { namespace generator { - + class progress { private: std::string message; int total; int cur = 0; int lprint = 0; - + public: progress(std::string message, int total) : message(message), total(total) { std::cout << message << " 0%" << std::flush; } - + void update(int val) { if (val <= total) @@ -27,29 +27,29 @@ namespace cadence { } else { cur = total; } - + int pp = cur * 100 / total; if (pp != lprint) { lprint = pp; - + std::cout << "\b\b\b\b" << std::right; std::cout.width(3); std::cout << pp << "%" << std::flush; } } - + void update() { update(cur+1); } - + ~progress() { std::cout << "\b\b\b\b100%" << std::endl; } }; - + }; }; -- cgit 1.4.1