summaryrefslogtreecommitdiff
path: root/ledger.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2003-10-01 04:42:13 +0000
committerJohn Wiegley <johnw@newartisans.com>2003-10-01 04:42:13 +0000
commitf93341edfccba98c7c709dfd172467b37017cc3f (patch)
tree38c18778b9a475b4b9b2c7feed3725ed3a67acf1 /ledger.cc
parent16cb024a823112f4f2360f6123492bcefd8f74f8 (diff)
downloadfork-ledger-f93341edfccba98c7c709dfd172467b37017cc3f.tar.gz
fork-ledger-f93341edfccba98c7c709dfd172467b37017cc3f.tar.bz2
fork-ledger-f93341edfccba98c7c709dfd172467b37017cc3f.zip
*** empty log message ***
Diffstat (limited to 'ledger.cc')
-rw-r--r--ledger.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ledger.cc b/ledger.cc
index 44a0830e..1b354f12 100644
--- a/ledger.cc
+++ b/ledger.cc
@@ -133,14 +133,14 @@ void totals::print(std::ostream& out, int width) const
}
}
-amount * totals::value(const std::string& commodity)
+amount * totals::value(const std::string& commodity) const
{
// Render all of the amounts into the given commodity. This
// requires known prices for each commodity.
amount * total = create_amount((commodity + " 0.00").c_str());
- for (iterator i = amounts.begin(); i != amounts.end(); i++)
+ for (const_iterator i = amounts.begin(); i != amounts.end(); i++)
*total += *((*i).second);
return total;