summaryrefslogtreecommitdiff
path: root/ofx.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2006-03-03 09:45:44 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:28 -0400
commit96d6d62ad94082ca777c2c88b88e0346a5d00e65 (patch)
treeb50a26a9c4c0cc0ab90b1772cc75368739501fa5 /ofx.cc
parent7d3e45958e805f8acaf399ef14d53757979240ab (diff)
downloadfork-ledger-96d6d62ad94082ca777c2c88b88e0346a5d00e65.tar.gz
fork-ledger-96d6d62ad94082ca777c2c88b88e0346a5d00e65.tar.bz2
fork-ledger-96d6d62ad94082ca777c2c88b88e0346a5d00e65.zip
Began support for improved commodity handling.
Diffstat (limited to 'ofx.cc')
-rw-r--r--ofx.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/ofx.cc b/ofx.cc
index 97cb7302..4b6bdbae 100644
--- a/ofx.cc
+++ b/ofx.cc
@@ -69,8 +69,7 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data,
assert(ac != ofx_account_currencies.end());
commodity_t * default_commodity = (*ac).second;
- std::string buf;
- std::ostringstream stream(buf);
+ std::ostringstream stream;
stream << - data.units;
// jww (2005-02-09): what if the amount contains fees?
@@ -84,7 +83,7 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data,
}
if (data.unitprice_valid && data.unitprice != 1.0) {
- std::ostringstream cstream(buf);
+ std::ostringstream cstream;
stream << - data.unitprice;
xact->cost = new amount_t(stream.str() + " " + default_commodity->symbol);
}