From 2d62f7b633bdaa39c650bb67425514cf1e66a4dd Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 29 Aug 2004 04:31:59 -0400 Subject: redid the way amount_t::commodity is handled; no more direct access --- binary.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'binary.cc') diff --git a/binary.cc b/binary.cc index 088a6bd8..0a712972 100644 --- a/binary.cc +++ b/binary.cc @@ -165,9 +165,9 @@ inline void read_binary_amount(char *& data, amount_t& amt) commodity_t::ident_t ident; read_binary_number(data, ident); if (ident == 0xffffffff) - amt.commodity = NULL; + amt.commodity_ = NULL; else - amt.commodity = commodities[ident - 1]; + amt.commodity_ = commodities[ident - 1]; amt.read_quantity(data); } @@ -431,8 +431,8 @@ inline void write_binary_string(std::ostream& out, const std::string& str) void write_binary_amount(std::ostream& out, const amount_t& amt) { - if (amt.commodity) - write_binary_number(out, amt.commodity->ident); + if (amt.commodity_) + write_binary_number(out, amt.commodity().ident); else write_binary_number(out, 0xffffffff); -- cgit v1.2.3