| 2690 | } |
| 2691 | |
| 2692 | void tick() { |
| 2693 | { |
| 2694 | std::lock_guard<std::mutex> lock{mutex_}; |
| 2695 | if (get_value<details::ProgressBarOption::completed>()) |
| 2696 | return; |
| 2697 | |
| 2698 | progress_ += (direction_ == Direction::forward) ? 1 : -1; |
| 2699 | if (direction_ == Direction::forward && progress_ == max_progress_) { |
| 2700 | // time to go back |
| 2701 | direction_ = Direction::backward; |
| 2702 | } else if (direction_ == Direction::backward && progress_ == 0) { |
| 2703 | direction_ = Direction::forward; |
| 2704 | } |
| 2705 | } |
| 2706 | print_progress(); |
| 2707 | } |
| 2708 | |
| 2709 | bool is_completed() { return get_value<details::ProgressBarOption::completed>(); } |
| 2710 |
nothing calls this directly
no outgoing calls
no test coverage detected