summaryrefslogtreecommitdiff
path: root/src/balpair.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/balpair.h')
-rw-r--r--src/balpair.h24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/balpair.h b/src/balpair.h
index c406394e..a4ba601f 100644
--- a/src/balpair.h
+++ b/src/balpair.h
@@ -47,7 +47,7 @@ class balance_pair_t
multiplicative<balance_pair_t, long,
multiplicative<balance_pair_t, amount_t> > > > > > > > >
{
- balance_t quantity;
+ balance_t quantity;
optional<balance_t> cost;
friend class value_t;
@@ -158,8 +158,8 @@ public:
}
optional<amount_t>
- amount(const optional<const commodity_t&>& commodity = none) const {
- return quantity.amount(commodity);
+ commodity_amount(const optional<const commodity_t&>& commodity = none) const {
+ return quantity.commodity_amount(commodity);
}
optional<balance_t> value(const optional<moment_t>& moment = none) const {
return quantity.value(moment);
@@ -201,24 +201,6 @@ public:
return temp;
}
- void in_place_round() {
- quantity = quantity.round();
- if (cost)
- cost = cost->round();
- }
- balance_pair_t round() const {
- balance_pair_t temp(*this);
- temp.in_place_round();
- return temp;
- }
-
- balance_pair_t unround() const {
- balance_pair_t temp(quantity.unround());
- if (cost)
- temp.cost = cost->unround();
- return temp;
- }
-
friend std::ostream& operator<<(std::ostream& out,
const balance_pair_t& bal_pair);
};