diff options
Diffstat (limited to 'src/balance.cc')
-rw-r--r-- | src/balance.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/balance.cc b/src/balance.cc index 59eb4d92..4fcc83fa 100644 --- a/src/balance.cc +++ b/src/balance.cc @@ -43,21 +43,21 @@ balance_t::balance_t(const double val) { TRACE_CTOR(balance_t, "const double"); amounts.insert - (amounts_map::value_type(amount_t::current_pool->null_commodity, val)); + (amounts_map::value_type(commodity_pool_t::current_pool->null_commodity, val)); } balance_t::balance_t(const unsigned long val) { TRACE_CTOR(balance_t, "const unsigned long"); amounts.insert - (amounts_map::value_type(amount_t::current_pool->null_commodity, val)); + (amounts_map::value_type(commodity_pool_t::current_pool->null_commodity, val)); } balance_t::balance_t(const long val) { TRACE_CTOR(balance_t, "const long"); amounts.insert - (amounts_map::value_type(amount_t::current_pool->null_commodity, val)); + (amounts_map::value_type(commodity_pool_t::current_pool->null_commodity, val)); } balance_t& balance_t::operator+=(const balance_t& bal) @@ -271,7 +271,8 @@ void balance_t::print(std::ostream& out, if (pair.second) sorted.push_back(&pair.second); - std::stable_sort(sorted.begin(), sorted.end(), compare_amount_commodities()); + std::stable_sort(sorted.begin(), sorted.end(), + commodity_t::compare_by_commodity()); foreach (const amount_t * amount, sorted) { int width; |