summaryrefslogtreecommitdiff
path: root/src/balance.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-19 01:22:22 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-19 01:22:22 -0400
commit1fa3c1956ff087a5621184e18b0d785e6c41646a (patch)
treee886aaca1028e0e2922fc3e5191ceea48013950c /src/balance.cc
parentec08dee745ee7c1bda63defa2828ce98e438370b (diff)
downloadfork-ledger-1fa3c1956ff087a5621184e18b0d785e6c41646a.tar.gz
fork-ledger-1fa3c1956ff087a5621184e18b0d785e6c41646a.tar.bz2
fork-ledger-1fa3c1956ff087a5621184e18b0d785e6c41646a.zip
Moved amount_t::right_justify to simply ::justify
Diffstat (limited to 'src/balance.cc')
-rw-r--r--src/balance.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/balance.cc b/src/balance.cc
index 7f8ed572..92a6c767 100644
--- a/src/balance.cc
+++ b/src/balance.cc
@@ -30,6 +30,7 @@
*/
#include "balance.h"
+#include "unistring.h"
namespace ledger {
@@ -240,11 +241,17 @@ void balance_t::print(std::ostream& out,
first = false;
width = first_width;
}
- amount->right_justify(out, width);
+
+ std::ostringstream buf;
+ buf << *amount;
+ justify(out, buf.str(), width, true);
}
- if (first)
- amount_t(0L).right_justify(out, first_width);
+ if (first) {
+ std::ostringstream buf;
+ buf << amount_t(0L);
+ justify(out, buf.str(), first_width, true);
+ }
}
} // namespace ledger