diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-30 05:12:46 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-30 05:12:46 -0400 |
commit | 2aff35215fbe24459aa4057d5b31ea7490046ca6 (patch) | |
tree | 6a79a3d84e352e3b3647484b0daf38b1ae6aa81f /binary.cc | |
parent | 230d7fd6027d05422f4bb26e9bfb3758a9cb16ea (diff) | |
download | fork-ledger-2aff35215fbe24459aa4057d5b31ea7490046ca6.tar.gz fork-ledger-2aff35215fbe24459aa4057d5b31ea7490046ca6.tar.bz2 fork-ledger-2aff35215fbe24459aa4057d5b31ea7490046ca6.zip |
Enabled a huge number of warning flags for g++ in acprep, and fixed them all
except for several unused parameter warnings (because there is so much code
still #if 0'd out), and one implicit conversion from long long to long which
still has to be dealt with.
Diffstat (limited to 'binary.cc')
-rw-r--r-- | binary.cc | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -560,7 +560,7 @@ void write_amount(std::ostream& out, const amount_t& amt) void write_value(std::ostream& out, const value_t& val) { - write_long(out, (int)val.type()); + write_long(out, static_cast<int>(val.type())); switch (val.type()) { case value_t::BOOLEAN: @@ -877,12 +877,12 @@ unsigned int journal_t::read(std::istream& in, char * item_pool = new char[pool_size]; - item_pool = item_pool; + item_pool = item_pool; item_pool_end = item_pool + pool_size; - entry_t * entry_pool = (entry_t *) item_pool; - xact_t * xact_pool = (xact_t *) (item_pool + - sizeof(entry_t) * count); + entry_t * entry_pool = reinterpret_cast<entry_t *>(item_pool); + xact_t * xact_pool = reinterpret_cast<xact_t *>(item_pool + + (sizeof(entry_t) * count)); bigints_index = 0; bigints = bigints_next = (item_pool + sizeof(entry_t) * count + sizeof(xact_t) * xact_count); @@ -1153,8 +1153,8 @@ void journal_t::write(std::ostream& out) // Back-patch the count for amounts - unsigned long data_size = (((unsigned long) out.tellp()) - - ((unsigned long) data_val) - + unsigned long data_size = (static_cast<unsigned long>(out.tellp()) - + static_cast<unsigned long>(data_val) - sizeof(unsigned long)); out.seekp(data_val); write_number<unsigned long>(out, data_size); |