Skip to content

Commit

Permalink
Fix some problems found by static analysis in ProgressBar class.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Sep 5, 2024
1 parent e888304 commit 61a3f48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ProgressBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ bool ProgressBar::isEnding(int currentValue, int maxValue) const
return currentValue >= maxValue;
}

void ProgressBar::printProgress(const std::string& msg)
void ProgressBar::printProgress(const std::string& msg) const
{
std::cout << msg;
std::cout.flush();
}
}
2 changes: 1 addition & 1 deletion src/ProgressBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ProgressBar
std::string getSuffix() const { return suffix_; }
std::string getMarker() const { return marker_; }

void printProgress(const std::string& msg);
void printProgress(const std::string& msg) const;

private:
const int maxYear_;
Expand Down

0 comments on commit 61a3f48

Please sign in to comment.