From b7b4c079266e0e9ef18dbe006a4a135643cf890b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 8 Jun 2007 04:13:20 +0000 Subject: r384@user1022: johnw | 2007-06-08 00:08:53 -0400 Corrected several minor warnings --- src/numerics/value.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/numerics') 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(data)->~amount_t(); break; case BALANCE: - checked_delete(*(balance_t **)data); + checked_delete(*reinterpret_cast(data)); break; case BALANCE_PAIR: - checked_delete(*(balance_pair_t **)data); + checked_delete(*reinterpret_cast(data)); break; case STRING: - ((string *)data)->~string(); + reinterpret_cast(data)->~string(); break; case SEQUENCE: - checked_delete(*(sequence_t **)data); + checked_delete(*reinterpret_cast(data)); break; case POINTER: - ((boost::any *)data)->~any(); + reinterpret_cast(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(true_value->data) = true; false_value = new storage_t; false_value->type = BOOLEAN; - *(bool *) false_value->data = false; + *reinterpret_cast(false_value->data) = false; BOOST_STATIC_ASSERT(sizeof(amount_t) >= sizeof(bool)); BOOST_STATIC_ASSERT(sizeof(amount_t) >= sizeof(moment_t)); -- cgit v1.2.3