From e5c312f688ca73047214b82c315e8667fc1122dd Mon Sep 17 00:00:00 2001 From: Pranav Srinivas Kumar Date: Wed, 4 Dec 2019 11:19:17 -0600 Subject: [PATCH] Renamed completed to is_completed --- include/progress/bar.hpp | 2 +- samples/multiple_bars.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/progress/bar.hpp b/include/progress/bar.hpp index bdbbc50..fcec8f6 100644 --- a/include/progress/bar.hpp +++ b/include/progress/bar.hpp @@ -80,7 +80,7 @@ public: return std::min(static_cast(_progress), size_t(100)); } - bool completed() const { return _completed; } + bool is_completed() const { return _completed; } private: float _progress{0.0}; diff --git a/samples/multiple_bars.cpp b/samples/multiple_bars.cpp index 2651ba8..bcd222a 100644 --- a/samples/multiple_bars.cpp +++ b/samples/multiple_bars.cpp @@ -71,7 +71,7 @@ int main() { auto job1 = [&p1, &index1, &status_text1]() { while (true) { - if (p1.completed()) + if (p1.is_completed()) break; p1.set_postfix_text(status_text1[index1 % status_text1.size()]); p1.set_progress(index1 * 10); @@ -102,7 +102,7 @@ int main() { if (p3.current() + 2 >= 100) p3.set_prefix_text("Reading package list... Done"); p3.tick(); - if (p3.completed()) { + if (p3.is_completed()) { break; } std::this_thread::sleep_for(std::chrono::milliseconds(25)); @@ -135,7 +135,7 @@ int main() { else if (ticks >= 98) p2.set_postfix_text("Done"); p2.tick(); - if (p2.completed()) + if (p2.is_completed()) break; std::this_thread::sleep_for(std::chrono::milliseconds(30)); } @@ -158,7 +158,7 @@ int main() { auto job5 = [&p5]() { while (true) { p5.tick(); - if (p5.completed()) { + if (p5.is_completed()) { break; } std::this_thread::sleep_for(std::chrono::milliseconds(75)); @@ -189,7 +189,7 @@ int main() { if (p4.current() + 2 >= 100) p4.set_postfix_text("State restored to Restore_Point_1241531"); p4.tick(); - if (p4.completed()) { + if (p4.is_completed()) { break; } std::this_thread::sleep_for(std::chrono::milliseconds(50));