Skip to content

Commit

Permalink
Assume final new line flag only changes one way and once
Browse files Browse the repository at this point in the history
  • Loading branch information
gonuke committed Jun 15, 2020
1 parent 68ff498 commit a81ae53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/overlap_check/ProgressBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void ProgressBar::set_value(double val) {

// write the bar to screen
std::cout << '\r' << bar.str() << std::flush;
need_final_newline = true;

if (val >= 100.0) {
std::cout << "\n";
need_final_newline = false;
Expand Down
2 changes: 1 addition & 1 deletion src/overlap_check/ProgressBar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ProgressBar {

private:
int current {0};
bool need_final_newline {false};
bool need_final_newline {true};
};

#endif // HEADER GUARD

0 comments on commit a81ae53

Please sign in to comment.