From 541c577f5c3d4531fc6500c1e8a5b96b9e5370e5 Mon Sep 17 00:00:00 2001 From: Pranav Srinivas Kumar Date: Tue, 3 Dec 2019 16:56:39 -0600 Subject: [PATCH] Minor API change in progress bar --- include/progress/bar.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/progress/bar.hpp b/include/progress/bar.hpp index 368cbc8..1c70c95 100644 --- a/include/progress/bar.hpp +++ b/include/progress/bar.hpp @@ -12,7 +12,7 @@ class ProgressBar { std::string _start{"[ "}; std::string _fill{"■"}; std::string _lead{"■"}; - std::string _negative_space{"-"}; + std::string _remainder{"-"}; std::string _end{" ]"}; std::mutex _mutex; @@ -41,8 +41,8 @@ public: return *this; } - ProgressBar& negative_space(const std::string& negative_space) { - _negative_space = negative_space; + ProgressBar& remainder_with(const std::string& remainder) { + _remainder = remainder; return *this; } @@ -59,7 +59,7 @@ public: for (size_t i = 0; i < _bar_width; ++i) { if (i < pos) std::cout << _fill; else if (i == pos) std::cout << _lead; - else std::cout << _negative_space; + else std::cout << _remainder; } std::cout << _end << " " << static_cast(value) << "%"; std::cout << " " << _name << "\r";