From 6f2e3b88649543d625b76ac5542dd8838b28f0b1 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 12 Feb 2009 02:34:39 -0400 Subject: Properly handle UTF-8 characters in commodity strings. --- src/balance.cc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/balance.cc') diff --git a/src/balance.cc b/src/balance.cc index c9ca148d..7f8ed572 100644 --- a/src/balance.cc +++ b/src/balance.cc @@ -240,17 +240,11 @@ void balance_t::print(std::ostream& out, first = false; width = first_width; } - - out.width(width); - out.fill(' '); - out << std::right << *amount; + amount->right_justify(out, width); } - if (first) { - out.width(first_width); - out.fill(' '); - out << std::right << "0"; - } + if (first) + amount_t(0L).right_justify(out, first_width); } } // namespace ledger -- cgit v1.2.3