Skip to content

Commit

Permalink
Rename function gnc_csv_price_col_type_strs to gnc_price_col_type_strs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob-IT committed Dec 3, 2017
1 parent eb712dc commit 4fe77a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions gnucash/import-export/csv-imp/gnc-price-props.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extern "C" {
G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_IMPORT;

/* This map contains a set of strings representing the different column types. */
std::map<GncPricePropType, const char*> gnc_csv_price_col_type_strs = {
std::map<GncPricePropType, const char*> gnc_price_col_type_strs = {
{ GncPricePropType::NONE, N_("None") },
{ GncPricePropType::DATE, N_("Date") },
{ GncPricePropType::AMOUNT, N_("Amount") },
Expand Down Expand Up @@ -341,15 +341,15 @@ void GncImportPrice::set (GncPricePropType prop_type, const std::string& value)
}
catch (const std::invalid_argument& e)
{
auto err_str = std::string(_(gnc_csv_price_col_type_strs[prop_type])) +
auto err_str = std::string(_(gnc_price_col_type_strs[prop_type])) +
std::string(_(" could not be understood.\n")) +
e.what();
m_errors.emplace(prop_type, err_str);
throw std::invalid_argument (err_str);
}
catch (const std::out_of_range& e)
{
auto err_str = std::string(_(gnc_csv_price_col_type_strs[prop_type])) +
auto err_str = std::string(_(gnc_price_col_type_strs[prop_type])) +
std::string(_(" could not be understood.\n")) +
e.what();
m_errors.emplace(prop_type, err_str);
Expand Down
4 changes: 2 additions & 2 deletions gnucash/import-export/csv-imp/gnc-price-props.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ enum class GncPricePropType {
};

/** Maps all column types to a string representation.
* The actual definition is in gnc-csv-imp-prices.cpp.
* The actual definition is in gnc-price-props.cpp.
* Attention: that definition should be adjusted for any
* changes to enum class GncPricePropType ! */
extern std::map<GncPricePropType, const char*> gnc_csv_price_col_type_strs;
extern std::map<GncPricePropType, const char*> gnc_price_col_type_strs;

/** Functor to check if the above map has an element of which
* the value equals name. To be used with std::find_if.
Expand Down

0 comments on commit 4fe77a5

Please sign in to comment.