Skip to content

Commit

Permalink
MacOS - try with non-const key for map
Browse files Browse the repository at this point in the history
  • Loading branch information
gjanssens committed Feb 15, 2023
1 parent 1a09665 commit c5109c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ CsvImpTransAssist::preview_row_fill_state_cells (GtkListStore *store, GtkTreeIte
fcolor = "black";
bcolor = "pink";
err_msg = std::string(_("This line has the following parse issues:"));
auto add_non_acct_err_bullet = [](std::string& a, ErrPair& b)->std::string
auto add_non_acct_err_bullet = [](std::string& a, ErrMap::value_type& b)->std::string
{
if ((b.first == GncTransPropType::ACCOUNT) ||
(b.first == GncTransPropType::TACCOUNT))
Expand Down Expand Up @@ -2081,7 +2081,7 @@ CsvImpTransAssist::assist_match_page_prepare ()
*/
auto err_msg = std::string(err.what());
auto err_msgs = err.errors();
auto add_bullet_item = [](std::string& a, ErrPair& b)->std::string { return std::move(a) + "\n" + b.second; };
auto add_bullet_item = [](std::string& a, ErrMap::value_type& b)->std::string { return std::move(a) + "\n" + b.second; };
err_msg = std::accumulate (err_msgs.begin(), err_msgs.end(), std::move (err_msg), add_bullet_item);

gnc_error_dialog (GTK_WINDOW (csv_imp_asst),
Expand Down
4 changes: 2 additions & 2 deletions gnucash/import-export/csv-imp/gnc-imp-props-tx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ enum class GncTransPropType {
};

using StrVec = std::vector<std::string>;
using ErrMap = std::map<const GncTransPropType, std::string>;
using ErrPair = std::pair<const GncTransPropType, std::string>;
using ErrMap = std::map<GncTransPropType, std::string>;
using ErrPair = std::pair<GncTransPropType, std::string>;

/** Maps all column types to a string representation.
* The actual definition is in gnc-csv-imp-trans.cpp.
Expand Down

0 comments on commit c5109c6

Please sign in to comment.