diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-29 04:31:59 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-29 04:31:59 -0400 |
commit | 2d62f7b633bdaa39c650bb67425514cf1e66a4dd (patch) | |
tree | ffe42356e5e83f2cbc2cce74a8566ea1ac738e8b /binary.cc | |
parent | 032afa5657bd600476cde256b6d7db84fde7d038 (diff) | |
download | fork-ledger-2d62f7b633bdaa39c650bb67425514cf1e66a4dd.tar.gz fork-ledger-2d62f7b633bdaa39c650bb67425514cf1e66a4dd.tar.bz2 fork-ledger-2d62f7b633bdaa39c650bb67425514cf1e66a4dd.zip |
redid the way amount_t::commodity is handled; no more direct access
Diffstat (limited to 'binary.cc')
-rw-r--r-- | binary.cc | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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<commodity_t::ident_t>(out, 0xffffffff); |