Skip to content

Commit

Permalink
Better constness
Browse files Browse the repository at this point in the history
  • Loading branch information
wichtounet committed Oct 15, 2023
1 parent 551ea39 commit 5791a7d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/predict.hpp
Expand Up @@ -17,7 +17,7 @@ namespace budget {

struct predict_module {
void load() const;
void handle(std::vector<std::string>& args) const;
void handle(const std::vector<std::string>& args) const;
};

template<>
Expand Down
2 changes: 1 addition & 1 deletion src/overview.cpp
Expand Up @@ -114,7 +114,7 @@ void add_recap_line(std::vector<std::vector<std::string>>& contents, const std::
return add_recap_line(contents, title, values, [](const T& t){return t;});
}

budget::money compute_total_budget_account(data_cache & cache, budget::account & account, budget::month month, budget::year year){
budget::money compute_total_budget_account(data_cache & cache, const budget::account & account, budget::month month, budget::year year){
// By default, the start is the year of the overview
auto start_year_report = year;

Expand Down
2 changes: 1 addition & 1 deletion src/predict.cpp
Expand Up @@ -94,7 +94,7 @@ void budget::predict_module::load() const {
load_earnings();
}

void budget::predict_module::handle(std::vector<std::string>& args) const {
void budget::predict_module::handle(const std::vector<std::string>& args) const {
if(no_accounts()){
throw budget_exception("No accounts defined, you should start by defining some of them");
}
Expand Down

0 comments on commit 5791a7d

Please sign in to comment.