From ab4198a50f7fe476d9d1c7d56fb09669e7839bf5 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 27 Mar 2020 18:20:44 -0700 Subject: Look up annotated amounts within balances by their displayed name --- src/balance.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/balance.h') diff --git a/src/balance.h b/src/balance.h index 19b6bd84..6c1475ac 100644 --- a/src/balance.h +++ b/src/balance.h @@ -506,6 +506,9 @@ public: optional commodity_amount(const optional& commodity = none) const; + amounts_map::iterator find_by_name(const commodity_t& comm); + amounts_map::const_iterator find_by_name(const commodity_t& comm) const; + balance_t number() const { balance_t temp; foreach (const amounts_map::value_type& pair, amounts) -- cgit v1.2.3