From be6cef93c479056169ab499d03ea212ff22db435 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 7 Jun 2010 09:49:17 -0400 Subject: A further simplification of -V and -X With -X COMM, all values are computed in terms of COMM, regardless. With -V, only secondary commodities will ever be computed, never primaries. Further, if a secondary commodities has an associated price, the valuation is done in terms of that price's commodity. --- src/commodity.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/commodity.h') diff --git a/src/commodity.h b/src/commodity.h index 8fe00a6d..ae7d9d66 100644 --- a/src/commodity.h +++ b/src/commodity.h @@ -59,6 +59,10 @@ struct price_point_t datetime_t when; amount_t price; + price_point_t() {} + price_point_t(datetime_t _when, amount_t _price) + : when(_when), price(_price) {} + bool operator==(const price_point_t& other) const { return when == other.when && price == other.price; } -- cgit v1.2.3