summaryrefslogtreecommitdiff
path: root/src/register.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-01 04:36:49 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:35 -0400
commite92bcf411d2e9a55969303ba3893a017152d7c18 (patch)
treee7b52d09751de39c86ede91f88a2fcf24facfb27 /src/register.cc
parent50a9caf302936ba6f61bbe05b4718f199d0d584c (diff)
downloadfork-ledger-e92bcf411d2e9a55969303ba3893a017152d7c18.tar.gz
fork-ledger-e92bcf411d2e9a55969303ba3893a017152d7c18.tar.bz2
fork-ledger-e92bcf411d2e9a55969303ba3893a017152d7c18.zip
Started using boost::optional<T>.
Diffstat (limited to 'src/register.cc')
-rw-r--r--src/register.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/register.cc b/src/register.cc
index 9f33bd0c..de0344de 100644
--- a/src/register.cc
+++ b/src/register.cc
@@ -117,8 +117,10 @@ static void scan_for_transactions(std::ostream& out, const xml::node_t * node)
<< std::setw(21) << std::left
<< abbreviate(xact->account->fullname(), 21,
ABBREVIATE, true) << ' '
- << std::setw(12) << std::right
- << xact->amount << '\n';
+ << std::setw(12) << std::right;
+ if (xact->amount)
+ out << *xact->amount;
+ out << '\n';
} else {
scan_for_transactions(out, child);
}