summaryrefslogtreecommitdiff
path: root/amount.h
diff options
context:
space:
mode:
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