diff options
author | John Wiegley <johnw@newartisans.com> | 2007-06-08 04:13:20 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:39:08 -0400 |
commit | b7b4c079266e0e9ef18dbe006a4a135643cf890b (patch) | |
tree | c1196c1e39dc97024f9b306d564f7b1e0dac84d3 /src/numerics | |
parent | ec850814fdd6424db791ef79cab82eb2a2e5afbe (diff) | |
download | fork-ledger-b7b4c079266e0e9ef18dbe006a4a135643cf890b.tar.gz fork-ledger-b7b4c079266e0e9ef18dbe006a4a135643cf890b.tar.bz2 fork-ledger-b7b4c079266e0e9ef18dbe006a4a135643cf890b.zip |
r384@user1022: johnw | 2007-06-08 00:08:53 -0400
Corrected several minor warnings
Diffstat (limited to 'src/numerics')
-rw-r--r-- | src/numerics/value.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/numerics/value.cc b/src/numerics/value.cc index bdb102c5..ea84a5a8 100644 --- a/src/numerics/value.cc +++ b/src/numerics/value.cc @@ -41,22 +41,22 @@ void value_t::storage_t::destroy() { switch (type) { case AMOUNT: - ((amount_t *)data)->~amount_t(); + reinterpret_cast<amount_t *>(data)->~amount_t(); break; case BALANCE: - checked_delete(*(balance_t **)data); + checked_delete(*reinterpret_cast<balance_t **>(data)); break; case BALANCE_PAIR: - checked_delete(*(balance_pair_t **)data); + checked_delete(*reinterpret_cast<balance_pair_t **>(data)); break; case STRING: - ((string *)data)->~string(); + reinterpret_cast<string *>(data)->~string(); break; case SEQUENCE: - checked_delete(*(sequence_t **)data); + checked_delete(*reinterpret_cast<sequence_t **>(data)); break; case POINTER: - ((boost::any *)data)->~any(); + reinterpret_cast<boost::any *>(data)->~any(); break; default: @@ -73,11 +73,11 @@ void value_t::initialize() true_value = new storage_t; true_value->type = BOOLEAN; - *(bool *) true_value->data = true; + *reinterpret_cast<bool *>(true_value->data) = true; false_value = new storage_t; false_value->type = BOOLEAN; - *(bool *) false_value->data = false; + *reinterpret_cast<bool *>(false_value->data) = false; BOOST_STATIC_ASSERT(sizeof(amount_t) >= sizeof(bool)); BOOST_STATIC_ASSERT(sizeof(amount_t) >= sizeof(moment_t)); |