From e414123ecb472d1f86a2f1cfdbd2732144c20f0d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 10 Sep 2004 05:07:50 -0400 Subject: change commodity->symbol to const, and added set_symbol --- binary.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'binary.cc') diff --git a/binary.cc b/binary.cc index a64f21ff..98e3be16 100644 --- a/binary.cc +++ b/binary.cc @@ -9,7 +9,7 @@ namespace ledger { static unsigned long binary_magic_number = 0xFFEED765; -static unsigned long format_version = 0x0002001a; +static unsigned long format_version = 0x0002001b; static account_t ** accounts; static account_t ** accounts_next; @@ -216,7 +216,8 @@ inline commodity_t * read_binary_commodity(char *& data) commodity->ident = read_binary_number(data); - read_binary_string(data, commodity->symbol); + read_binary_string(data, *(const_cast(&commodity->symbol))); + read_binary_number(data, commodity->quote); read_binary_string(data, commodity->name); read_binary_string(data, commodity->note); read_binary_number(data, commodity->precision); @@ -472,6 +473,7 @@ void write_binary_commodity(std::ostream& out, commodity_t * commodity) write_binary_number(out, commodity->ident); write_binary_string(out, commodity->symbol); + write_binary_number(out, commodity->quote); write_binary_string(out, commodity->name); write_binary_string(out, commodity->note); write_binary_number(out, commodity->precision); -- cgit v1.2.3