From d5e1308d07e9a7d9da33aed6f7f617b2209cba40 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Sun, 15 Feb 2015 08:39:58 +0100 Subject: [ledger] Remove --cache option and all boost serialisation related code. --- src/amount.cc | 79 ----------------------------------------------------------- 1 file changed, 79 deletions(-) (limited to 'src/amount.cc') diff --git a/src/amount.cc b/src/amount.cc index 6ddcdb4f..b0898bfb 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -93,20 +93,6 @@ struct amount_t::bigint_t : public supports_flags<> } return true; } - -#if HAVE_BOOST_SERIALIZATION -private: - friend class boost::serialization::access; - - template - void serialize(Archive& ar, const unsigned int /* version */) - { - ar & boost::serialization::base_object >(*this); - ar & val; - ar & prec; - ar & refc; - } -#endif // HAVE_BOOST_SERIALIZATION }; bool amount_t::is_initialized = false; @@ -1331,69 +1317,4 @@ void put_amount(property_tree::ptree& st, const amount_t& amt, st.put("quantity", amt.quantity_string()); } -#if HAVE_BOOST_SERIALIZATION - -template -void amount_t::serialize(Archive& ar, const unsigned int /* version */) -{ - ar & is_initialized; - ar & quantity; - ar & commodity_; -} - -#endif // HAVE_BOOST_SERIALIZATION - } // namespace ledger - -#if HAVE_BOOST_SERIALIZATION -namespace boost { -namespace serialization { - -template -void serialize(Archive& ar, MP_INT& mpz, const unsigned int /* version */) -{ - ar & mpz._mp_alloc; - ar & mpz._mp_size; - ar & mpz._mp_d; -} - -template -void serialize(Archive& ar, MP_RAT& mpq, const unsigned int /* version */) -{ - ar & mpq._mp_num; - ar & mpq._mp_den; -} - -template -void serialize(Archive& ar, long unsigned int& integer, - const unsigned int /* version */) -{ - ar & make_binary_object(&integer, sizeof(long unsigned int)); -} - -} // namespace serialization -} // namespace boost - -BOOST_CLASS_EXPORT(ledger::annotated_commodity_t) - -template void boost::serialization::serialize(boost::archive::binary_iarchive&, - MP_INT&, const unsigned int); -template void boost::serialization::serialize(boost::archive::binary_oarchive&, - MP_INT&, const unsigned int); -template void boost::serialization::serialize(boost::archive::binary_iarchive&, - MP_RAT&, const unsigned int); -template void boost::serialization::serialize(boost::archive::binary_oarchive&, - MP_RAT&, const unsigned int); -template void boost::serialization::serialize(boost::archive::binary_iarchive&, - long unsigned int&, - const unsigned int); -template void boost::serialization::serialize(boost::archive::binary_oarchive&, - long unsigned int&, - const unsigned int); - -template void ledger::amount_t::serialize(boost::archive::binary_iarchive&, - const unsigned int); -template void ledger::amount_t::serialize(boost::archive::binary_oarchive&, - const unsigned int); - -#endif // HAVE_BOOST_SERIALIZATION -- cgit v1.2.3