From c5109c67e5eac31da288d9beb1a8c9c1166d834d Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Wed, 15 Feb 2023 11:57:49 +0100 Subject: [PATCH] MacOS - try with non-const key for map --- gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp | 4 ++-- gnucash/import-export/csv-imp/gnc-imp-props-tx.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp b/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp index 6d062a5d17..71fe41c775 100644 --- a/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp +++ b/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp @@ -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)) @@ -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), diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-tx.hpp b/gnucash/import-export/csv-imp/gnc-imp-props-tx.hpp index 42d62e5d48..095aa43223 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-props-tx.hpp +++ b/gnucash/import-export/csv-imp/gnc-imp-props-tx.hpp @@ -78,8 +78,8 @@ enum class GncTransPropType { }; using StrVec = std::vector; -using ErrMap = std::map; -using ErrPair = std::pair; +using ErrMap = std::map; +using ErrPair = std::pair; /** Maps all column types to a string representation. * The actual definition is in gnc-csv-imp-trans.cpp.