diff options
author | Craig Earls <enderw88@gmail.com> | 2015-02-25 22:01:33 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2015-02-25 22:01:33 -0700 |
commit | 1f803d629491991afb8aa9cd1d159313b2af78c7 (patch) | |
tree | 4eb6f0f90162f4808d0687a06ad1a698eb3ed035 /src/amount.cc | |
parent | fe48f607be7b9da8d2c4ac1fb30078dea55b8240 (diff) | |
parent | af0da737fc4ef8f9ccebd3d43519610b8a8fcaa1 (diff) | |
download | fork-ledger-1f803d629491991afb8aa9cd1d159313b2af78c7.tar.gz fork-ledger-1f803d629491991afb8aa9cd1d159313b2af78c7.tar.bz2 fork-ledger-1f803d629491991afb8aa9cd1d159313b2af78c7.zip |
Merge commit 'af0da737fc4ef8f9ccebd3d43519610b8a8fcaa1' into next
Conflicts:
lisp/ledger-reconcile.el
Diffstat (limited to 'src/amount.cc')
-rw-r--r-- | src/amount.cc | 79 |
1 files changed, 0 insertions, 79 deletions
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<class Archive> - void serialize(Archive& ar, const unsigned int /* version */) - { - ar & boost::serialization::base_object<supports_flags<> >(*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<class Archive> -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 <class Archive> -void serialize(Archive& ar, MP_INT& mpz, const unsigned int /* version */) -{ - ar & mpz._mp_alloc; - ar & mpz._mp_size; - ar & mpz._mp_d; -} - -template <class Archive> -void serialize(Archive& ar, MP_RAT& mpq, const unsigned int /* version */) -{ - ar & mpq._mp_num; - ar & mpq._mp_den; -} - -template <class Archive> -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 |