summaryrefslogtreecommitdiff
path: root/amount.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-24 11:36:40 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-24 11:36:40 -0400
commitee396957226e2273bc60ede7192c27038c432f24 (patch)
treee87839dd6949461f5e3c9fb34071e7cea412b761 /amount.h
parent171f79dda268b59d708f5002d1d616a71a30ecb5 (diff)
downloadfork-ledger-ee396957226e2273bc60ede7192c27038c432f24.tar.gz
fork-ledger-ee396957226e2273bc60ede7192c27038c432f24.tar.bz2
fork-ledger-ee396957226e2273bc60ede7192c27038c432f24.zip
Parsing now works again. And there was much rejoicing.
Diffstat (limited to 'amount.h')
-rw-r--r--amount.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/amount.h b/amount.h
index 665dabe9..648965c7 100644
--- a/amount.h
+++ b/amount.h
@@ -538,12 +538,17 @@ public:
* amount_t::keep_price, amount_t::keep_date and amount_t::keep_tag
* have been set to (which all default to false).
*/
- void annotate_commodity(const annotation_t& details);
- bool commodity_annotated() const;
- annotation_t annotation_details() const;
- amount_t strip_annotations(const bool _keep_price = keep_price,
- const bool _keep_date = keep_date,
- const bool _keep_tag = keep_tag) const;
+ void annotate_commodity(const annotation_t& details);
+ bool commodity_annotated() const;
+
+ annotation_t& annotation_details();
+ const annotation_t& annotation_details() const {
+ return const_cast<amount_t&>(*this).annotation_details();
+ }
+
+ amount_t strip_annotations(const bool _keep_price = keep_price,
+ const bool _keep_date = keep_date,
+ const bool _keep_tag = keep_tag) const;
/**
* Parsing methods. The method `parse' is used to parse an amount